You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
According to the source code and all of the examples and documentation, this method takes an OpenAIAssistantConfiguration object as the second parameter, but when I use it, IntelliSense tells me I must use an OpenAIClientProvider object. In fact, OpenAIAssistantConfiguration is not defined. Am I missing a NuGet package or did the implementation change?
I am using OpenAIClientProvider.ForAzureOpenAI(_apiKey, new Uri(_endpoint)) for the parameter, but when it's executed, I get an exception: "HTTP 404 (invalid_request_error: ) Invalid URL (POST /v1/assistants)" with this stack trace:
at Azure.AI.OpenAI.ClientPipelineExtensions.<ProcessMessageAsync>d__0.MoveNext()
at System.Threading.Tasks.ValueTask`1.get_Result()
at Azure.AI.OpenAI.Assistants.AzureAssistantClient.<CreateAssistantAsync>d__4.MoveNext()
at OpenAI.Assistants.AssistantClient.<CreateAssistantAsync>d__46.MoveNext()
at Microsoft.SemanticKernel.Agents.OpenAI.OpenAIAssistantAgent.<CreateAsync>d__23.MoveNext()
at SKLasVegas.Program.<Agents>d__9.MoveNext() in C:\Users\MYeager\Dropbox\AI\SK DevIntersections Las Vegas 2024\SampleCode\SKVegas\Program.cs:line 208
at SKLasVegas.Program.<Main>d__3.MoveNext() in C:\Users\MYeager\Dropbox\AI\SK DevIntersections Las Vegas 2024\SampleCode\SKVegas\Program.cs:line 34
Here is my code...
OpenAIAssistantAgent agent =
await OpenAIAssistantAgent.CreateAsync(
kernel: kernel,
clientProvider: OpenAIClientProvider.ForAzureOpenAI(_apiKey, new Uri(_endpoint)),
definition: new OpenAIAssistantDefinition(_defaultDeployment)
{
Description = "This is a test agent",
EnableCodeInterpreter = true,
EnableFileSearch = true,
EnableJsonResponse = true,
//ExecutionOptions = new OpenAIAssistantExecutionOptions { }
Instructions = "This is a test agent", //system instructions
Name = "MyAgent",
Temperature = (float?)0.9,
//VectorStoreId = "??",
});
Platform
OS: windows 11 x64
IDE: Visual Studio 2022
Language: C#
Thanks in advance.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Bug: Can't create OpenAIAssistantAgent with CreateAsync()
.Net: Bug: Can't create OpenAIAssistantAgent with CreateAsync()
Aug 23, 2024
Describe the bug
According to the source code and all of the examples and documentation, this method takes an OpenAIAssistantConfiguration object as the second parameter, but when I use it, IntelliSense tells me I must use an OpenAIClientProvider object. In fact, OpenAIAssistantConfiguration is not defined. Am I missing a NuGet package or did the implementation change?
I am using OpenAIClientProvider.ForAzureOpenAI(_apiKey, new Uri(_endpoint)) for the parameter, but when it's executed, I get an exception: "HTTP 404 (invalid_request_error: ) Invalid URL (POST /v1/assistants)" with this stack trace:
Here is my code...
Platform
Thanks in advance.
The text was updated successfully, but these errors were encountered: