Conversation
…sage for memoryStores
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/CodeInterpreterAgent.java
Outdated
Show resolved
Hide resolved
* Added computer use sample * Renamed sample * Added async sample
jpalvarezl
left a comment
There was a problem hiding this comment.
There is a few fundamental changes we need to make to this sample. It's mostly good, but I think we can simplify it a bit. Let's talk in our standup about it :)
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/AsyncCodeInterpreterAgent.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/AsyncCodeInterpreterAgent.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/AsyncCodeInterpreterAgent.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/AsyncCodeInterpreterAgent.java
Outdated
Show resolved
Hide resolved
|
|
||
| AgentVersionDetails agent = null; | ||
|
|
||
| try { |
There was a problem hiding this comment.
nit: you probably don't need this try as you are not catching anything. You can also get rid of the finally.
There was a problem hiding this comment.
I used try-finally for guaranteed cleanup (eg. if an exception occurs after agent creation), but I can simplify it if that's preferred for readability.
There was a problem hiding this comment.
that's good, in that case you should then add a catch block for printing the error. Generally try are used with a catch block so, it's okay to use as long as we are catching something. In my experience, just using try/finally is not so common, you'd generally use all 3 blocks.
Issue #47763
This pull request adds sample files demonstrating tool use with Azure AI Agents.