Find answers from the community

Updated 3 months ago

KeyError

Plain Text
chat_engine = CondenseQuestionChatEngine.from_defaults(
    query_engine=index.as_query_engine(),
    condense_question_prompt=custom_prompt,
    chat_history=custom_chat_history,
    verbose=True,
    llm=llm,
    service_context=service_context,
)

Gives me
Plain Text
KeyError: 'custom_chat_history'



Full Code in Thread
L
T
11 comments
What's the full error though?
Hi, Sorry for responding just now. I had a very busy schedule.

The Full Error is attached
Change custom_chat_history to chat_history
It doesnt seem to respond.
Code attached
Attachment
image.png
Like it seems to have generated, but it doesnt respond
Attachment
image.png
Welp it does reply, just needs way to long for just giving a "Dunno"
Heya @Logan M do you know what that would happen?
I have no idea unfortunately -- I would have to walk through code with a debugger to figure it out (and that is an option I highly recommend getting good at with python tbh)
Sorry to ask so stupidly, but how do I do that? I'm very much not good with python, as you can probably tell
@Logan M hehe
Add a reply
Sign up and join the conversation on Discord