Skip to content

Conversation

@BinSquare
Copy link

Describe the change
Adding support for customConfigs to client creation, to support additional endpoints such as RayEndpoints.

Ref: #513

Describe your solution

Added customConfig struct + tests.

Tests
Briefly describe how you have tested these changes.

Added unit test + manual test

Additional context
Add any other context or screenshots or logs about your pull request here. If the pull request relates to an open issue, please link to it.

Issue: #513

@codecov
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Merging #559 (309bab4) into master (08c167f) will increase coverage by 0.09%.
Report is 3 commits behind head on master.
The diff coverage is 100.00%.

❗ Current head 309bab4 differs from pull request most recent head a9221a1. Consider uploading reports for the commit a9221a1 to get more accurate results

@@            Coverage Diff             @@
##           master     #559      +/-   ##
==========================================
+ Coverage   97.88%   97.97%   +0.09%     
==========================================
  Files          20       21       +1     
  Lines         991     1037      +46     
==========================================
+ Hits          970     1016      +46     
  Misses         15       15              
  Partials        6        6              
Files Coverage Δ
completion.go 100.00% <ø> (ø)
config.go 92.30% <100.00%> (+3.02%) ⬆️

... and 2 files with indirect coverage changes

@BinSquare
Copy link
Author

Closing, these changes are too specific for my needs and doesn't suit this package.

I'll refactor and re-open one more tailored for go-openai

@BinSquare BinSquare closed this Nov 9, 2023
@vvatanabe
Copy link
Collaborator

vvatanabe commented Nov 9, 2023

@BinSquare

FIY We can already.

cfg := openai.DefaultConfig("openai_api_key")
cfg.BaseURL = "CUSTOM_ENDPOINTS"

Context: #481 (comment)

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.

2 participants