Open rsher60 opened 5 months ago
Kind of a hacky way but do this:
chain = create_extraction_chain(llm, person_schema)
text = ## The text you want ##
output = chain.run(text=text)["data"]
Hate to say this but here are two external resources that should help
https://python.langchain.com/docs/use_cases/extraction#option-2-parsing https://python.langchain.com/docs/modules/model_io/output_parsers/types/pydantic
I will do an overhaul of the files here in a few weeks
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: