From 16229f5e8179cd227b92dd0ff7e6d36d1ebf621c Mon Sep 17 00:00:00 2001 From: CarsonRoscoe Date: Fri, 14 Mar 2025 18:03:20 -0400 Subject: [PATCH 1/2] chore: added readme tip to surpress warning --- .../templates/beginner/{README.md => README.md.jinja} | 6 ++++++ .../templates/chatbot/{README.md => README.md.jinja} | 6 ++++++ 2 files changed, 12 insertions(+) rename python/create-onchain-agent/templates/beginner/{README.md => README.md.jinja} (93%) rename python/create-onchain-agent/templates/chatbot/{README.md => README.md.jinja} (88%) diff --git a/python/create-onchain-agent/templates/beginner/README.md b/python/create-onchain-agent/templates/beginner/README.md.jinja similarity index 93% rename from python/create-onchain-agent/templates/beginner/README.md rename to python/create-onchain-agent/templates/beginner/README.md.jinja index 2a40f58b1..e5c1ca895 100644 --- a/python/create-onchain-agent/templates/beginner/README.md +++ b/python/create-onchain-agent/templates/beginner/README.md.jinja @@ -26,6 +26,12 @@ Finally, run the chatbot: `poetry run python chatbot.py` +{% if _framework == "openai_agents" %}Note: If you are seeing the log `OPENAI_API_KEY is not set, skipping trace export`, fix it by exporting the OPENAI_API_KEY in your terminal. + +```sh +export OPENAI_API_KEY= +``` +{% endif %} ## Project Architecture This template creates a secure AI agent with its own wallet. Let's explore how each component works together: diff --git a/python/create-onchain-agent/templates/chatbot/README.md b/python/create-onchain-agent/templates/chatbot/README.md.jinja similarity index 88% rename from python/create-onchain-agent/templates/chatbot/README.md rename to python/create-onchain-agent/templates/chatbot/README.md.jinja index a65df09c0..4a0d7e7fe 100644 --- a/python/create-onchain-agent/templates/chatbot/README.md +++ b/python/create-onchain-agent/templates/chatbot/README.md.jinja @@ -26,6 +26,12 @@ Finally, run the chatbot: `poetry run python chatbot.py` +{% if _framework == "openai_agents" %}Note: If you are seeing the log `OPENAI_API_KEY is not set, skipping trace export`, fix it by exporting the OPENAI_API_KEY in your terminal. + +```sh +export OPENAI_API_KEY= +``` +{% endif %} ## Configuring Your Agent You can [modify your agent configuration](https://github.com/coinbase/agentkit/tree/main/typescript/agentkit#usage) in the `chatbot.py` file. From d0ff6152beeb012633e4ef8d3a175d36fe3bc5fe Mon Sep 17 00:00:00 2001 From: CarsonRoscoe Date: Fri, 14 Mar 2025 18:07:17 -0400 Subject: [PATCH 2/2] chore: added tip to agents example readme --- python/examples/openai-agents-sdk-cdp-chatbot/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/examples/openai-agents-sdk-cdp-chatbot/README.md b/python/examples/openai-agents-sdk-cdp-chatbot/README.md index fae160e4b..fb2cac466 100644 --- a/python/examples/openai-agents-sdk-cdp-chatbot/README.md +++ b/python/examples/openai-agents-sdk-cdp-chatbot/README.md @@ -39,4 +39,10 @@ poetry install ```bash poetry run python chatbot.py -``` \ No newline at end of file +``` + +Note: If you are seeing the log `OPENAI_API_KEY is not set, skipping trace export`, fix it by exporting the OPENAI_API_KEY in your terminal. + +```sh +export OPENAI_API_KEY= +``` \ No newline at end of file