Closed sevzas closed 7 months ago
Interesting, the playground examples worked without that. I will check in the evening what was changed on OpenAI side.
I need a bit more time to solve this issue
Thanks for the update... Looking forward to a resolution.
Fixed in v1.3.3. Thanks sevzas!
I tried v1.3.3 and I get a new error on code that used to work. I'm using .Net Framework 4.8 without dependency injection.
When I call
OpenAIService.CreateService(opts)
I get:
System.InvalidOperationException: 'No constructor for type 'Forge.OpenAI.Services.Endpoints.OpenAIProviderEndpointService' can be instantiated using services from the service container and default values.'
Thanks for the feedback! I fixed the issue and released v1.3.4.
I appreciate your timely fixes...
looks like there is (at least) one bug remaining in RunService.CreateThreadAndRunAsync():
When you call _apiHttpService.PostAsync on line 91, the first parameter "_options.RunThreadAndRunCreateUri" is incorrect because it is missing the "/v1/" segment that all of the other invocations of _apiHttpService.PostAsync have. This is because the first parameter's value is built with GetXXXXXXXUri() in all of the other places.
Thank you, I am really appreciate to help me to test the SDK. I fixed this URL issue and released a new one. If you have more, send them here :)
I am now able to send a request using RunService.CreateThreadAndRunAsync() . Thank you.
This line appears in AssistantService:
_apiHttpService.DefaultRequestHeaders.Add("OpenAI-Beta", "assistants=v1");
based on the curl examples on the OpenAi web site, such as https://platform.openai.com/docs/api-reference/threads it appears that the following services also need this line: ThreadsService, MessageService, RunService and RunStepService.
I suspect that this missing line is the cause of me seeing this error message while trying to call RunSvc.CreateThreadAndRunAsync(runRequest).Result
{ "error": { "type": "invalid_request_error", "code": "unknown_url", "message": "Unknown request URL: POST /threads/runs. Please check the URL for typos, or see the docs at https://platform.openai.com/docs/api-reference/.", "param": null } }