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
Several of the AI model implementations add /v1/<path-to-functionality> to the base url. For example the base url in OpenAiConnectionProperties is https://api.openai.com. The class OpenAIApi adds the path but hardcodes the /v1 part.
restClient.post().uri("/v1/chat/completions")
This is done in other AI API implementations. If there is a need to switch to a future v2 then we would need a code change.
Maybe we should make this a configuration property or some other way so that adopting to new versions of endpoints does not require a code change.
this issue was driven by a comment that the official Python api for openai attached assigns api.openai.com/v1 as the base url.
The text was updated successfully, but these errors were encountered:
After thinking about it, is also likely that a v2 of the endpoint would have a different api so a different implementation class would be needed and that is where the v2 should be added to the base url.
So we should keep everything the way it is and follow the correct definition of what is a base url.
The base url strictly speaking is api.openai.com , see https://developer.mozilla.org/en-US/docs/Web/API/URL/URL and other libraries (like the official Python client for open ai) that add “v1” to the base url is wrong. Those libraries will need to likely remove the v1 from their wrongly assigned base url variable once there is a v2.
Several of the AI model implementations add
/v1/<path-to-functionality>
to the base url. For example the base url inOpenAiConnectionProperties
ishttps://api.openai.com
. The classOpenAIApi
adds the path but hardcodes the/v1
part.This is done in other AI API implementations. If there is a need to switch to a future
v2
then we would need a code change.Maybe we should make this a configuration property or some other way so that adopting to new versions of endpoints does not require a code change.
this issue was driven by a comment that the official Python api for openai attached assigns api.openai.com/v1 as the base url.
The text was updated successfully, but these errors were encountered: