Find answers from the community

Updated 8 months ago

Simple chat engine and output parsing

Simple chat engine and output parsing doesn't work.
If I do something like
Plain Text
llm = Ollama(
    model="mistral",
)
chat_engine = SimpleChatEngine.from_defaults(
    llm=llm,
    system_prompt=system_prompt,
    output_parser=PydanticOutputParser(output_cls=Choice),
)

The output doesn't get returned in the Pydantic output class. I just get a paragraph from the llm.
L
M
3 comments
Right, its a chat engine, it doesn't use a output parser, that kwarg is unused. It. has no instructions to output anything structured
Is there any way I can do a basic chat with a chat history and ensure structured output ?
Without using some index or vector store or any data lookup
Add a reply
Sign up and join the conversation on Discord