Skip to content

Conversation

@joseph-kimberley
Copy link

- Uses OPENAI_API_URLS env var to supply map of openAI API URLs in format
  '<shorthand-1>=<url-1>,<shorthand-2>=<url-2>,...'
- Allows BricksLLM to proxy both eu.api.openai.com and api.openai.com, e.g.:
  'openai=https://api.openai.com,openai-eu=https://eu.api.openai.com'

- When using the BricksLLM proxy, supply the appropriate openai shorthand
  in the path to target a particular API endpoint:
  - http://localhost:8002/api/providers/openai/v1/chat/completions
  - http://localhost:8002/api/providers/openai-eu/v1/chat/completions

- Not a breaking change, should continue to work as normal with
  /providers/openai/...

- Unfortunately the URL (api.openai.com) and the path (/providers/openai)
  are both hardcoded in many places across the code so this touches a lot
  of files

- Using newer version of github.com/caarlos0/env package to allow parsing
  of maps
@joseph-kimberley
Copy link
Author

Resolves #97

@martin-rounds-ai
Copy link

Hi! I'd just like to know when you plan to merge this PR?
Feature could possibly close #34.

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