Coder Social home page Coder Social logo

Comments (5)

erikbye avatar erikbye commented on July 20, 2024

Can you explain which lines of code you inserted where?

With the code as is, with the second response I get the error:

print("Human: "+q)
          ~~~~~~~~~^~
TypeError: can only concatenate str (not "NoneType") to str

EDIT: Actually, it crashes after a few seconds with the error above, if I am not speaking into the microphone. Or if I take "too long" to respond.

from talk2gpt.

0ut0flin3 avatar 0ut0flin3 commented on July 20, 2024

There is a logic flow problem with the memories file: It loads fine, and dumps fine at the end, but each successive request only sends the original request, stored in the variable pr, plus the latest human request.

You can test this out by asking the AI something, then asking it what its previous answer was. It has no clue.

If you update pr as you go, this is solved and the AI will be fully conversational. I assigned the response to a variable a, then update pr it with:

pr = pr+"Human: "+q+"\nAI: "+a+"\n"

I'm working on it

from talk2gpt.

0ut0flin3 avatar 0ut0flin3 commented on July 20, 2024

Can you explain which lines of code you inserted where?

With the code as is, with the second response I get the error:

print("Human: "+q)
          ~~~~~~~~~^~
TypeError: can only concatenate str (not "NoneType") to str

EDIT: Actually, it crashes after a few seconds with the error above, if I am not speaking into the microphone. Or if I take "too long" to respond.

Yes, it is the main problem/bug, I'm working on it

from talk2gpt.

0ut0flin3 avatar 0ut0flin3 commented on July 20, 2024

the solution seems to be to insert another while loop inside the main while loop

There is a logic flow problem with the memories file: It loads fine, and dumps fine at the end, but each successive request only sends the original request, stored in the variable pr, plus the latest human request.
You can test this out by asking the AI something, then asking it what its previous answer was. It has no clue.
If you update pr as you go, this is solved and the AI will be fully conversational. I assigned the response to a variable a, then update pr it with:
pr = pr+"Human: "+q+"\nAI: "+a+"\n"

I'm working on it

Opened a new issue #4

from talk2gpt.

0ut0flin3 avatar 0ut0flin3 commented on July 20, 2024

There is a logic flow problem with the memories file: It loads fine, and dumps fine at the end, but each successive request only sends the original request, stored in the variable pr, plus the latest human request.

You can test this out by asking the AI something, then asking it what its previous answer was. It has no clue.

If you update pr as you go, this is solved and the AI will be fully conversational. I assigned the response to a variable a, then update pr it with:

pr = pr+"Human: "+q+"\nAI: "+a+"\n"

Solved. Thank you

from talk2gpt.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.