Does
ConversationSummaryBufferMemory
work with the new changes?
I have something like
llm = OpenAI(model=model, temperature=0)
llm_predictor = LLMPredictor(llm=OpenAI(temperature=0, model=model))
memory = ConversationSummaryBufferMemory(
memory_key="memory",
return_messages=True,
llm=llm,
max_token_limit=29000 if "gpt-4" in model else 7500,
)
But I can't run this, I get the error
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/discord/commands/core.py", line 124, in wrapped
ret = await coro(arg)
File "/usr/local/lib/python3.9/dist-packages/discord/commands/core.py", line 978, in _invoke
await self.callback(self.cog, ctx, **kwargs)
File "/home/kaveen/GPTDiscord/cogs/commands.py", line 755, in talk
await self.index_cog.index_chat_command(ctx, model)
File "/home/kaveen/GPTDiscord/cogs/index_service_cog.py", line 212, in index_chat_command
await self.index_handler.start_index_chat(ctx, model)
File "/home/kaveen/GPTDiscord/models/index_model.py", line 488, in start_index_chat
memory = ConversationSummaryBufferMemory(
File "/usr/local/lib/python3.9/dist-packages/langchain/load/serializable.py", line 97, in __init__
super().__init__(**kwargs)
File "/usr/local/lib/python3.9/dist-packages/pydantic/v1/main.py", line 341, in __init__
raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for ConversationSummaryBufferMemory
llm
Can't instantiate abstract class BaseLanguageModel with abstract methods agenerate_prompt, apredict, apredict_messages, generate_prompt, invoke, predict, predict_messages (type=type_error)