Comments (3)
In https://github.com/cogentapps/chat-with-gpt/blob/1be33f5d0b0cdd8b35e7cab1a5d6bdffb6cec2ba/app/src/tokenizer.ts#L49there is code that should limit the messages, but maybe there is a bug or something? Trying to reproduce this.
from chat-with-gpt.
@tluyben Thank you for devoting your time to this issue. To reproduce this you just have to have a long enough conversation. Let's see how long mine was.
┌──(frajder㉿workstation)-[/tmp/msg_count]
└─$ user_msg_count=$(cat long_conversation.htm | grep '<div class="message by-user' | wc -l) && \
assistant_msg_count=$(cat long_conversation.htm | grep '<div class="message by-assistant' | wc -l) && \
total_characters=$(python3 -c "import re; print(len(''.join(re.findall(r'<p>(.*?)<\/p>', open('long_conversation.htm', 'r').read(), re.DOTALL))))" | awk '{print $1}') && \
echo "Total number of user messages: $user_msg_count | Total number of assistant messages: $assistant_msg_count | Total characters: $total_characters"
Total number of user messages: 37 | Total number of assistant messages: 37 | Total characters: 28065
┌──(frajder㉿workstation)-[/tmp/msg_count]
└─$ # ok maybe that was not the most reliable way...
┌──(frajder㉿workstation)-[/tmp/msg_count]
└─$ scp w:~/dockers/chatgpt-ui/data/* .
chat.sqlite
object-store.sqlite
┌──(frajder㉿workstation)-[/tmp/msg_count]
└─$ user_msg_count=$(sqlite3 chat.sqlite "select count(id) from messages where chat_id = '8bb13ebe-8e68-400d-b920-bf1002f6cd04' and data like '%\"role\":\"user\"%';") && \
assistant_msg_count=$(sqlite3 chat.sqlite "select count(id) from messages where chat_id = '8bb13ebe-8e68-400d-b920-bf1002f6cd04' and data like '%\"role\":\"assistant\"%';") && \
total_characters=$(sqlite3 chat.sqlite "SELECT json_extract(data, '$.content') as content FROM messages WHERE chat_id = '8bb13ebe-8e68-400d-b920-bf1002f6cd04';" | awk '{ sum += length } END { print sum }')
┌──(frajder㉿workstation)-[/tmp/msg_count]
└─$ echo "Total number of user messages: $user_msg_count | Total number of assistant messages: $assistant_msg_count | Total characters: $total_characters"
Total number of user messages: 37 | Total number of assistant messages: 37 | Total characters: 25259
So, in my case, there were a total of 37 messages sent and received, for a combined total of 74. The total number of characters was somewhere between 25,000 and 30,000.
They said GPT-4 is good for coding. Let's give it a shot, see here: Problem-with-long-conversations_63-GPT4_attempt.md 😂😂😂
from chat-with-gpt.
Thanks for the detailed report!
This should be fixed by b6881c6.
from chat-with-gpt.
Related Issues (20)
- Using Elevenlabs Streaming Endpoint for faster T2S responses...
- Docker Run Error
- Is it possible to switch the AI model being used beyond the ones choosable in the UI?
- Save the API keys also in the profile so you can login on different devices?
- Feature request: Support other LLMs
- Is it possible to specify custom api URL
- Config.yaml not recognized HOT 1
- System prompt is forgotten between browsers
- Hosted version is down, https://www.chatwithgpt.ai HOT 14
- Fail to build the docker image
- How to enable proxy mode?
- D-ID integration. use the D-ID api to create a streaming portrait animation from an image and the AI responses
- Context lost suddenly and new messages ignored
- Maintained fork: https://github.com/jp-ipu/chat-with-gpt HOT 2
- OIDC Integration for User Authentication in Chat-with-GPT App
- Streaming issue (maybe) HOT 4
- Your hosted web app is down
- GPT4 Turbo HOT 1
- Maintained with new models
- Integrate APIpie.ai
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chat-with-gpt.