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

Fix for broken Azure Threads url #668

Merged
merged 7 commits into from
Feb 26, 2024
Merged

Fix for broken Azure Threads url #668

merged 7 commits into from
Feb 26, 2024

Conversation

coggsflod
Copy link
Contributor

@coggsflod coggsflod commented Feb 22, 2024

Threads API is broken for Azure OpenAI implementation returning a 404 error

Expected URL = https://your_resource_name.openai.azure.com/openai/threads?api-version=2024-02-15-preview
Current URL = https://your_resource_name.openai.azure.com/openai/deployments/UNKNOWN/threads?api-version=2024-02-15-preview

Link to Microsoft docs: https://github.com/MicrosoftDocs/azure-docs/blob/bb63f74fabd8a70267e1ab2960773f706c8c50c3/articles/ai-services/openai/assistants-reference-threads.md

Fix removes /deployments/UNKNOWN/ by using same approach for /models /assistants API

Added unit tests for Azure Threads API

FYI, this fix also addresses same issue with messages & runs APIs

@coggsflod coggsflod marked this pull request as ready for review February 22, 2024 13:07
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.44%. Comparing base (7381d18) to head (2056bc7).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #668   +/-   ##
=======================================
  Coverage   98.44%   98.44%           
=======================================
  Files          24       24           
  Lines        1347     1353    +6     
=======================================
+ Hits         1326     1332    +6     
  Misses         15       15           
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

client.go Outdated Show resolved Hide resolved
@coggsflod
Copy link
Contributor Author

@sashabaranov any further comments / issues you'd like to address?

@sashabaranov
Copy link
Owner

Thank you!

@sashabaranov sashabaranov merged commit c5401e9 into sashabaranov:master Feb 26, 2024
3 checks passed
@coggsflod coggsflod deleted the azure_assistants_fix branch February 26, 2024 11:49
grulex pushed a commit to grulex/go-openai that referenced this pull request Mar 15, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants