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

61 update openai client #62

Merged
merged 7 commits into from
Jan 5, 2024
Merged

61 update openai client #62

merged 7 commits into from
Jan 5, 2024

Conversation

mkrueger12
Copy link
Contributor

  • Updated OpenAI and Cohere so the response is marshaled into each providers given response struct then into the Unified Response

@mkrueger12 mkrueger12 linked an issue Jan 5, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jan 5, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (ff3dc22) 68.03% compared to head (79e4f45) 66.14%.

Files Patch % Lines
pkg/providers/cohere/chat.go 85.71% 2 Missing and 2 partials ⚠️
pkg/providers/openai/chat.go 96.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #62      +/-   ##
===========================================
- Coverage    68.03%   66.14%   -1.89%     
===========================================
  Files           11       11              
  Lines          463      449      -14     
===========================================
- Hits           315      297      -18     
- Misses         125      128       +3     
- Partials        23       24       +1     

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

@mkrueger12 mkrueger12 merged commit 4b66e2f into develop Jan 5, 2024
5 of 7 checks passed
@mkrueger12 mkrueger12 deleted the 61-update-openai-client branch January 5, 2024 01:56
}

// ProviderResponse contains data from the chosen provider
// ProviderResponse is the unified response from the provider.

type ProviderResponse struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this one be called ModelResponse too?

// ChatChoice is a choice in a chat response.
type ChatChoice struct {
// OpenAI Chat Response
// TODO: Should this live here?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkrueger12 I would move it under OpenAI package. api/schemas was meant to be for Glide API schemas (e.g. unified schemas for whatever endpoints we provide).

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.

Update OpenAI Client
2 participants