You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirm this is a feature request for the Python library and not the underlying OpenAI API.
This is a feature request for the Python library
Describe the feature or improvement you're requesting
Some providers have custom endpoint for calling models.
For ex https://api.minimax.chat/v1/text/chatcompletion_v2
If we used python library with base url of https://api.minimax.chat/v1 final request is being made on https://api.minimax.chat/v1/chat/completions which doesn't exist.
Instead of hardcoding path /chat/completions param So lets add option for specifying custom path.
Example:
fromopenaiimportOpenAIclient=OpenAI()
completion=client.chat.completions.create(
model="custom_model",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
custom_path="text/chatcompletion_v2"
)
print(completion.choices[0].message)
Additional context
No response
The text was updated successfully, but these errors were encountered:
Confirm this is a feature request for the Python library and not the underlying OpenAI API.
Describe the feature or improvement you're requesting
Some providers have custom endpoint for calling models.
For ex
https://api.minimax.chat/v1/text/chatcompletion_v2
If we used python library with base url of
https://api.minimax.chat/v1
final request is being made onhttps://api.minimax.chat/v1/chat/completions
which doesn't exist.Instead of hardcoding path
/chat/completions
param So lets add option for specifying custom path.Example:
Additional context
No response
The text was updated successfully, but these errors were encountered: