"output_instructions": "Extract the names of the models"}    Observation: babbage, davinci, text-davinci-edit-001, babbage-code-search-code, text-similarity-babbage-001, code-davinci-edit-001, text-davinci-edit-001, ada    Thought:Action: requests_post    Action Input: {"url": "https://api.openai.com/v1/completions", "data": {"model": "text-davinci-002", "prompt": "Give a short piece of advice on how to improve communication skills"}, "output_instructions": "Extract the text from the first choice"}    Observation: "Some basic advice for improving communication skills would be to make sure to listen"    Thought:I am finished executing the plan.        Final Answer: Some basic advice for improving communication skills would be to make sure to listen.        > Finished chain.        Observation: Some basic advice for improving communication skills would be to make sure to listen.    Thought:I am finished executing the plan and have the information the user asked for.    Final Answer: A short piece of advice for improving communication skills is to make sure to listen.        > Finished chain.    'A short piece of advice for improving communication skills is to make sure to listen.'Takes awhile to get there!2nd example: "json explorer" agent‚ÄãHere's an agent that's not particularly practical, but neat! The agent has access to 2 toolkits. One comprises tools to interact with json: one tool to list the keys of a json object and another tool to get the value for a given key. The other toolkit comprises requests wrappers to send GET and POST requests. This agent consumes a lot calls to the language model, but does a surprisingly decent job.from langchain.agents import create_openapi_agentfrom langchain.agents.agent_toolkits import OpenAPIToolkitfrom langchain.llms.openai import OpenAIfrom langchain.requests import TextRequestsWrapperfrom langchain.tools.json.tool import JsonSpecwith open("openai_openapi.yaml") as f:    data = yaml.load(f, Loader=yaml.FullLoader)json_spec
We can construct agents to consume arbitrary APIs, here APIs conformant to the OpenAPI/Swagger specification.
We can construct agents to consume arbitrary APIs, here APIs conformant to the OpenAPI/Swagger specification. ->: "output_instructions": "Extract the names of the models"}    Observation: babbage, davinci, text-davinci-edit-001, babbage-code-search-code, text-similarity-babbage-001, code-davinci-edit-001, text-davinci-edit-001, ada    Thought:Action: requests_post    Action Input: {"url": "https://api.openai.com/v1/completions", "data": {"model": "text-davinci-002", "prompt": "Give a short piece of advice on how to improve communication skills"}, "output_instructions": "Extract the text from the first choice"}    Observation: "Some basic advice for improving communication skills would be to make sure to listen"    Thought:I am finished executing the plan.        Final Answer: Some basic advice for improving communication skills would be to make sure to listen.        > Finished chain.        Observation: Some basic advice for improving communication skills would be to make sure to listen.    Thought:I am finished executing the plan and have the information the user asked for.    Final Answer: A short piece of advice for improving communication skills is to make sure to listen.        > Finished chain.    'A short piece of advice for improving communication skills is to make sure to listen.'Takes awhile to get there!2nd example: "json explorer" agent‚ÄãHere's an agent that's not particularly practical, but neat! The agent has access to 2 toolkits. One comprises tools to interact with json: one tool to list the keys of a json object and another tool to get the value for a given key. The other toolkit comprises requests wrappers to send GET and POST requests. This agent consumes a lot calls to the language model, but does a surprisingly decent job.from langchain.agents import create_openapi_agentfrom langchain.agents.agent_toolkits import OpenAPIToolkitfrom langchain.llms.openai import OpenAIfrom langchain.requests import TextRequestsWrapperfrom langchain.tools.json.tool import JsonSpecwith open("openai_openapi.yaml") as f:    data = yaml.load(f, Loader=yaml.FullLoader)json_spec