langchain/templates/llama2-functions
2023-10-27 10:58:24 -07:00
..
llama2_functions LLaMA2 with JSON schema support template (#12435) 2023-10-27 10:34:00 -07:00
tests LLaMA2 with JSON schema support template (#12435) 2023-10-27 10:34:00 -07:00
llama2-functions.ipynb Add invoke example to LLaMA2 function template notebook (#12437) 2023-10-27 10:58:24 -07:00
poetry.lock LLaMA2 with JSON schema support template (#12435) 2023-10-27 10:34:00 -07:00
pyproject.toml LLaMA2 with JSON schema support template (#12435) 2023-10-27 10:34:00 -07:00
README.md Add invoke example to LLaMA2 function template notebook (#12437) 2023-10-27 10:58:24 -07:00

Extraction with LLaMA2 Function Calling

This template shows how to do extraction of structured data from unstructured data, using LLaMA2 fine-tuned for grammars and jsonschema.

Specify the scehma you want to extract in chain.py

By default, it will extract the title and author of papers.

LLM

This template will use a Replicate hosted version of LLaMA2 that has support for grammars and jsonschema.

Based on the Replicate example, these are supplied directly in the prompt.

Be sure that REPLICATE_API_TOKEN is set in your environment.