Closed yiwaixiao closed 11 months ago
Thank you for checking out our whatsapp-ai-bot
@yiwaixiao this error is saying your maximum text limit has been exceeded. check this error
- "message": "This model's maximum context length is 4097 tokens.
- However, you requested 4246 tokens (1246 in the messages, 3000 in the completion).
- Please reduce the length of the messages or completion."
chat-gpt
latest models that have more token limit check out more heresrc/whatsapp-ai.config.ts
chatGPTModel: "gpt-3.5-turbo"
to chatGPTModel: "gpt-4-32k"
OR add a model of your choice inside chatGPTModel: "mode_name"
it is essential to note that these operations come at a cost charged by OpenAI and Stability AI for every request made. Please be aware that WhatsApp does not support bots or unofficial clients on its platform, so using this method is not entirely secure and could lead to getting blocked.
Thank you very much. The problem has been resolved Also, may I ask if I could find a way to configure the openai API URL? I would like to use WhatsApp ai bot to connect with GPTs with knowledge base capabilities to enhance WhatsApp AI's customer service capabilities. The existing knowledge base GPT aligns with the official capabilities of the openai API, and only needs to be able to configure the openai API URL. For example, add a base URL field in:. env to customize the configuration of the openai API URL, without filling in the default support for the official openai API May I ask if it is possible to support it? Please provide guidance. If not, can I upgrade and make changes? I can pay the appropriate fee. Thank you!
I cannot understand your problem please can you provide some more details what do you means by I could find a way to configure the openai API URL?
?
also provide some examples to make me understand.
Your question seems like XY Problem please clearly describe what you exactly want to achieve also provide some examples if possible.
As shown in the example in the figure, add a 'BASE' URL. If this value is not filled in, it defaults to apiopenai.com. If it is filled in, use 'BASE' URL to request openai
Check this package chatgpt i'm using in this repository.
As shown in the example in the figure, add a 'BASE' URL. If this value is not filled in, it defaults to apiopenai.com. If it is filled in, use 'BASE' URL to request openai
As shown in the example in the figure, add a 'BASE' URL. If this value is not filled in, it defaults to apiopenai.com. If it is filled in, use 'BASE' URL to request openai
still, I'm not getting please explain what exactly you want to achieve. You're thinking if you managed to achieve X your Y problem will be solved automatically. So, Instead of describing X problem explain exactly what you want to achieve.
Simply put, to be able to customize the OpenAI API endpoint in the .env file. By default, the whatsapp-ai-bot communicates with the OpenAI API using https://api.openai.com/v1. Now, I need to be able to customize the OpenAI API address in the .env file, for example, change it to https://api.abc.com/v1.
As shown in the following figure, add an OPENAI in. env BASE URL used to proxy access to openai
I'm using chat-gpt package. This package is responsible for sending requests to OPEN AI you can go to their repo and ask same question i think they can help you
Thank you for providing the whatsapp-ai-bot. I tested it and it's a great application. However, I encountered the following issue during the trial. Whenever I engage in a few rounds of chat, I receive the following error. Is this a bug in the program or is there something that needs to be adjusted? Please advise.