Ruu3f / freeGPT

freeGPT provides free access to text and image generation models.
GNU General Public License v3.0
445 stars 54 forks source link

bots does not have memory #18

Closed Mohamed01555 closed 1 year ago

Mohamed01555 commented 1 year ago

why do gpt3 or gpt4 bots not have memory? Although they have memory on their websites whether you.com or AIChatOS. Appreciate your response

Ruu3f commented 1 year ago

There are many reasons for that. But you can easily do that, here is an example:

import freeGPT
from asyncio import run

async def main():
    chat_history = []
    while True:
        prompt = input("👦: ")
        try:
            resp = (
                await getattr(freeGPT, "gpt3")
                .Completion()
                .create(f"Chat history: {chat_history}. Prompt: {prompt}")
            )
            print(f"🤖: {resp}")
            chat_history.append(f"Prompt: {prompt}. Your Response: {resp}")
        except Exception as e:
            print(f"🤖: {e}")

run(main())
Mohamed01555 commented 1 year ago

please give a few of them, please

Ruu3f commented 1 year ago

?

Mohamed01555 commented 1 year ago

you said There are many reasons for that. can you give a few of them, please?

Ruu3f commented 1 year ago