Repository navigation
[Question]: How do I set up the app to accept GPT-4-32K? #1077
Contact DetailsNo response What is your question?How do I set up the app to accept GPT-4-32K? Keeps giving me crap about token limit of 4K. Thanks! More DetailsSomething went wrong. Here's the specific error message we encountered: Encountered an error while attempting to respond. Error: This model's maximum context length is 4097 tokens. However, your messages resulted in 4849 tokens (4737 in the messages, 112 in the functions). Please reduce the length of the messages or functions. What is the main subject of your question?No response ScreenshotsNo response Code of Conduct
|
Replies: 3 comments 1 reply
|
Do you have git installed? can you check what is the latest git commit by sharing the logs from I think you are on an old version of the app, I say this because I've since added tests for this exact thing: describe('getModelMaxTokens', () => {
test('should return correct tokens for exact match', () => {
expect(getModelMaxTokens('gpt-4-32k-0613')).toBe(32767);
});
test('should return correct tokens for partial match', () => {
expect(getModelMaxTokens('gpt-4-32k-unknown')).toBe(32767);
});Just You should also share the output of your logs since this might just be an issue with you trying to use gpt-4-32k without having access to it. The easiest way to update (if you haven't made significant conflicting changes) is to have npm and git installed and use the following command from the root of project directory: npm run update |
|
Thanks Danny. Btw what at an amazing app you built. It really has almost everything one can think of. Crazy. I do have 32k, I use it all the time. Here is the git log. PS C:\LibreChat> git log -1 Do you have any tech docs? I would love to read them. For instance, I don't get what your app is doing on the back to deal with messages, what is search doing, are you doing anything to improve memory over time, like doing cos sim on the messages dynamically to bring about the best matches in conversation, etc? So many questions about logic. I can spend time reviewing your code, but thought I would ask first. I thought maybe that's the issue, since it seems to be pulling many messages in the call. But it seems it is more related to how langchain is processing the models. It seems it has the 4K token max limit hardcoded in their python module, maybe because people don't have access to larger models? |
|
Thanks Danny. So I found the thing in ChatGPTClient.js. I modified the code to this to accepts dif max tokens per model selected. That did it. |

Thanks Danny.
So I found the thing in ChatGPTClient.js. I modified the code to this to accepts dif max tokens per model selected. That did it.