chain = create_extraction_chain(llm, schema, encoder_or_encoder_class='json')
output = chain.predict_and_parse(text="please add 15 more units sold to 2023")['data']
printOutput(output)
Running this code block throws a TypeError : initial_value must be str or None, not dict.
I was able to get output in json format using:
chain.predict(text=text)["data"]
Running this code block throws a TypeError : initial_value must be str or None, not dict.
I was able to get output in json format using: