Skip to content

Version 0.7.0

Compare
Choose a tag to compare
@eyurtsev eyurtsev released this 06 Apr 13:56
· 70 commits to main since this release
94e809d

What's Changed

  • All the internal schema relies on pydantic for validation! This change may cause your code to crash if you've had typos!
    @eyurtsev in #117

  • Allow customizing the prompt by @eyurtsev in #121

from langchain.prompts import PromptTemplate

DEFAULT_PROMPT_TEMPLATE = PromptTemplate(
    input_variables=["format_instructions", "type_description"],
    template=(
        "Write some stuff here n\n"
        "{type_description}\n\n"
        "{format_instructions}"
        "Suffix heren\n"
    ),
)


chain = create_extraction_chain(llm, schema, instruction_template=DEFAULT_PROMPT_TEMPLATE)

print(chain.prompt.format_prompt(text='hello').to_string())

Full Changelog: 0.6.1...0.7.0