OpenBMB / ChatDev

Create Customized Software using Natural Language Idea (through LLM-powered Multi-Agent Collaboration)
https://arxiv.org/abs/2307.07924
Apache License 2.0
25.29k stars 3.17k forks source link

Report a bug when you switch to use third base url #348

Closed kirinzer closed 7 months ago

kirinzer commented 8 months ago

Because the api of a third-party service provider is used, the BASE_URL is changed. export BASE_URL="https://aaa.bbb.ccc/" However, it has not taken effect, and a 405 error code will be output in the console. By querying the API document, I learned that the third-party API and the API of Open AI are completely consistent. The problem was discovered by observing the log in the project directory built by WareHouse. When BASE_URL is not set, that is, under normal circumstances, the request address is https://api.openai.com/v1/chat/completions After setting BASE_URL, the request address changes to https://aaa.bbb.ccc/chat/completions The v1 part is missing in the middle. In order to verify this guess, I made the following modifications export BASE_URL="https://aaa.bbb.ccc/v1" Smooth execution