#Fat GPT: Huge text request on ChatGPT

55 messages ยท Page 1 of 1 (latest)

charred path
analog girder
#

Love it ! It is very useful for research paper summarization. I hope you are not storing the API keys

analog girder
#

It is giving me this error. It was working fine earlier:

ripe mauve
#

yep same^^

ripe mauve
ripe mauve
autumn bough
#

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 ?)

charred path
charred path
#

I trying the app with 100k characters without any issue since I published the fix

autumn bough
onyx ivy
#

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.

keen trellis
#

@charred path is this using the 3.5-turbo API?

charred path
charred path
keen trellis
charred path
#

it's because it's the exact same as ChatGPT

keen trellis
#

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)

charred path
#

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

keen trellis
#

๐Ÿ‘Œ 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

charred path
#

tks for the info

keen trellis
#

thanks for your attention and time you put into your project!

charred path
#

It has been fun to do it, now it's all about little improvement ๐Ÿ™‚

keen trellis
#

@charred path does it look like a huge change?

charred path
keen trellis
#

@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

charred path
#

Tks but regarding my agenda I can only do that at the end of the week

keen trellis
#

all gucci ๐Ÿ‘Œ

normal token
charred path
autumn bough
#

any update in github?

chrome bough
#

Nice

keen trellis
#

@charred path were you able to get your project updated to 3.5-turbo API?

keen trellis
#

@charred path ping :)

#

I can help out if needed ๐Ÿ˜„

charred path
#

Hello no the api is still using the davinci model ๐Ÿ™‚

#

I recently improved the split of the text

charred path
keen trellis
#

๐Ÿ‘ Let me see if I can get to it inbetween my midterms :)

keen trellis
#

@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

keen trellis
#

Also, this text splitter may be of some use:

unkempt blade
#

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.

GitHub

Contribute to lucalysoft/GPTs development by creating an account on GitHub.

autumn bough
charred path
charred path