Skip to content

OpenAI assistant, SK function and code interpeter - c# #8563

Closed Answered by crickman
JP-droidic asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @JP-droidic , this is an interesting case. I would note that if you update the code-interpeter file-ids in agent's definition then that will affect all instances of that agent. Since you are retrieving the same agent for use with multiple requests, it may make sense to associate the file at the thread-level.

This may be accomplished using OpenAIThreadCreationOptions:

https://github.com/microsoft/semantic-kernel/blob/main/dotnet/src/Agents/OpenAI/OpenAIThreadCreationOptions.cs#L16
https://github.com/microsoft/semantic-kernel/blob/main/dotnet/src/Agents/OpenAI/OpenAIAssistantAgent.cs#L162

OpenAIThreadCreationOptions options = new() { CodeInterpreterFileIds =[fileId] };
string threadId =

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@crickman
Comment options

Answer selected by sophialagerkranspandey
@JP-droidic
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
.NET Issue or Pull requests regarding .NET code agents
3 participants