-
Notifications
You must be signed in to change notification settings - Fork 66
/
Conversational_chain.json
1 lines (1 loc) · 6.39 KB
/
Conversational_chain.json
1
{"description":"Example of Conversational Chain Flow","name":"Conversational Chain","id":"21","data":{"nodes":[{"width":384,"height":357,"id":"dndnode_197","type":"genericNode","position":{"x":41.77285741205577,"y":63.38205429210862},"data":{"type":"ConversationBufferMemory","node":{"template":{"chat_memory":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"chat_memory","type":"BaseChatMessageHistory","list":false},"output_key":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"output_key","type":"str","list":false},"input_key":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"input_key","type":"str","list":false},"return_messages":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"return_messages","type":"bool","list":false},"human_prefix":{"required":false,"placeholder":"","show":false,"multiline":false,"value":"Human","password":false,"name":"human_prefix","type":"str","list":false},"ai_prefix":{"required":false,"placeholder":"","show":false,"multiline":false,"value":"AI","password":false,"name":"ai_prefix","type":"str","list":false},"memory_key":{"required":false,"placeholder":"","show":true,"multiline":false,"value":"history","password":false,"name":"memory_key","type":"str","list":false},"_type":"ConversationBufferMemory"},"description":"Buffer for storing conversation memory.","base_classes":["BaseChatMemory","ConversationBufferMemory","BaseMemory"]},"id":"dndnode_197","value":null},"selected":false,"positionAbsolute":{"x":41.77285741205577,"y":63.38205429210862},"dragging":false},{"width":384,"height":673,"id":"dndnode_198","type":"genericNode","position":{"x":36.69238553788068,"y":467.8198042261215},"data":{"type":"ChatOpenAI","node":{"template":{"verbose":{"required":false,"placeholder":"","show":false,"multiline":false,"value":false,"password":false,"name":"verbose","type":"bool","list":false},"client":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"client","type":"Any","list":false},"model_name":{"required":false,"placeholder":"","show":true,"multiline":false,"value":"gpt-3.5-turbo","password":false,"options":["gpt-3.5-turbo","gpt-4","gpt-4-32k"],"name":"model_name","type":"str","list":true},"temperature":{"required":false,"placeholder":"","show":true,"multiline":false,"value":0.7,"password":false,"name":"temperature","type":"float","list":false},"model_kwargs":{"required":false,"placeholder":"","show":true,"multiline":false,"password":false,"name":"model_kwargs","type":"code","list":false},"openai_api_key":{"required":true,"placeholder":"","show":true,"multiline":false,"value":"","password":true,"name":"openai_api_key","display_name":"OpenAI API Key","type":"str","list":false},"request_timeout":{"required":false,"placeholder":"","show":false,"multiline":false,"value":60,"password":false,"name":"request_timeout","type":"int","list":false},"max_retries":{"required":false,"placeholder":"","show":false,"multiline":false,"value":6,"password":false,"name":"max_retries","type":"int","list":false},"streaming":{"required":false,"placeholder":"","show":false,"multiline":false,"value":false,"password":false,"name":"streaming","type":"bool","list":false},"n":{"required":false,"placeholder":"","show":false,"multiline":false,"value":1,"password":false,"name":"n","type":"int","list":false},"max_tokens":{"required":false,"placeholder":"","show":true,"multiline":false,"password":true,"name":"max_tokens","type":"int","list":false},"_type":"ChatOpenAI"},"description":"Wrapper around OpenAI Chat large language models.","base_classes":["ChatOpenAI","BaseChatModel","BaseLanguageModel"]},"id":"dndnode_198","value":null},"selected":false,"positionAbsolute":{"x":36.69238553788068,"y":467.8198042261215},"dragging":false},{"width":384,"height":583,"id":"dndnode_199","type":"genericNode","position":{"x":621.9726549474123,"y":103.02734505258763},"data":{"type":"ConversationChain","node":{"template":{"memory":{"required":false,"placeholder":"","show":true,"multiline":false,"password":false,"name":"memory","type":"BaseMemory","list":false},"verbose":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"verbose","type":"bool","list":false},"prompt":{"required":false,"placeholder":"","show":true,"multiline":false,"value":{"input_variables":["history","input"],"output_parser":null,"partial_variables":{},"template":"The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.\n\nCurrent conversation:\n{history}\nHuman: {input}\nAI:","template_format":"f-string","validate_template":true,"_type":"prompt"},"password":false,"name":"prompt","type":"BasePromptTemplate","list":false},"llm":{"required":true,"placeholder":"","show":true,"multiline":false,"password":false,"name":"llm","type":"BaseLanguageModel","list":false},"output_key":{"required":true,"placeholder":"","show":true,"multiline":false,"value":"response","password":false,"name":"output_key","type":"str","list":false},"input_key":{"required":true,"placeholder":"","show":true,"multiline":false,"value":"input","password":false,"name":"input_key","type":"str","list":false},"_type":"ConversationChain"},"description":"Chain to have a conversation and load context from memory.","base_classes":["ConversationChain","LLMChain","Chain"]},"id":"dndnode_199","value":null},"selected":false,"positionAbsolute":{"x":621.9726549474123,"y":103.02734505258763},"dragging":false}],"edges":[{"source":"dndnode_197","sourceHandle":"ConversationBufferMemory|dndnode_197|BaseChatMemory|ConversationBufferMemory|BaseMemory","target":"dndnode_199","targetHandle":"BaseMemory|memory|dndnode_199","className":"animate-pulse","id":"reactflow__edge-dndnode_197ConversationBufferMemory|dndnode_197|BaseChatMemory|ConversationBufferMemory|BaseMemory-dndnode_199BaseMemory|memory|dndnode_199"},{"source":"dndnode_198","sourceHandle":"ChatOpenAI|dndnode_198|ChatOpenAI|BaseChatModel|BaseLanguageModel","target":"dndnode_199","targetHandle":"BaseLanguageModel|llm|dndnode_199","className":"animate-pulse","id":"reactflow__edge-dndnode_198ChatOpenAI|dndnode_198|ChatOpenAI|BaseChatModel|BaseLanguageModel-dndnode_199BaseLanguageModel|llm|dndnode_199"}],"viewport":{"x":184.01367252629387,"y":21.486327473706183,"zoom":0.5}},"chat":[]}