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

OpenAI.Assistants.ToolsOverride is readonly #60

Closed
dmeyeroc opened this issue Jun 14, 2024 · 3 comments
Closed

OpenAI.Assistants.ToolsOverride is readonly #60

dmeyeroc opened this issue Jun 14, 2024 · 3 comments

Comments

@dmeyeroc
Copy link

The ToolsOverride property in OpenAI.Assistants appears to be defined as readonly. I'd like to use the property as I believe it is intended, which is to override the tools of my chosen assistant on a per-run basis.

Perhaps this is merely a fact of the setter/init not being implemented yet, or perhaps this is a mistake. Please add support or update the documentation to better demonstrate how this is to be done.

    //
    // Summary:
    //     A run-specific collection of tool definitions that will override the assistant-level
    //     defaults. If not provided, the assistant's defined tools will be used. Available
    //     tools include:
    //
    //     • code_interpreter - OpenAI.Assistants.CodeInterpreterToolDefinition - works
    //     with data, math, and computer code
    //     • file_search - OpenAI.Assistants.FileSearchToolDefinition - dynamically enriches
    //     an Run's context with content from vector stores
    //     • function - OpenAI.Assistants.FunctionToolDefinition - enables caller-provided
    //     custom functions for actions and enrichment
    [CodeGenMember("Tools")]
    public IList<ToolDefinition> ToolsOverride { get; } = new ChangeTrackingList<ToolDefinition>();
@dspear
Copy link

dspear commented Jun 14, 2024

@dmeyeroc You should be able to initialize it with a static list, like { tool1, tool2 }, or by explicitly using Add, like x.ToolsOverride.Add(tool1), etc.

@dmeyeroc
Copy link
Author

Ahh yes I see that now. Thanks for the quick response!

@KrzysztofCwalina
Copy link
Collaborator

@dmeyeroc, It seems like you have a resolution. I will close the issue then. Please feel free to reopen if you still run into problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants