jackaduma / Recurrent-LLM

The open-source LLM implementation of paper: RecurrentGPT: Interactive Generation of (Arbitrarily) Long Text. AI 写小说,AI写作
MIT License
159 stars 33 forks source link

界面上点击下一步出现错误 #1

Closed v0ker closed 1 year ago

v0ker commented 1 year ago

你好~

我在界面上点击下一步的按钮时出现了下面的错误

Traceback (most recent call last):
  File "/home/xinyd/.local/lib/python3.10/site-packages/gradio/routes.py", line 437, in run_predict
    output = await app.get_blocks().process_api(
  File "/home/xinyd/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1352, in process_api
    result = await self.call_function(
  File "/home/xinyd/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1077, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/home/xinyd/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/home/xinyd/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/home/xinyd/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/home/xinyd/data/code/ai/Recurrent-LLM/gradio_server.py", line 132, in step
    writer = AIWriter(input=writer_start_input, short_memory=start_short_memory, long_memory=[
TypeError: RecurrentGPT.__init__() got an unexpected keyword argument 'model'

我对 Python 并不熟悉,通过搜索也没有找到解决方案,希望你能帮助我解决这个问题

v0ker commented 1 year ago

recurrentgpt.py 修改为下面的内容运行成功

class RecurrentGPT:

    def __init__(self, input, short_memory, long_memory, memory_index, embedder, model, tokenizer):
Huahuoy commented 7 months ago

hello which version of cuda?

v0ker commented 7 months ago

hello which version of cuda?

I did not utilize a GPU for this task. Instead, I directly accessed and utilized the OpenAI api. so i can't help you.