Skip to content

Commit 540e45c

Browse files
committed
Logging improvements
Signed-off-by: Ed Snible <snible@us.ibm.com>
1 parent eb2aadc commit 540e45c

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

a2a/a2a_currency_converter/app/agent_executor.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,12 @@ async def execute(
9191
break
9292

9393
except InternalServerError as e:
94-
msg=f"""CurrencyAgentExecutor reports an InternalServerError error.\n
95-
This can happen if the agent's LLM_API_BASE environment variable does not point to an OpenAI server.\n
96-
LLM_API_BASE is {os.getenv("LLM_API_BASE", "undefined")}\n
94+
msg=f"""CurrencyAgentExecutor reports an InternalServerError error.
95+
96+
This can happen if the agent's LLM_API_BASE environment variable does not point to an OpenAI server.
97+
98+
LLM_API_BASE is {os.getenv("LLM_API_BASE", "undefined")}
99+
97100
Error: {e}"""
98101
logger.error(msg=msg)
99102
updater.update_status(
@@ -107,12 +110,15 @@ async def execute(
107110
)
108111

109112
except AuthenticationError as e:
110-
msg=f"""CurrencyAgentExecutor reports an authentication error.\n
113+
msg=f"""CurrencyAgentExecutor reports an authentication error.
114+
111115
When importing this agent into Kagenti, expand Environment Variables and Add Variable,
112-
or import https://github.com/kagenti/agent-examples/blob/main/a2a/a2a_currency_converter/.env.openai\n
116+
or import https://github.com/kagenti/agent-examples/blob/main/a2a/a2a_currency_converter/.env.openai
117+
113118
Also check
114-
`oc -n team1 get secret openai-secret -o jsonpath="{'{'}.data.apikey{'}'}" | base64 -d`
115-
The key should match your OpenAI key.\n
119+
`kubectl -n <namespace> get secret openai-secret -o jsonpath="{'{'}.data.apikey{'}'}" | base64 -d`
120+
The key should match your OpenAI key.
121+
116122
{e}"""
117123
logger.error(msg=msg)
118124
updater.update_status(

0 commit comments

Comments
 (0)