Where is OpenAI Assistant ToolResources definition on C#?

hina02 0 Reputation points
2024-09-21T06:50:58.0966667+00:00
AssistantCreationOptions assistantCreationOptions = new AssistantCreationOptions("gpt-4o")
24{ 
25  Name = "Assistant587",
26  Instructions = "",
27  Tools = { ToolDefinition.CreateCodeInterpreter() },
28  ToolResources = {"file_search":{"vector_store_ids":[]}},
29  Temperature = 1,
30  TopP = 1
31};

OpenAI AI Studio page shows this code from display code button.

But still no ToolResources field definition on AssistantCreationOptions.

I have Azure.AI.OpenAI.Asssistants version 1.0.0-beta.4.

Where is this definition?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,874 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,983 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. msfteppner 166 Reputation points
    2024-09-24T03:22:07.4233333+00:00

    Hi Hina02,

    Thanks for your message.

    It seems that the ToolResources property you're trying to use is not directly available in the AssistantCreationOptions class in version 1.0.0-beta.4 of the Azure.AI.OpenAI.Assistants SDK.

    The code snippet from the OpenAI AI Studio includes ToolResources, but this property might not be part of the current Azure SDK for .NET. The AI Studio may generate code that reflects the API capabilities, but the SDK could lag behind in exposing all those features.

    You can set the ToolResources indirectly using the Properties dictionary in AssistantCreationOptions.

    Let me know if this helps or if you have any other questions!
    Regards,

    T.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.