Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Assistant Tool Function Methods to be updated #299

Closed
Tracked by #309
Bodekaer opened this issue May 15, 2024 · 2 comments · Fixed by #309 or RageAgainstThePixel/com.openai.unity#235
Closed
Tracked by #309
Assignees
Labels
enhancement New feature or request

Comments

@Bodekaer
Copy link

Bodekaer commented May 15, 2024

@StephenHodgson do you know how to assign local methods to Assistant functions when using the RetrieveAssistantAsync() method, where the OpenAI server-side assistant already has defined functions?

I find the documentation unclear on this, and so far been unable to find a way to assign a method to an existing list of tools.

E.g. I would have expected something like:

_assistant = await _openai.AssistantsEndpoint.RetrieveAssistantAsync(assistantId);
foreach (var tool in _assistant.Tools){
   tool.Function.Method = myLocalMethod;
}
@Bodekaer Bodekaer added the enhancement New feature or request label May 15, 2024
@StephenHodgson StephenHodgson transferred this issue from RageAgainstThePixel/com.openai.unity May 15, 2024
@StephenHodgson StephenHodgson self-assigned this May 15, 2024
@StephenHodgson
Copy link
Member

StephenHodgson commented May 15, 2024

I'll add this along with ability to update tools to fix #298 and #303

@StephenHodgson StephenHodgson changed the title Cannot assign local methods to _retrieved_ Assistant Tool Functions Enable Assistant Tool Function Methods to be updated May 15, 2024
@StephenHodgson StephenHodgson mentioned this issue Jun 10, 2024
7 tasks
@StephenHodgson
Copy link
Member

StephenHodgson commented Jun 10, 2024

Ok, after looking into this more closely I don't feel like it is appropriate to be able to update the method to call.

I did add the ability to unregister a tool, and register a new one if you need to update it for some reason like this.

Don't forget you can always parse out the args/params yourself and then invoke it on the target/method directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
2 participants