forked from langflow-ai/langflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Demo2_ VirtualAgent.json
1 lines (1 loc) · 16.5 KB
/
Demo2_ VirtualAgent.json
1
{"name":"Demo2: VirtualAgent","description":"Build a virtual agent to use the first workflow as a tool!","data":{"nodes":[{"width":384,"height":396,"id":"AgentInitializer-OtOUg","type":"genericNode","position":{"x":1847.6869624612768,"y":191.6687758681952},"data":{"type":"AgentInitializer","node":{"template":{"llm":{"required":true,"placeholder":"","show":true,"multiline":false,"password":false,"name":"llm","display_name":"LLM","advanced":false,"info":"","type":"BaseLanguageModel","list":false},"memory":{"required":false,"placeholder":"","show":true,"multiline":false,"password":false,"name":"memory","advanced":false,"info":"","type":"BaseChatMemory","list":false},"tools":{"required":false,"placeholder":"","show":true,"multiline":false,"password":false,"name":"tools","advanced":false,"info":"","type":"Tool","list":true},"agent":{"required":true,"placeholder":"","show":true,"multiline":false,"value":"openai-functions","password":false,"options":["zero-shot-react-description","react-docstore","self-ask-with-search","conversational-react-description","openai-functions","openai-multi-functions"],"name":"agent","advanced":false,"info":"","type":"str","list":true},"_type":"initialize_agent"},"description":"Construct a zero shot agent from an LLM and tools.","base_classes":["AgentExecutor","function"],"display_name":"AgentInitializer","documentation":"https://python.langchain.com/docs/modules/agents/agent_types/"},"id":"AgentInitializer-OtOUg","value":null},"selected":false,"positionAbsolute":{"x":1847.6869624612768,"y":191.6687758681952},"dragging":false},{"width":384,"height":292,"id":"ChatOpenAI-zOOWO","type":"genericNode","position":{"x":1372.911518161224,"y":-129.47387290466222},"data":{"type":"ChatOpenAI","node":{"template":{"callbacks":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"callbacks","advanced":false,"info":"","type":"langchain.callbacks.base.BaseCallbackHandler","list":true},"cache":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"cache","advanced":false,"info":"","type":"bool","list":false},"client":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"client","advanced":false,"info":"","type":"Any","list":false},"max_retries":{"required":false,"placeholder":"","show":false,"multiline":false,"value":6,"password":false,"name":"max_retries","advanced":false,"info":"","type":"int","list":false},"max_tokens":{"required":false,"placeholder":"","show":true,"multiline":false,"password":true,"name":"max_tokens","advanced":false,"info":"","type":"int","list":false,"value":""},"model_kwargs":{"required":false,"placeholder":"","show":true,"multiline":false,"password":false,"name":"model_kwargs","advanced":true,"info":"","type":"code","list":false},"model_name":{"required":false,"placeholder":"","show":true,"multiline":false,"value":"gpt-3.5-turbo-0613","password":false,"options":["gpt-3.5-turbo-0613","gpt-3.5-turbo","gpt-3.5-turbo-16k-0613","gpt-3.5-turbo-16k","gpt-4-0613","gpt-4-32k-0613","gpt-4","gpt-4-32k"],"name":"model_name","advanced":true,"info":"","type":"str","list":true},"n":{"required":false,"placeholder":"","show":false,"multiline":false,"value":1,"password":false,"name":"n","advanced":false,"info":"","type":"int","list":false},"openai_api_base":{"required":false,"placeholder":"","show":true,"multiline":false,"password":false,"name":"openai_api_base","display_name":"OpenAI API Base","advanced":true,"info":"\nThe base URL of the OpenAI API. Defaults to https://api.openai.com/v1.\n\nYou can change this to use other APIs like JinaChat, LocalAI and Prem.\n","type":"str","list":false},"openai_api_key":{"required":false,"placeholder":"","show":true,"multiline":false,"value":"","password":true,"name":"openai_api_key","display_name":"OpenAI API Key","advanced":true,"info":"","type":"str","list":false},"openai_organization":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"openai_organization","display_name":"OpenAI Organization","advanced":false,"info":"","type":"str","list":false},"openai_proxy":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"openai_proxy","display_name":"OpenAI Proxy","advanced":false,"info":"","type":"str","list":false},"request_timeout":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"request_timeout","advanced":false,"info":"","type":"float","list":false},"streaming":{"required":false,"placeholder":"","show":false,"multiline":false,"value":false,"password":false,"name":"streaming","advanced":false,"info":"","type":"bool","list":false},"tags":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"tags","advanced":false,"info":"","type":"str","list":true},"temperature":{"required":false,"placeholder":"","show":true,"multiline":false,"value":"0","password":false,"name":"temperature","advanced":true,"info":"","type":"float","list":false},"tiktoken_model_name":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"tiktoken_model_name","advanced":false,"info":"","type":"str","list":false},"verbose":{"required":false,"placeholder":"","show":false,"multiline":false,"value":false,"password":false,"name":"verbose","advanced":false,"info":"","type":"bool","list":false},"_type":"ChatOpenAI"},"description":"Wrapper around OpenAI Chat large language models.","base_classes":["BaseChatModel","ChatOpenAI","BaseLanguageModel","BaseLLM"],"display_name":"ChatOpenAI","documentation":"https://python.langchain.com/docs/modules/model_io/models/chat/integrations/openai"},"id":"ChatOpenAI-zOOWO","value":null},"selected":false,"dragging":false,"positionAbsolute":{"x":1372.911518161224,"y":-129.47387290466222}},{"width":384,"height":226,"id":"GetTopPitchableCustomer-wIwRi","type":"genericNode","position":{"x":625.4072224359611,"y":320.974834576258},"data":{"type":"GetTopPitchableCustomer","node":{"template":{"code":{"required":false,"placeholder":"","show":false,"multiline":true,"value":"def pitchable_low_hanging_fruit_workflow(count: str) -> str:\n return \"customer_name: Netally, spending: 10 million, POC: hejinming, email: [email protected], phone: 1234567890\"\n","password":false,"name":"code","advanced":false,"info":"","type":"code","list":false},"description":{"required":false,"placeholder":"","show":false,"multiline":true,"value":"Useful to find the pitchable low hanging fruit customers. Pass the number of customers to return as parameter to this tool.","password":false,"name":"description","advanced":false,"info":"","type":"str","list":false},"name":{"required":false,"placeholder":"","show":false,"multiline":false,"value":"GetTopPitchableCustomer","password":false,"name":"name","advanced":false,"info":"","type":"str","list":false},"return_direct":{"required":false,"placeholder":"","show":false,"multiline":false,"value":false,"password":false,"name":"return_direct","advanced":false,"info":"","type":"bool","list":false},"_type":"PythonFunctionTool"},"description":"Useful to find the pitchable low hanging fruit customers. Pass the number of customers to return as parameter to this tool.","base_classes":["Tool"],"display_name":"GetTopPitchableCustomer","documentation":""},"id":"GetTopPitchableCustomer-wIwRi","value":null},"selected":false,"positionAbsolute":{"x":625.4072224359611,"y":320.974834576258},"dragging":false},{"width":384,"height":246,"id":"GetMarketingObjectives-rhvUB","type":"genericNode","position":{"x":651.5631003349997,"y":641.3191612923442},"data":{"type":"GetMarketingObjectives","node":{"template":{"code":{"required":false,"placeholder":"","show":false,"multiline":true,"value":"def marketing_objective_api(customer_name: str) -> str:\n return \"increase customer leads\"\n","password":false,"name":"code","advanced":false,"info":"","type":"code","list":false},"description":{"required":false,"placeholder":"","show":false,"multiline":true,"value":"MarketingObjective API. Use this when you to find the marketing objective of a customer. You should pass the customer_name as the parameter to this tool.","password":false,"name":"description","advanced":false,"info":"","type":"str","list":false},"name":{"required":false,"placeholder":"","show":false,"multiline":false,"value":"GetMarketingObjectives","password":false,"name":"name","advanced":false,"info":"","type":"str","list":false},"return_direct":{"required":false,"placeholder":"","show":false,"multiline":false,"value":false,"password":false,"name":"return_direct","advanced":false,"info":"","type":"bool","list":false},"_type":"PythonFunctionTool"},"description":"MarketingObjective API. Use this when you to find the marketing objective of a customer. You should pass the customer_name as the parameter to this tool.","base_classes":["Tool"],"display_name":"GetMarketingObjectives","documentation":""},"id":"GetMarketingObjectives-rhvUB","value":null},"selected":false,"positionAbsolute":{"x":651.5631003349997,"y":641.3191612923442},"dragging":false},{"width":384,"height":226,"id":"FetchNextBestAction-MbEbv","type":"genericNode","position":{"x":930.5268594609497,"y":766.1098882323911},"data":{"type":"FetchNextBestAction","node":{"template":{"code":{"required":false,"placeholder":"","show":false,"multiline":true,"value":"def next_best_action(customer_name: str) -> str:\n return \"customer_name: Netally, ads_product: PMax, rationale: cpc is too high due to incorrect manual config. PMax will help you optimize your ads spend.\"\n","password":false,"name":"code","advanced":false,"info":"","type":"code","list":false},"description":{"required":false,"placeholder":"","show":false,"multiline":true,"value":"Useful to find an ads product to suggest to the customer. Pass the customer_name as the parameter to this tool.","password":false,"name":"description","advanced":false,"info":"","type":"str","list":false},"name":{"required":false,"placeholder":"","show":false,"multiline":false,"value":"FetchNextBestAction","password":false,"name":"name","advanced":false,"info":"","type":"str","list":false},"return_direct":{"required":false,"placeholder":"","show":false,"multiline":false,"value":false,"password":false,"name":"return_direct","advanced":false,"info":"","type":"bool","list":false},"_type":"PythonFunctionTool"},"description":"Useful to find an ads product to suggest to the customer. Pass the customer_name as the parameter to this tool.","base_classes":["Tool"],"display_name":"FetchNextBestAction","documentation":""},"id":"FetchNextBestAction-MbEbv","value":null},"selected":false,"positionAbsolute":{"x":930.5268594609497,"y":766.1098882323911},"dragging":false},{"width":384,"height":226,"id":"GetAdsReportingData-2dByX","type":"genericNode","position":{"x":1324.0125949199,"y":868.8784534116063},"data":{"type":"GetAdsReportingData","node":{"template":{"code":{"required":false,"placeholder":"","show":false,"multiline":true,"value":"def adwords_campaign_performance(customer_name: str) -> str:\n return \"customer_name: Netally, cpc: 0.5 USD\"\n","password":false,"name":"code","advanced":false,"info":"","type":"code","list":false},"description":{"required":false,"placeholder":"","show":false,"multiline":true,"value":"Useful to find the campaign performance of a customer. Pass the customer_name as the parameter to this tool.","password":false,"name":"description","advanced":false,"info":"","type":"str","list":false},"name":{"required":false,"placeholder":"","show":false,"multiline":false,"value":"GetAdsReportingData","password":false,"name":"name","advanced":false,"info":"","type":"str","list":false},"return_direct":{"required":false,"placeholder":"","show":false,"multiline":false,"value":false,"password":false,"name":"return_direct","advanced":false,"info":"","type":"bool","list":false},"_type":"PythonFunctionTool"},"description":"Useful to find the campaign performance of a customer. Pass the customer_name as the parameter to this tool.","base_classes":["Tool"],"display_name":"GetAdsReportingData","documentation":""},"id":"GetAdsReportingData-2dByX","value":null},"selected":false,"positionAbsolute":{"x":1324.0125949199,"y":868.8784534116063},"dragging":false},{"width":384,"height":206,"id":"PlannerAgent-thId6","type":"genericNode","position":{"x":865.8478529090397,"y":3.935011346001019},"data":{"type":"PlannerAgent","node":{"template":{"code":{"required":false,"placeholder":"","show":false,"multiline":true,"value":"def make_plans(problem: str) -> str: return \"Here are steps to make a low hanging fruit pitch to a Google ads customer. Step 1. Identify the top pitchable customer company, find its POC.Step 2. Check the customer's campaign performance metrics and product recommendations from the Next Best Action engine. Do any Google ads product help them better achieve their objectives? (optional) Step 3. If applicable, draft a short email (no more than 50 words) to the customer company to recommend a Google ads product.Step 4. Give TL;DR for each step.\"","password":false,"name":"code","advanced":false,"info":"","type":"code","list":false},"description":{"required":false,"placeholder":"","show":false,"multiline":true,"value":"Useful to make a plan to solve a problem. Pass the problem as the parameter.","password":false,"name":"description","advanced":false,"info":"","type":"str","list":false},"name":{"required":false,"placeholder":"","show":false,"multiline":false,"value":"PlannerAgent","password":false,"name":"name","advanced":false,"info":"","type":"str","list":false},"return_direct":{"required":false,"placeholder":"","show":false,"multiline":false,"value":false,"password":false,"name":"return_direct","advanced":false,"info":"","type":"bool","list":false},"_type":"PythonFunctionTool"},"description":"Useful to make a plan to solve a problem. Pass the problem as the parameter.","base_classes":["Tool"],"display_name":"PlannerAgent","documentation":""},"id":"PlannerAgent-thId6","value":null},"selected":false,"positionAbsolute":{"x":865.8478529090397,"y":3.935011346001019},"dragging":false}],"edges":[{"source":"ChatOpenAI-zOOWO","sourceHandle":"ChatOpenAI|ChatOpenAI-zOOWO|BaseChatModel|ChatOpenAI|BaseLanguageModel|BaseLLM","target":"AgentInitializer-OtOUg","targetHandle":"BaseLanguageModel|llm|AgentInitializer-OtOUg","style":{"stroke":"#555555"},"className":"","animated":false,"id":"reactflow__edge-ChatOpenAI-zOOWOChatOpenAI|ChatOpenAI-zOOWO|ChatOpenAI|BaseLanguageModel|BaseChatModel|BaseLLM-AgentInitializer-OtOUgBaseLanguageModel|llm|AgentInitializer-OtOUg","selected":false},{"source":"GetTopPitchableCustomer-wIwRi","sourceHandle":"GetTopPitchableCustomer|GetTopPitchableCustomer-wIwRi|Tool","target":"AgentInitializer-OtOUg","targetHandle":"Tool|tools|AgentInitializer-OtOUg","style":{"stroke":"#555555"},"className":"","animated":false,"id":"reactflow__edge-GetTopPitchableCustomer-wIwRiGetTopPitchableCustomer|GetTopPitchableCustomer-wIwRi|Tool-AgentInitializer-OtOUgTool|tools|AgentInitializer-OtOUg","selected":false},{"source":"GetMarketingObjectives-rhvUB","sourceHandle":"GetMarketingObjectives|GetMarketingObjectives-rhvUB|Tool","target":"AgentInitializer-OtOUg","targetHandle":"Tool|tools|AgentInitializer-OtOUg","style":{"stroke":"#555555"},"className":"","animated":false,"id":"reactflow__edge-GetMarketingObjectives-rhvUBGetMarketingObjectives|GetMarketingObjectives-rhvUB|Tool-AgentInitializer-OtOUgTool|tools|AgentInitializer-OtOUg","selected":false},{"source":"FetchNextBestAction-MbEbv","sourceHandle":"FetchNextBestAction|FetchNextBestAction-MbEbv|Tool","target":"AgentInitializer-OtOUg","targetHandle":"Tool|tools|AgentInitializer-OtOUg","style":{"stroke":"#555555"},"className":"","animated":false,"id":"reactflow__edge-FetchNextBestAction-MbEbvFetchNextBestAction|FetchNextBestAction-MbEbv|Tool-AgentInitializer-OtOUgTool|tools|AgentInitializer-OtOUg","selected":false},{"source":"GetAdsReportingData-2dByX","sourceHandle":"GetAdsReportingData|GetAdsReportingData-2dByX|Tool","target":"AgentInitializer-OtOUg","targetHandle":"Tool|tools|AgentInitializer-OtOUg","style":{"stroke":"#555555"},"className":"","animated":false,"id":"reactflow__edge-GetAdsReportingData-2dByXGetAdsReportingData|GetAdsReportingData-2dByX|Tool-AgentInitializer-OtOUgTool|tools|AgentInitializer-OtOUg","selected":false},{"source":"PlannerAgent-thId6","sourceHandle":"PlannerAgent|PlannerAgent-thId6|Tool","target":"AgentInitializer-OtOUg","targetHandle":"Tool|tools|AgentInitializer-OtOUg","style":{"stroke":"#555555"},"className":"","animated":false,"id":"reactflow__edge-PlannerAgent-thId6PlannerAgent|PlannerAgent-thId6|Tool-AgentInitializer-OtOUgTool|tools|AgentInitializer-OtOUg","selected":false}],"viewport":{"x":-291.22517840920034,"y":688.608227621844,"zoom":0.5342667262729048}},"id":"8b5ba5fc-efcc-4a58-ace4-49cd6c10dd42","style":null}