mirror of
https://github.com/hwchase17/langchain
synced 2024-11-08 07:10:35 +00:00
ebf998acb6
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com> Co-authored-by: Lance Martin <lance@langchain.dev> Co-authored-by: Jacob Lee <jacoblee93@gmail.com>
15 lines
432 B
Python
15 lines
432 B
Python
from langchain.chains import create_tagging_chain
|
|
from langchain_experimental.llms.anthropic_functions import AnthropicFunctions
|
|
|
|
model = AnthropicFunctions(model='claude-2')
|
|
|
|
schema = {
|
|
"properties": {
|
|
"sentiment": {"type": "string"},
|
|
"aggressiveness": {"type": "integer"},
|
|
"language": {"type": "string"},
|
|
}
|
|
}
|
|
|
|
# This is LLMChain, which implements invoke
|
|
chain = create_tagging_chain(schema, model) |