The app https://fat-chatgpt.vercel.app/
The code here https://github.com/Onigam/fat-chatgpt
#Fat GPT: Huge text request on ChatGPT
55 messages ยท Page 1 of 1 (latest)
Love it ! It is very useful for research paper summarization. I hope you are not storing the API keys
It is giving me this error. It was working fine earlier:
yep same^^
@charred path how do I solve this error?
thank you for your project , but I want to know , if I input the long text to let chatGPT help me do the translate work, then the input text area cannot be splited just by 3000, it should consider the paragraph, and also, after translated, the output text should keep the orginal format to let user copy out ( or maybe can add a buttom to download as Word ?)
Hello the error has been solved
Yes you are right it is a simple split I should improve it using a regular expression that split the text in a smarter way
I trying the app with 100k characters without any issue since I published the fix
I suggest to split the long text by \n\n if it has, and I also hope it can keep the text format ( such like font, color etc, if I copy them from Word )
I would recommend implements a fix where new lines should be recognized, for example with prompts that require new lines (example, lengthy text transformed into a poem) and also add a warning that adding more text to the input costs more OpenAI credits (I ran out of credits, in part thanks to Fat GPT)
For example: Transform this text into a sonnet
Result: Weep for our fallen leader, (redacted), Who faced unjust charges and was locked away. Five years in prison she was forced to be, While her accusers' lies went on display. Her plight was clear to all who could see, That she was targeted for her bravery. Her silence was sought by those in power, But her voice was heard in her final hour. Her fight for justice, though it was long, Will inspire us forever in our song. May her memory linger in our minds, And her courage, too, in all our kind. Today we weep for our fallen leader, But her legacy, it will linger forever.
@charred path is this using the 3.5-turbo API?
It's using the text-davinci-003 model -> https://platform.openai.com/docs/api-reference/models
An API for accessing new AI models developed by OpenAI
Yes we need to improve the split of this tool, the way the code is open on github everybody can contribute so free to you all to submit a pull request with an improvement of the split if you have some
any particular reason for this? just curious since the price and performance embetterment
it's because it's the exact same as ChatGPT
As in the 3.5-turbo API? or davinci-003?
They just released the 3.5-turbo API if you haven't seen that yet that provides a lot of benefits over davincin-003 (I could be wrong)
Ok I need to check so
I just followed the API documentation
Oh yes it seems I can set gpt-3.5-turbo as model
๐ apparently there is not a lot of difference in switching from one to the other, otherwise I would not recommend you invest your time into it
tks for the info
thanks for your attention and time you put into your project!
It has been fun to do it, now it's all about little improvement ๐
@charred path does it look like a huge change?
I don't know I need to dig into, but it's a quick change to do, and for the text split I don't think it's something big, I can also ask some AI (github copilot) to do the improvements and add testing around to be sure the result is really accurate
@charred path I think if you just removed the text where it labels "Chunk 1", "Chunk 2", etc. it will be able to reach a similar effect (at least for now)
If you're able to do the api change today though, that would be huuuge
I'd give you all the internet points I could
Tks but regarding my agenda I can only do that at the end of the week
all gucci ๐
Is it possible to instead of having it ask a question for each individual text chunk ask, ask an overall question that would require all the content to be able to answer
Unfortunatly it is not possible due to the api limitation that's why I splitted it, maybe the api could keep the context of the previous call, if it is the case I could add that as an option for the processing
any update in github?
Nice
@charred path were you able to get your project updated to 3.5-turbo API?
Hello no the api is still using the davinci model ๐
I recently improved the split of the text
You are welcome if you want to submit a pull request on github ๐
๐ Let me see if I can get to it inbetween my midterms :)
@charred path I tried my hand at it, and I received an error within TypeScript.ts that I am sure you understand more than I do ๐
The error details the following which I assume is due to the OpenAI API call changes that I had to implement to update the model:
src\app\components\TypeWriter.tsx (11:28) @ slice
9 | useEffect(() => {
10 | const type = setInterval(() => {
> 11 | setCurrentText(text.slice(0, index));
| ^
12 | index++;
13 | if (index > text.length) {
14 | clearInterval(type);
As for the changes that I made to be able to make the call and respond correctly were the following changes in openai.ts:
/**
* This function generates the prompt for the OpenAI API.
* @param {*} text
* @param {*} request
* @returns
*/
function generatePrompt(text: string, request: string) {
return [
{ role: "system", content: `${request}` },
{ role: "user", content: `${text}` }
];
}
/**
* This function calls the OpenAI API and returns the generated text.
* @param {*} text
* @param {*} request
* @param {*} openai
* @returns
*/
export default async function callGPT(text, request, openai) {
const completion = await openai.createChatCompletion({
model: "gpt-3.5-turbo",
messages: generatePrompt(text, request),
temperature: 0.6,
max_tokens: 1400,
});
return completion.data.choices[0].text;
}```
It's worth noting that it actually works...
It's just that the site displays an error and won't print the responses out
Hi, there!
As an experienced full stack developer with over 15 years of
development experience, I am interested in you.
I have enough experience in completing your task.
You can check my enough status in my portfolio.
https://github.com/lucalysoft/GPTs
Look forward to collaborating with you on this work.
Best regards.
I prefer keeping the current model, no need to change it
Tks for trying if you have something working submit your PR I'll review and test your proposal ๐
Hello @unkempt blade ๐ Tks for the roposal, every help is welcome as the project is open and should belong to everyone so free to you to make a PR about improvements ๐