File tree Expand file tree Collapse file tree
a2a/a2a_currency_converter/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020memory = MemorySaver ()
2121
2222class Configuration (BaseSettings ):
23+ """The configuration of the Agent"""
24+
2325 llm_model : str = "gpt-4o"
2426 llm_api_base : str = ""
25- # We don't want the pod to crash without a valid key. Report authentication error to A2A user instead.
27+ # We don't want the pod to crash without a valid key.
28+ # Report authentication error to A2A user instead.
2629 llm_api_key : str = os .getenv ("OPENAI_API_KEY" , "Failed to load env var OPENAI_API_KEY" )
2730
2831
Original file line number Diff line number Diff line change @@ -97,8 +97,10 @@ async def execute(
9797
9898LLM_API_BASE is { os .getenv ("LLM_API_BASE" , "undefined" )}
9999
100- Error: { e } """
100+ Use `kubectl -n <namespace> logs deployment/<agent-name>` for details.
101+ """
101102 logger .error (msg = msg )
103+ logger .error (msg = f"Raw InternalServerError: { e } " )
102104 updater .update_status (
103105 TaskState .input_required ,
104106 new_agent_text_message (
@@ -115,12 +117,13 @@ async def execute(
115117When importing this agent into Kagenti, expand Environment Variables and Add Variable,
116118or import https://github.com/kagenti/agent-examples/blob/main/a2a/a2a_currency_converter/.env.openai
117119
120+ Use `kubectl -n <namespace> logs deployment/<agent-name>` for details.
121+
118122Also check
119123`kubectl -n <namespace> get secret openai-secret -o jsonpath="{ '{' } .data.apikey{ '}' } " | base64 -d`
120- The key should match your OpenAI key.
121-
122- { e } """
124+ The key should match your OpenAI key."""
123125 logger .error (msg = msg )
126+ logger .error (msg = f"Raw AuthenticationError { e } " )
124127 updater .update_status (
125128 TaskState .input_required ,
126129 new_agent_text_message (
You can’t perform that action at this time.
0 commit comments