Files
langchain/templates/sql-llama2/sql_llama2.ipynb
T
2023-10-29 15:50:09 -07:00

1.5 KiB

Run Template

In server.py, set -

add_routes(app, chain, path="/sql_llama2")

This template includes an example DB of 2023 NBA rosters.

We can ask questions related to NBA players.

In [15]:
from langserve.client import RemoteRunnable

sql_app = RemoteRunnable("http://0.0.0.0:8001/sql_llama2")
sql_app.invoke({"question": "What team is Klay Thompson on?"})
Out [15]:
" Sure thing! Here's the natural language response based on the given SQL query and response:\n\nKlay Thompson plays for the Golden State Warriors."