Chromadream / langchain-pydantic

testing structured output with pydantic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Langchain-Pydantic

Wrapper to make pydantic models play more nicely with langchain.

Still very toy-ish, probably will implement OutputParser pattern

Installation

  1. On a Python virtual environment, run
pip install -r requirements.txt
  1. Copy example.env to .env and add your OpenAPI API key.

Running it

python3 main.py

Tracing

If you need tracing for some reason:

  1. Run the following command
docker-compose up
  1. Change the LANGCHAIN_TRACING key on .env to true

About

testing structured output with pydantic


Languages

Language:Python 100.0%