hwchase17 / langchain-hub

3.26k stars 267 forks source link

add chain: zero-shot intent classifier #24

Open dmarx opened 1 year ago

dmarx commented 1 year ago

Facilitates building applications that utilize slot-filling

from langchain.chains import load_chain

chain = load_chain("lc://chains/zero-shot-intent-classifier/chain.json")

input_query = "how would I drive from my home to SeaTac airport?"
chain.run(input_query)
# {'intent': 'get_directions', 'arguments': {'start_location': 'home', 'end_location': 'SeaTac airport'}}