dog {name} of color {color} with favorite food {fav_food}!"chain = create_openai_fn_chain([record_person, record_dog], llm, prompt, verbose=True)chain.run(    "I can't find my dog Henry anywhere, he's a small brown beagle. Could you send a message about him?")            > Entering new LLMChain chain...    Prompt after formatting:    System: You are a world class algorithm for recording entities.    Human: Make calls to the relevant function to record the entities in the following input: I can't find my dog Henry anywhere, he's a small brown beagle. Could you send a message about him?    Human: Tip: Make sure to answer in the correct format        > Finished chain.    {'name': 'record_dog',     'arguments': {'name': 'Henry', 'color': 'brown', 'fav_food': {'food': None}}}Other Chains using OpenAI functions‚ÄãThere are a number of more specific chains that use OpenAI functions.Extraction: very similar to structured output chain, intended for information/entity extraction specifically.Tagging: tag inputs.OpenAPI: take an OpenAPI spec and create + execute valid requests against the API, using OpenAI functions under the hood.QA with citations: use OpenAI functions ability to extract citations from text.PreviousAdding memory (state)NextSerializationGetting structured outputsUsing Pydantic classesUsing JsonSchemaCreating a generic OpenAI functions chainUsing Pydantic classesUsing Python functionsOther Chains using OpenAI functionsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This walkthrough demonstrates how to incorporate OpenAI function-calling API's in a chain. We'll go over:
This walkthrough demonstrates how to incorporate OpenAI function-calling API's in a chain. We'll go over: ->: dog {name} of color {color} with favorite food {fav_food}!"chain = create_openai_fn_chain([record_person, record_dog], llm, prompt, verbose=True)chain.run(    "I can't find my dog Henry anywhere, he's a small brown beagle. Could you send a message about him?")            > Entering new LLMChain chain...    Prompt after formatting:    System: You are a world class algorithm for recording entities.    Human: Make calls to the relevant function to record the entities in the following input: I can't find my dog Henry anywhere, he's a small brown beagle. Could you send a message about him?    Human: Tip: Make sure to answer in the correct format        > Finished chain.    {'name': 'record_dog',     'arguments': {'name': 'Henry', 'color': 'brown', 'fav_food': {'food': None}}}Other Chains using OpenAI functions‚ÄãThere are a number of more specific chains that use OpenAI functions.Extraction: very similar to structured output chain, intended for information/entity extraction specifically.Tagging: tag inputs.OpenAPI: take an OpenAPI spec and create + execute valid requests against the API, using OpenAI functions under the hood.QA with citations: use OpenAI functions ability to extract citations from text.PreviousAdding memory (state)NextSerializationGetting structured outputsUsing Pydantic classesUsing JsonSchemaCreating a generic OpenAI functions chainUsing Pydantic classesUsing Python functionsOther Chains using OpenAI functionsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.