forked from langflow-ai/langflow_examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request langflow-ai#3 from MarkusSagen/features/calculator…
…-example
- Loading branch information
Showing
1 changed file
with
1 addition
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"description":"Simple getting started guide for constructing a calculator with LangChain and LangFlow","name":"Getting Started_Calculator","id":"4","data":{"nodes":[{"width":384,"height":529,"id":"dndnode_5","type":"genericNode","position":{"x":96,"y":-299.2000000000003},"data":{"type":"ZeroShotPrompt","node":{"template":{"_type":"zero_shot","prefix":{"type":"str","required":false,"placeholder":"","list":false,"show":true,"multiline":true,"value":"Answer the following questions as best you can. You have access to the following tools:"},"suffix":{"type":"str","required":true,"placeholder":"","list":false,"show":true,"multiline":true,"value":"Begin!\n\nQuestion: {input}\nThought:{agent_scratchpad}"},"format_instructions":{"type":"str","required":false,"placeholder":"","list":false,"show":true,"multiline":true,"value":"Use the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [{tool_names}]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question"}},"description":"Prompt template for Zero Shot Agent.","base_classes":["BasePromptTemplate"]},"id":"dndnode_5","value":null},"selected":false,"positionAbsolute":{"x":96,"y":-299.2000000000003},"dragging":false},{"width":384,"height":517,"id":"dndnode_8","type":"genericNode","position":{"x":92.99999999999989,"y":300},"data":{"type":"OpenAI","node":{"template":{"_type":"openai","cache":{"type":"bool","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":null},"verbose":{"type":"bool","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":null},"client":{"type":"Any","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":null},"model_name":{"type":"str","required":false,"placeholder":"","list":false,"show":true,"password":false,"multiline":false,"value":"text-davinci-003","options":["text-davinci-003","text-davinci-002"]},"temperature":{"type":"float","required":false,"placeholder":"","list":false,"show":true,"password":false,"multiline":false,"value":0.7},"max_tokens":{"type":"int","required":false,"placeholder":"","list":false,"show":false,"password":true,"multiline":false,"value":256},"top_p":{"type":"float","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":1},"frequency_penalty":{"type":"float","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":0},"presence_penalty":{"type":"float","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":0},"n":{"type":"int","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":1},"best_of":{"type":"int","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":1},"model_kwargs":{"type":"dict[str, Any]","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":null},"openai_api_key":{"type":"str","required":false,"placeholder":"","list":false,"show":true,"password":true,"multiline":false,"value":""},"batch_size":{"type":"int","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":20},"request_timeout":{"type":"Union[float, Tuple[float, float], NoneType]","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":null},"logit_bias":{"type":"dict[str, float]","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":null},"max_retries":{"type":"int","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":6},"streaming":{"type":"bool","required":false,"placeholder":"","list":false,"show":false,"password":false,"multiline":false,"value":false}},"description":"Generic OpenAI class that uses model name.","base_classes":["BaseOpenAI","BaseLLM","BaseLanguageModel"]},"id":"dndnode_8","value":null},"selected":false,"positionAbsolute":{"x":92.99999999999989,"y":300},"dragging":false},{"width":384,"height":331,"id":"dndnode_10","type":"genericNode","position":{"x":583,"y":836},"data":{"type":"Calculator","node":{"template":{"llm":{"required":true,"placeholder":"","show":true,"multiline":false,"password":false,"name":"llm","type":"BaseLLM","list":false},"_type":"Calculator"},"description":"Useful for when you need to answer questions about math.","base_classes":["Tool"]},"id":"dndnode_10","value":null},"positionAbsolute":{"x":583,"y":836},"selected":false,"dragging":false},{"width":384,"height":351,"id":"dndnode_41","type":"genericNode","position":{"x":1078.9608321776855,"y":343},"data":{"type":"ZeroShotAgent","node":{"template":{"llm_chain":{"required":true,"placeholder":"","show":true,"multiline":false,"password":false,"name":"llm_chain","type":"LLMChain","list":false},"output_parser":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"output_parser","type":"AgentOutputParser","list":false},"allowed_tools":{"required":false,"placeholder":"","show":true,"multiline":false,"password":false,"name":"allowed_tools","type":"Tool","list":true},"_type":"ZeroShotAgent"},"description":"Agent for the MRKL chain.","base_classes":["Agent","BaseSingleActionAgent","ZeroShotAgent","function"]},"id":"dndnode_41","value":null},"selected":false,"positionAbsolute":{"x":1078.9608321776855,"y":343},"dragging":false},{"width":384,"height":477,"id":"dndnode_42","type":"genericNode","position":{"x":592.9608321776855,"y":93},"data":{"type":"LLMChain","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,"value":false,"password":false,"name":"verbose","type":"bool","list":false},"prompt":{"required":false,"placeholder":"","show":true,"multiline":false,"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":"text","password":false,"name":"output_key","type":"str","list":false},"_type":"LLMChain"},"description":"Chain to run queries against LLMs.","base_classes":["Chain","LLMChain"]},"id":"dndnode_42","value":null},"selected":false,"positionAbsolute":{"x":592.9608321776855,"y":93},"dragging":false}],"edges":[{"source":"dndnode_8","sourceHandle":"OpenAI|dndnode_8|BaseOpenAI|BaseLLM|BaseLanguageModel","target":"dndnode_10","targetHandle":"BaseLLM|llm|dndnode_10","className":"animate-pulse","id":"reactflow__edge-dndnode_8OpenAI|dndnode_8|BaseOpenAI|BaseLLM|BaseLanguageModel-dndnode_10BaseLLM|llm|dndnode_10"},{"source":"dndnode_10","sourceHandle":"Calculator|dndnode_10|Tool","target":"dndnode_41","targetHandle":"Tool|allowed_tools|dndnode_41","className":"animate-pulse","id":"reactflow__edge-dndnode_10Calculator|dndnode_10|Tool-dndnode_41Tool|allowed_tools|dndnode_41"},{"source":"dndnode_5","sourceHandle":"ZeroShotPrompt|dndnode_5|BasePromptTemplate","target":"dndnode_42","targetHandle":"BasePromptTemplate|prompt|dndnode_42","className":"animate-pulse","id":"reactflow__edge-dndnode_5ZeroShotPrompt|dndnode_5|BasePromptTemplate-dndnode_42BasePromptTemplate|prompt|dndnode_42"},{"source":"dndnode_8","sourceHandle":"OpenAI|dndnode_8|BaseOpenAI|BaseLLM|BaseLanguageModel","target":"dndnode_42","targetHandle":"BaseLanguageModel|llm|dndnode_42","className":"animate-pulse","id":"reactflow__edge-dndnode_8OpenAI|dndnode_8|BaseOpenAI|BaseLLM|BaseLanguageModel-dndnode_42BaseLanguageModel|llm|dndnode_42"},{"source":"dndnode_42","sourceHandle":"LLMChain|dndnode_42|Chain|LLMChain","target":"dndnode_41","targetHandle":"LLMChain|llm_chain|dndnode_41","className":"animate-pulse","id":"reactflow__edge-dndnode_42LLMChain|dndnode_42|Chain|LLMChain-dndnode_41LLMChain|llm_chain|dndnode_41"}],"viewport":{"x":91.51958391115727,"y":163.5,"zoom":0.5}},"chat":[{"message":"Langflow. What is it?","isSend":true},{"message":"Langflow is a GUI for LangChain, designed with react-flow to provide an effortless way to experiment and prototype flows with drag-and-drop components and a chrome extension powered by GPT-3.","isSend":false,"thought":"> Entering new AgentExecutor chain...\n I need to research what Langflow is.\nAction: Serper Search\nAction Input: \"What is Langflow?\"\nObservation: Researchers introduce LangFlow, a graphical user interface (GUI) for LangChain that simplifies testing and creation of smart applications. The drag-and-drop feature provides a quick and effortless way to experiment and prototype, and the built-in chat interface enables real-time ... LangFlow is a GUI for LangChain, designed with react-flow to provide an effortless way to experiment and prototype flows with drag-and-drop ... LangFlow is a GUI for LangChain, designed with react-flow to provide an effortless way to experiment and prototype flows with drag-and-drop components and a ... an open-source chrome extension powered by GPT-3 to get the explanation of a piece of code on any site (Stackoverflow, Github, etc). ChatGPT correctly identified Mona Lisa but failed to guess the cartoon character Michael was thinking of, suggesting Bugs Bunny holding a ... Introducing LangFlow! An open-source UI for. @LangChainAI. that enables seamless combination of multiple deep learning models to perform ... See student reviews, school photos, Chinese Mandarin courses, and housing options available at Langflow Education Centre (Macau, Macau) - Reviews - Language ... Longfellow Elementary students play on the playground during recess. Longfellow Elementary students pause for a photo during class.\nThought: Langflow is a GUI for LangChain, designed with react-flow to provide an effortless way to experiment and prototype flows with drag-and-drop components and a chrome extension powered by GPT-3.\nFinal Answer: Langflow is a GUI for LangChain, designed with react-flow to provide an effortless way to experiment and prototype flows with drag-and-drop components and a chrome extension powered by GPT-3.\n\n> Finished chain."},{"message":"What is 2+2","isSend":true},{"message":"2+2 = 4","isSend":false,"thought":"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n\u001b[32;1m\u001b[1;3m I need to calculate this\nAction: Calculator\nAction Input: 2+2\u001b[0m\nObservation: \u001b[36;1m\u001b[1;3mAnswer: 4\u001b[0m\nThought:\u001b[32;1m\u001b[1;3m I now know the final answer\nFinal Answer: 2+2 = 4\u001b[0m\n\n\u001b[1m> Finished chain.\u001b[0m"},{"message":"2+2","isSend":true},{"message":"2+2 = 4","isSend":false,"thought":"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n\u001b[32;1m\u001b[1;3m I need to calculate an answer\nAction: Calculator\nAction Input: 2+2\u001b[0m\nObservation: \u001b[36;1m\u001b[1;3mAnswer: 4\u001b[0m\nThought:\u001b[32;1m\u001b[1;3m I now know the final answer\nFinal Answer: 2+2 = 4\u001b[0m\n\n\u001b[1m> Finished chain.\u001b[0m"},{"message":"5+2","isSend":true},{"message":"5+2 = 7","isSend":false,"thought":"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n\u001b[32;1m\u001b[1;3m I need to add two numbers together\nAction: Calculator\nAction Input: 5+2\u001b[0m\nObservation: \u001b[36;1m\u001b[1;3mAnswer: 7\u001b[0m\nThought:\u001b[32;1m\u001b[1;3m I now know the final answer\nFinal Answer: 5+2 = 7\u001b[0m\n\n\u001b[1m> Finished chain.\u001b[0m"},{"message":"2-2","isSend":true},{"message":"2-2 = 0","isSend":false,"thought":"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n\u001b[32;1m\u001b[1;3m I need to solve a simple math problem\nAction: Calculator\nAction Input: 2-2\u001b[0m\nObservation: \u001b[36;1m\u001b[1;3mAnswer: 0\u001b[0m\nThought:\u001b[32;1m\u001b[1;3m I now know the final answer\nFinal Answer: 2-2 = 0\u001b[0m\n\n\u001b[1m> Finished chain.\u001b[0m"}]} |