Conversation
xiaohk
left a comment
There was a problem hiding this comment.
Thanks for the PR! This template setting was from https://github.com/mlc-ai/web-llm/blob/ca1c3486755462dfcdc32699c651275e3fd863ce/src/conversation.ts#L158. Could you please explain your fix? Web LLM might have some different template format than other frameworks.
xiaohk
left a comment
There was a problem hiding this comment.
Hi! Thanks for the PR!
I didn't think about any other base URLs for OpenAI. What are some use cases for other base URLs?
Oh I see. It seems they have changed the format at some point. Thank you so much for noticing it and adding a fix! Can you tell me more about the base URL please? |
Base URL UsageOpenAI's base URL is the API endpoint used for accessing services provided by OpenAI. By configing a different base url, user can access openai's services by forwarding. In fact, it is supported in the official SDK For example, when user cannot directly acess the offical endpoint (https://api.openai.com/v1) due to network, they can deploy their own endpoint, just like Deploy a Worker that connects to OpenAI via AI Gateway. By using self-hosted endpoint, user can also manage their requests (quato limit, ratio limit, get an overview of usage). Whats more, some user may choose a third-party openai api service provider (lower price, company's platform or any other reasons), so they need to config the base url. About the commitBase url is an optional configuration. I have set the default of base url, when user did not config it , the base url is the offical one. This means the commit is not destructive and will not interfere with existing uses. For the consistency of code processing logic, the About the fix in web-llmActually i dont know how to fix it, changes made in web-llm is just to shut up the builder. 🤣 So further fixes are needed. |
No description provided.