Clean-up template READMEs (#12403)

Normalize, and update notebooks.
This commit is contained in:
Lance Martin
2023-10-26 22:23:03 -07:00
committed by GitHub
parent 4254028c52
commit d6acb3ed7e
8 changed files with 88 additions and 161 deletions

View File

@@ -10,32 +10,4 @@ By default, it will extract the title and author of papers.
This template will use `OpenAI` by default.
Be sure that `OPENAI_API_KEY` is set in your environment.
## Adding the template
Install the langchain package
```
pip install -e packages/extraction_openai_functions
```
Edit app/server.py to add that package to the routes
```
from fastapi import FastAPI
from langserve import add_routes
from extraction_openai_functions.chain import chain
app = FastAPI()
add_routes(app, chain)
```
Run the app
```
python app/server.py
```
You can use this template in the Playground:
http://127.0.0.1:8000/extraction-openai-functions/playground/
Also, see Jupyter notebook `openai_functions` for various other ways to connect to the template.
Be sure that `OPENAI_API_KEY` is set in your environment.