ADS4GPTs LangGraph agent. Integrate Ads into AI Agents and monetize.
Project description
ads4gpts-langgraph-agent
ADS4GPTs LangGraph agent. Integrate Ads into AI Agents and monetize.
Overview
The ads4gpts-langgraph-agent package provides a LangGraph agent that integrates advertising capabilities into AI agents. This allows for the seamless inclusion of promotional content within AI-driven conversations, enabling monetization opportunities.
Features
- Contextual Ad Integration: Ads are integrated into conversations based on the context, ensuring relevance and engagement.
- Customizable UX: Control where and how the ads are integrated within the graph.
- Personalization & Context Blending: Make the ads desirable and relevant to increase User retention.
- Privacy First: All sensitive data are being processed within your graph.
- Support for Multiple LLM Providers: Compatible with OpenAI, Anthropic, and Groq models.
- Logging: Configurable logging for monitoring and debugging.
Installation
To install the package, use the following command:
pip install ads4gpts-langgraph-agent
Usage
The ads4gpts-langgraph-agent package is meant to be used as a node within a graph.
from langgraph.graph import StateGraph, START, END
# State needs to have a messages field
# ConfigSchema needs to have gpt_id and session_id fields
from your_repo import ConfigSchema, State
from ads4gpts_langgraph_agent import make_ads4gpts_langgraph_agent
graph_builder = StateGraph(State, ConfigSchema)
graph_builder.add_node("ads4gpts_node", make_ads4gpts_langgraph_agent())
Configuration
The agent requires several configuration parameters, which can be provided through environment variables or directly in the code through the make_ads4gpts_langgraph_agent constructor function:
- ADS4GPTS_API_KEY: API key for ADS4GPTs.
- ADS4GPTS_BASE_URL: Base URL for ADS4GPTs API. You can omit that to use the default settings.
- ADS4GPTS_ADS_ENDPOINT: Endpoint for fetching ads. You can omit that to use the default settings.
- PROVIDER: LLM provider (e.g., openai, anthropic, groq).
- {PROVIDER}_API_KEY: API key for the selected LLM provider e.g. OPENAI_API_KEY.
Testing
To run the tests, use the following command:
pytest tests/
License
This project is licensed under the GNU AGPLv3 License. See the LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
Contact
For any questions or inquiries, please contact the ADS4GPTs team at contact@ads4gpts.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ads4gpts_langgraph_agent-0.1.5.tar.gz.
File metadata
- Download URL: ads4gpts_langgraph_agent-0.1.5.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad1975d90e5eccbc1be6d1d7be8458ea74aedf015b8ea9757715ae4f09474fd7
|
|
| MD5 |
09c17bdafb72014cc7b150328eae1e84
|
|
| BLAKE2b-256 |
1f103c8862155a508ebd6913f4e797a1ff1d5d7c83a334eb3d1797823ec8d77e
|
File details
Details for the file ads4gpts_langgraph_agent-0.1.5-py3-none-any.whl.
File metadata
- Download URL: ads4gpts_langgraph_agent-0.1.5-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06a535febeb88d0c51c618377ec3c6a8d59674f5b874be6f1227bc50ec85d958
|
|
| MD5 |
b4e2aae323af93a497f54e42958505ce
|
|
| BLAKE2b-256 |
bda3c13b1eab71742934b350df4c6fd088bbae87ea642d8487dbfeea3ac2f0e1
|