# embeddings_queue

created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: a17f45a9-2d6f-4922-ba9c-27a0e9451df0
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"a17f45a9-2d6f-4922-ba9c-27a0e9451df0\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"27cc856f-065c-4277-917c-32d2d7aa7999\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"1747f5921bc46dde0c5f7e7b639c7bb27eb4ede64085ab49aed3e8eff375bd7a\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 0, \"end_char_idx\": 3162, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "# Fine tuning with function-calling\n\n\nThis notebook covers how to fine-tune to increase function calling accuracy and reliability. You can find more information on function calling [here](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_call_functions_with_chat_models.ipynb), and on fine tuning [here](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_finetune_chat_models.ipynb)\n\n\nFor context, from the function calling notebook above:\n\n> `tools` is an optional parameter in the Chat Completion API which can be used to provide function specifications. The purpose of this is to enable models to generate function arguments which adhere to the provided specifications. Note that the API will not actually execute any function calls. It is up to developers to execute function calls using model outputs.\n\n\nFunction calling is a very powerful tool when it functions as intended. However, we have seen that as the number of functions increases, and the complexity of the task at hand increases, function calling becomes less accurate (e.g.: more hallucinated invocations, and incorrect invocations).\n\nBefore fine tuning for function calling, it's best to begin with:\n\n- Improvements to the function definitions. Make them more clear, and more distinct from one another.\n- Experiment with prompt engineering: often a more detailed prompt can help the model call the correct function.\n\n_If_ the steps above fail to improve function calling to a satisfactory level, then you can try fine tuning for function calling.\n\n\n### Overview\n\n\nThis notebook contains three sections\n\n- **Assessing baseline function calling performance:** Evaluating an out-of-the-box `gpt-3.5-turbo` model on our given function (let's assume that for latency + cost reasons we cannot use `gpt-4o` for a drone copilot)\n- **Generating synthetic data:** Using `gpt-4o` to create 'golden' set of prompts and function invocations to use as training data\n- **Fine-tuning**: Running the fine tuning job, and evaluating the fine-tuned model\n\n\nNote: _This notebook provides an example of how to create synthetic training data for fine tuning for function calling given just a list of functions. While real-world production test evals are preferable, this method produces strong results and can be used in conjunction with real-world training data._\n\n\n# Getting baseline function calling performance\n\n\n\n```python\n#!pip install tenacity -q\n#!pip install openai -q\n#!pip install typing -q\n# !pip install python-dotenv\n```\n\n\n```python\nimport numpy as np\nimport json\nimport os\nfrom IPython.display import display\nimport pandas as pd\nfrom openai import OpenAI\nimport itertools\nimport time\nimport base64\nfrom tenacity import retry, wait_random_exponential, stop_after_attempt\nfrom typing import Any, Dict, List, Generator\nimport ast\n\n%load_ext dotenv\n%dotenv\n\nclient = OpenAI(api_key=os.environ.get(\"OPENAI_BUILD_HOUR_KEY\"))\n```\n\n    The dotenv extension is already loaded. To reload it, use:\n      %reload_ext dotenv\n\n\n### Utilities\n\n\nLet's define utility functions for making calls to the Chat Completions API, one to get the completion and one to get the function call."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 27cc856f-065c-4277-917c-32d2d7aa7999
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"27cc856f-065c-4277-917c-32d2d7aa7999\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"a17f45a9-2d6f-4922-ba9c-27a0e9451df0\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"e243fe126a4284cb6153a51a100efafe11fda7a10aa4de0fcb6904c287e7108c\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"59de967c-427d-4404-845a-9a202977d13e\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"865f52d0f9dde2ddde3c8d5d431f521823465ff8e1de903f782a8fd30aea8370\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 1552, \"end_char_idx\": 3832, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "### Overview\n\n\nThis notebook contains three sections\n\n- **Assessing baseline function calling performance:** Evaluating an out-of-the-box `gpt-3.5-turbo` model on our given function (let's assume that for latency + cost reasons we cannot use `gpt-4o` for a drone copilot)\n- **Generating synthetic data:** Using `gpt-4o` to create 'golden' set of prompts and function invocations to use as training data\n- **Fine-tuning**: Running the fine tuning job, and evaluating the fine-tuned model\n\n\nNote: _This notebook provides an example of how to create synthetic training data for fine tuning for function calling given just a list of functions. While real-world production test evals are preferable, this method produces strong results and can be used in conjunction with real-world training data._\n\n\n# Getting baseline function calling performance\n\n\n\n```python\n#!pip install tenacity -q\n#!pip install openai -q\n#!pip install typing -q\n# !pip install python-dotenv\n```\n\n\n```python\nimport numpy as np\nimport json\nimport os\nfrom IPython.display import display\nimport pandas as pd\nfrom openai import OpenAI\nimport itertools\nimport time\nimport base64\nfrom tenacity import retry, wait_random_exponential, stop_after_attempt\nfrom typing import Any, Dict, List, Generator\nimport ast\n\n%load_ext dotenv\n%dotenv\n\nclient = OpenAI(api_key=os.environ.get(\"OPENAI_BUILD_HOUR_KEY\"))\n```\n\n    The dotenv extension is already loaded. To reload it, use:\n      %reload_ext dotenv\n\n\n### Utilities\n\n\nLet's define utility functions for making calls to the Chat Completions API, one to get the completion and one to get the function call.\n\n\n\n```python\ndef get_chat_completion(\n    messages: list[dict[str, str]],\n    model: str = \"gpt-3.5-turbo\",\n    max_tokens=500,\n    temperature=0.0,\n    stop=None,\n    tools=None,\n    seed=42,\n    functions=None,\n    tool_choice=None,\n) -> str:\n    params = {\n        \"model\": model,\n        \"messages\": messages,\n        \"max_tokens\": max_tokens,\n        \"temperature\": temperature,\n        \"stop\": stop,\n        \"tools\": tools,\n        \"seed\": seed,\n        \"tool_choice\": tool_choice,\n    }\n    if functions:\n        params[\"functions\"] = functions\n\n    completion = client.chat.completions.create(**params)\n    return completion.choices[0].message, completion.usage"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 59de967c-427d-4404-845a-9a202977d13e
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"59de967c-427d-4404-845a-9a202977d13e\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"27cc856f-065c-4277-917c-32d2d7aa7999\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"7d26657b99aee6852163903a5e06d54f1b19957d016aed3bb29c466e24b83246\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"5d5020d4-e2e9-4749-a080-3e9d6c07a655\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"b248981f55ee65a98d4c1c123c6035a1dc0c796a67c346a4505c8a2caa3c72c7\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 2348, \"end_char_idx\": 7078, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "# Getting baseline function calling performance\n\n\n\n```python\n#!pip install tenacity -q\n#!pip install openai -q\n#!pip install typing -q\n# !pip install python-dotenv\n```\n\n\n```python\nimport numpy as np\nimport json\nimport os\nfrom IPython.display import display\nimport pandas as pd\nfrom openai import OpenAI\nimport itertools\nimport time\nimport base64\nfrom tenacity import retry, wait_random_exponential, stop_after_attempt\nfrom typing import Any, Dict, List, Generator\nimport ast\n\n%load_ext dotenv\n%dotenv\n\nclient = OpenAI(api_key=os.environ.get(\"OPENAI_BUILD_HOUR_KEY\"))\n```\n\n    The dotenv extension is already loaded. To reload it, use:\n      %reload_ext dotenv\n\n\n### Utilities\n\n\nLet's define utility functions for making calls to the Chat Completions API, one to get the completion and one to get the function call.\n\n\n\n```python\ndef get_chat_completion(\n    messages: list[dict[str, str]],\n    model: str = \"gpt-3.5-turbo\",\n    max_tokens=500,\n    temperature=0.0,\n    stop=None,\n    tools=None,\n    seed=42,\n    functions=None,\n    tool_choice=None,\n) -> str:\n    params = {\n        \"model\": model,\n        \"messages\": messages,\n        \"max_tokens\": max_tokens,\n        \"temperature\": temperature,\n        \"stop\": stop,\n        \"tools\": tools,\n        \"seed\": seed,\n        \"tool_choice\": tool_choice,\n    }\n    if functions:\n        params[\"functions\"] = functions\n\n    completion = client.chat.completions.create(**params)\n    return completion.choices[0].message, completion.usage\n\n\ndef eval(model: str, system_prompt: str, function_list, prompts_to_expected_tool_name):\n    \"\"\"\n    Evaluate the performance of a model in selecting the correct function based on given prompts.\n\n    Args:\n        model (str): The name of the model to be evaluated.\n        system_prompt (str): The system prompt to be used in the chat completion.\n        function_list (list): A list of functions that the model can call.\n        prompts_to_expected_tool_name (dict): A dictionary mapping prompts to their expected function names.\n\n    Returns:\n        None\n    \"\"\"\n\n    prompts_to_actual = []\n    latencies = []\n    tokens_used = []\n\n    for prompt, expected_function in prompts_to_expected_tool_name.items():\n        messages = [\n            {\"role\": \"system\", \"content\": system_prompt},\n            {\"role\": \"user\", \"content\": prompt},\n        ]\n\n        start_time = time.time()\n        completion, usage = get_chat_completion(\n            model=model,\n            messages=messages,\n            seed=42,\n            tools=function_list,\n            temperature=0.0,\n            tool_choice=\"required\",\n        )\n        end_time = time.time()\n\n        latency = (end_time - start_time) * 1000  # convert to milliseconds\n        latencies.append(latency)\n\n        prompts_to_actual.append(\n            {prompt: completion.tool_calls[0].function.name})\n\n        # Calculate tokens used\n        tokens_used.append(usage.total_tokens)\n\n    total_prompts = len(prompts_to_expected_tool_name)\n\n    # Calculate the number of matches\n    matches = sum(\n        1\n        for result in prompts_to_actual\n        if list(result.values())[0]\n        == prompts_to_expected_tool_name[list(result.keys())[0]]\n    )\n    match_percentage = (matches / total_prompts) * 100\n\n    # Calculate average latency\n    avg_latency = sum(latencies) / total_prompts\n    # Calculate average tokens used\n    avg_tokens_used = sum(tokens_used) / total_prompts\n\n    # Create a DataFrame to store the results\n    results_df = pd.DataFrame(columns=[\"Prompt\", \"Expected\", \"Match\"])\n\n    results_list = []\n    for result in prompts_to_actual:\n        prompt = list(result.keys())[0]\n        actual_function = list(result.values())[0]\n        expected_function = prompts_to_expected_tool_name[prompt]\n        match = actual_function == expected_function\n        results_list.append(\n            {\n                \"Prompt\": prompt,\n                \"Actual\": actual_function,\n                \"Expected\": expected_function,\n                \"Match\": \"Yes\" if match else \"No\",\n            }\n        )\n    results_df = pd.DataFrame(results_list)\n\n    def style_rows(row):\n        match = row[\"Match\"]\n        background_color = \"red\" if match == \"No\" else \"white\"\n        return [\"background-color: {}; color: black\".format(background_color)] * len(\n            row\n        )\n\n    styled_results_df = results_df.style.apply(style_rows, axis=1)\n\n    # Display the DataFrame as a table\n    display(styled_results_df)\n\n    print(\n        f\"Number of matches: {matches} out of {total_prompts} ({match_percentage:.2f}%)\"\n    )\n    print(f\"Average latency per request: {avg_latency:.2f} ms\")\n    print(f\"Average tokens used per request: {avg_tokens_used:.2f}\")\n```\n\n### Baseline testing"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 5d5020d4-e2e9-4749-a080-3e9d6c07a655
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"5d5020d4-e2e9-4749-a080-3e9d6c07a655\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"59de967c-427d-4404-845a-9a202977d13e\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"80e8a570c33b9f4dcc1e4bb0f4e3668e3c9d18af1c7185fedc2fbc7e7fb296e4\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"8e46474d-8777-4682-8a27-e7e938edc713\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"12cccbb7ddb2be23b222f06c2701073aa081abd7ba0a083f9208a8fa23f9f1de\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 7081, \"end_char_idx\": 11119, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "Let's build an intelligent drone co-pilot. We want to be able to give the co-pilot commands, and have it either call the function\nfor that command, or deny that request if the command is unfeasible.\nWe can first define a system prompt for the copilot.\n\n\n\n```python\nDRONE_SYSTEM_PROMPT = \"\"\"You are an intelligent AI that controls a drone. Given a command or request from the user,\ncall one of your functions to complete the request. If the request cannot be completed by your available functions, call the reject_request function.\nIf the request is ambiguous or unclear, reject the request.\"\"\"\n```\n\nNow let's define functions for all of the actions the copilot can take.\n\n\n\n```python\nfunction_list = [\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"takeoff_drone\",\n            \"description\": \"Initiate the drone's takeoff sequence.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"altitude\": {\n                        \"type\": \"integer\",\n                        \"description\": \"Specifies the altitude in meters to which the drone should ascend.\",\n                    }\n                },\n                \"required\": [\"altitude\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"land_drone\",\n            \"description\": \"Land the drone at its current location or a specified landing point.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"location\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"current\", \"home_base\", \"custom\"],\n                        \"description\": \"Specifies the landing location for the drone.\",\n                    },\n                    \"coordinates\": {\n                        \"type\": \"object\",\n                        \"description\": \"GPS coordinates for custom landing location. Required if location is 'custom'.\",\n                    },\n                },\n                \"required\": [\"location\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"control_drone_movement\",\n            \"description\": \"Direct the drone's movement in a specific direction.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"direction\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"forward\", \"backward\", \"left\", \"right\", \"up\", \"down\"],\n                        \"description\": \"Direction in which the drone should move.\",\n                    },\n                    \"distance\": {\n                        \"type\": \"integer\",\n                        \"description\": \"Distance in meters the drone should travel in the specified direction.\",\n                    },\n                },\n                \"required\": [\"direction\", \"distance\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_drone_speed\",\n            \"description\": \"Adjust the speed of the drone.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"speed\": {\n                        \"type\": \"integer\",\n                        \"description\": \"Specifies the speed in km/h. Valid range is 0 to 100.\",\n                        \"minimum\": 0,\n                    }\n                },\n                \"required\": [\"speed\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"control_camera\",\n            \"description\": \"Control the drone's camera to capture images or videos.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"mode\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"photo\", \"video\", \"panorama\"],\n                        \"description\": \"Camera mode to capture content."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 8e46474d-8777-4682-8a27-e7e938edc713
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"8e46474d-8777-4682-8a27-e7e938edc713\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"5d5020d4-e2e9-4749-a080-3e9d6c07a655\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"09466794b0383d64925779e04118f830945e2ef88003e2575596342bc02daf75\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"9cd7b6a0-6c6f-4060-ae1a-87425caf92e7\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"2b4fcf61169a9574d2c73712c8121d77457867a0a09fed3fd68c5fb0cea42ea6\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 9043, \"end_char_idx\": 12956, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "Required if location is 'custom'.\",\n                    },\n                },\n                \"required\": [\"location\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"control_drone_movement\",\n            \"description\": \"Direct the drone's movement in a specific direction.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"direction\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"forward\", \"backward\", \"left\", \"right\", \"up\", \"down\"],\n                        \"description\": \"Direction in which the drone should move.\",\n                    },\n                    \"distance\": {\n                        \"type\": \"integer\",\n                        \"description\": \"Distance in meters the drone should travel in the specified direction.\",\n                    },\n                },\n                \"required\": [\"direction\", \"distance\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_drone_speed\",\n            \"description\": \"Adjust the speed of the drone.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"speed\": {\n                        \"type\": \"integer\",\n                        \"description\": \"Specifies the speed in km/h. Valid range is 0 to 100.\",\n                        \"minimum\": 0,\n                    }\n                },\n                \"required\": [\"speed\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"control_camera\",\n            \"description\": \"Control the drone's camera to capture images or videos.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"mode\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"photo\", \"video\", \"panorama\"],\n                        \"description\": \"Camera mode to capture content.\",\n                    },\n                    \"duration\": {\n                        \"type\": \"integer\",\n                        \"description\": \"Duration in seconds for video capture. Required if mode is 'video'.\",\n                    },\n                },\n                \"required\": [\"mode\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"control_gimbal\",\n            \"description\": \"Adjust the drone's gimbal for camera stabilization and direction.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"tilt\": {\n                        \"type\": \"integer\",\n                        \"description\": \"Tilt angle for the gimbal in degrees.\",\n                    },\n                    \"pan\": {\n                        \"type\": \"integer\",\n                        \"description\": \"Pan angle for the gimbal in degrees.\",\n                    },\n                },\n                \"required\": [\"tilt\", \"pan\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_drone_lighting\",\n            \"description\": \"Control the drone's lighting for visibility and signaling.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"mode\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"on\", \"off\", \"blink\", \"sos\"],\n                        \"description\": \"Lighting mode for the drone.\",\n                    }\n                },\n                \"required\": [\"mode\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"return_to_home\",\n            \"description\": \"Command the drone to return to its home or launch location."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 9cd7b6a0-6c6f-4060-ae1a-87425caf92e7
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"9cd7b6a0-6c6f-4060-ae1a-87425caf92e7\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"8e46474d-8777-4682-8a27-e7e938edc713\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"081c2b0b3d162a0c5b86108f5544db0f7881f4b032d19d03afcd419ab7068655\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b84adc31-464b-4e9d-a6a2-29fa4b1812a5\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"f3c62e1d2a36b331f737a623b9cb6837e3f7ec8b2074c6922f9cc6fc953fddb1\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 11119, \"end_char_idx\": 14898, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "\",\n                    },\n                    \"duration\": {\n                        \"type\": \"integer\",\n                        \"description\": \"Duration in seconds for video capture. Required if mode is 'video'.\",\n                    },\n                },\n                \"required\": [\"mode\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"control_gimbal\",\n            \"description\": \"Adjust the drone's gimbal for camera stabilization and direction.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"tilt\": {\n                        \"type\": \"integer\",\n                        \"description\": \"Tilt angle for the gimbal in degrees.\",\n                    },\n                    \"pan\": {\n                        \"type\": \"integer\",\n                        \"description\": \"Pan angle for the gimbal in degrees.\",\n                    },\n                },\n                \"required\": [\"tilt\", \"pan\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_drone_lighting\",\n            \"description\": \"Control the drone's lighting for visibility and signaling.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"mode\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"on\", \"off\", \"blink\", \"sos\"],\n                        \"description\": \"Lighting mode for the drone.\",\n                    }\n                },\n                \"required\": [\"mode\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"return_to_home\",\n            \"description\": \"Command the drone to return to its home or launch location.\",\n            \"parameters\": {\"type\": \"object\", \"properties\": {}},\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_battery_saver_mode\",\n            \"description\": \"Toggle battery saver mode.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"status\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"on\", \"off\"],\n                        \"description\": \"Toggle battery saver mode.\",\n                    }\n                },\n                \"required\": [\"status\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_obstacle_avoidance\",\n            \"description\": \"Configure obstacle avoidance settings.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"mode\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"on\", \"off\"],\n                        \"description\": \"Toggle obstacle avoidance.\",\n                    }\n                },\n                \"required\": [\"mode\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_follow_me_mode\",\n            \"description\": \"Enable or disable 'follow me' mode.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"status\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"on\", \"off\"],\n                        \"description\": \"Toggle 'follow me' mode.\",\n                    }\n                },\n                \"required\": [\"status\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"calibrate_sensors\",\n            \"description\": \"Initiate calibration sequence for drone's sensors."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: b84adc31-464b-4e9d-a6a2-29fa4b1812a5
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"b84adc31-464b-4e9d-a6a2-29fa4b1812a5\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"9cd7b6a0-6c6f-4060-ae1a-87425caf92e7\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"acf36dbd1c2b75718cc58b70b6a0af1e63c82322530345545b514fad95699f45\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"791d0fc7-3454-49d5-9e67-981679f25034\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"b16b6cebacf9682aa9326005a9e0493cdf650a1a1d7a7ac6b1043232912886c5\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 12956, \"end_char_idx\": 16852, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "\",\n            \"parameters\": {\"type\": \"object\", \"properties\": {}},\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_battery_saver_mode\",\n            \"description\": \"Toggle battery saver mode.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"status\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"on\", \"off\"],\n                        \"description\": \"Toggle battery saver mode.\",\n                    }\n                },\n                \"required\": [\"status\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_obstacle_avoidance\",\n            \"description\": \"Configure obstacle avoidance settings.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"mode\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"on\", \"off\"],\n                        \"description\": \"Toggle obstacle avoidance.\",\n                    }\n                },\n                \"required\": [\"mode\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_follow_me_mode\",\n            \"description\": \"Enable or disable 'follow me' mode.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"status\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"on\", \"off\"],\n                        \"description\": \"Toggle 'follow me' mode.\",\n                    }\n                },\n                \"required\": [\"status\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"calibrate_sensors\",\n            \"description\": \"Initiate calibration sequence for drone's sensors.\",\n            \"parameters\": {\"type\": \"object\", \"properties\": {}},\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_autopilot\",\n            \"description\": \"Enable or disable autopilot mode.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"status\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"on\", \"off\"],\n                        \"description\": \"Toggle autopilot mode.\",\n                    }\n                },\n                \"required\": [\"status\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"configure_led_display\",\n            \"description\": \"Configure the drone's LED display pattern and colors.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"pattern\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"solid\", \"blink\", \"pulse\", \"rainbow\"],\n                        \"description\": \"Pattern for the LED display.\",\n                    },\n                    \"color\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"red\", \"blue\", \"green\", \"yellow\", \"white\"],\n                        \"description\": \"Color for the LED display. Not required if pattern is 'rainbow'.\",\n                    },\n                },\n                \"required\": [\"pattern\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_home_location\",\n            \"description\": \"Set or change the home location for the drone.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"coordinates\": {\n                        \"type\": \"object\",\n                        \"description\": \"GPS coordinates for the home location."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 791d0fc7-3454-49d5-9e67-981679f25034
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"791d0fc7-3454-49d5-9e67-981679f25034\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"b84adc31-464b-4e9d-a6a2-29fa4b1812a5\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"4a44457f4460d87f0f6dd4e0e785bc89d2f261ca774eef3caae386336f4ad081\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"773a6cb4-54fb-4354-a0cc-31e17e2df6cd\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"7e7406058e1abf87bcc40bbdebff9f242dbca6b236d25883f144cf11a3c4ff55\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 14898, \"end_char_idx\": 18412, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "\",\n            \"parameters\": {\"type\": \"object\", \"properties\": {}},\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_autopilot\",\n            \"description\": \"Enable or disable autopilot mode.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"status\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"on\", \"off\"],\n                        \"description\": \"Toggle autopilot mode.\",\n                    }\n                },\n                \"required\": [\"status\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"configure_led_display\",\n            \"description\": \"Configure the drone's LED display pattern and colors.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"pattern\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"solid\", \"blink\", \"pulse\", \"rainbow\"],\n                        \"description\": \"Pattern for the LED display.\",\n                    },\n                    \"color\": {\n                        \"type\": \"string\",\n                        \"enum\": [\"red\", \"blue\", \"green\", \"yellow\", \"white\"],\n                        \"description\": \"Color for the LED display. Not required if pattern is 'rainbow'.\",\n                    },\n                },\n                \"required\": [\"pattern\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"set_home_location\",\n            \"description\": \"Set or change the home location for the drone.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"coordinates\": {\n                        \"type\": \"object\",\n                        \"description\": \"GPS coordinates for the home location.\",\n                    }\n                },\n                \"required\": [\"coordinates\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"reject_request\",\n            \"description\": \"Use this function if the request is not possible.\",\n            \"parameters\": {\"type\": \"object\", \"properties\": {}},\n        },\n    },\n]\n```\n\nFor starters, let's see how function calling performs with some straight forward feasible prompts, and then couple of obviously impossible requests which call the 'reject_request' function.\n\n\n\n```python\nstraightforward_prompts_to_expected = {\n    \"Land the drone at the home base\": \"land_drone\",\n    \"Take off the drone to 50 meters\": \"takeoff_drone\",\n    \"Change speed to 15 kilometers per hour\": \"set_drone_speed\",\n    \"Turn into an elephant!\": \"reject_request\",\n    \"Move the drone forward by 10 meters\": \"control_drone_movement\",\n    \"I want the LED display to blink in red\": \"configure_led_display\",\n    \"Can you take a photo?\": \"control_camera\",\n    \"Can you detect obstacles?\": \"set_obstacle_avoidance\",\n    \"Can you dance for me?\": \"reject_request\",\n    \"Can you follow me?\": \"set_follow_me_mode\",\n}\n```\n\n\n```python\n# Evaluate the model with the given prompts\neval(\n    model=\"gpt-3.5-turbo\",\n    system_prompt=DRONE_SYSTEM_PROMPT,\n    function_list=function_list,\n    prompts_to_expected_tool_name=straightforward_prompts_to_expected,\n)\n```\n\n\n<style type=\"text/css\">\n#T_b01a0_row0_col0, #T_b01a0_row0_col1, #T_b01a0_row0_col2, #T_b01a0_row0_col3, #T_b01a0_row1_col0,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 773a6cb4-54fb-4354-a0cc-31e17e2df6cd
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"773a6cb4-54fb-4354-a0cc-31e17e2df6cd\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"791d0fc7-3454-49d5-9e67-981679f25034\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"09f009171bcf8517dde97b8c0c4d16580b5fb9a7c0b51f9e8cf1bce0d489ab1b\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4321b79a-4caf-428f-8ff0-a791bf4517f2\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"7a71d7dd56e8801497d666ea8787e657c7d9207cc7e6c539915a061aa92bfa56\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 16852, \"end_char_idx\": 19092, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "\",\n                    }\n                },\n                \"required\": [\"coordinates\"],\n            },\n        },\n    },\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"reject_request\",\n            \"description\": \"Use this function if the request is not possible.\",\n            \"parameters\": {\"type\": \"object\", \"properties\": {}},\n        },\n    },\n]\n```\n\nFor starters, let's see how function calling performs with some straight forward feasible prompts, and then couple of obviously impossible requests which call the 'reject_request' function.\n\n\n\n```python\nstraightforward_prompts_to_expected = {\n    \"Land the drone at the home base\": \"land_drone\",\n    \"Take off the drone to 50 meters\": \"takeoff_drone\",\n    \"Change speed to 15 kilometers per hour\": \"set_drone_speed\",\n    \"Turn into an elephant!\": \"reject_request\",\n    \"Move the drone forward by 10 meters\": \"control_drone_movement\",\n    \"I want the LED display to blink in red\": \"configure_led_display\",\n    \"Can you take a photo?\": \"control_camera\",\n    \"Can you detect obstacles?\": \"set_obstacle_avoidance\",\n    \"Can you dance for me?\": \"reject_request\",\n    \"Can you follow me?\": \"set_follow_me_mode\",\n}\n```\n\n\n```python\n# Evaluate the model with the given prompts\neval(\n    model=\"gpt-3.5-turbo\",\n    system_prompt=DRONE_SYSTEM_PROMPT,\n    function_list=function_list,\n    prompts_to_expected_tool_name=straightforward_prompts_to_expected,\n)\n```\n\n\n<style type=\"text/css\">\n#T_b01a0_row0_col0, #T_b01a0_row0_col1, #T_b01a0_row0_col2, #T_b01a0_row0_col3, #T_b01a0_row1_col0, #T_b01a0_row1_col1, #T_b01a0_row1_col2, #T_b01a0_row1_col3, #T_b01a0_row2_col0, #T_b01a0_row2_col1, #T_b01a0_row2_col2, #T_b01a0_row2_col3, #T_b01a0_row3_col0, #T_b01a0_row3_col1, #T_b01a0_row3_col2, #T_b01a0_row3_col3, #T_b01a0_row4_col0, #T_b01a0_row4_col1, #T_b01a0_row4_col2, #T_b01a0_row4_col3, #T_b01a0_row5_col0, #T_b01a0_row5_col1, #T_b01a0_row5_col2, #T_b01a0_row5_col3, #T_b01a0_row6_col0, #T_b01a0_row6_col1, #T_b01a0_row6_col2, #T_b01a0_row6_col3, #T_b01a0_row7_col0, #T_b01a0_row7_col1, #T_b01a0_row7_col2, #T_b01a0_row7_col3, #T_b01a0_row8_col0, #T_b01a0_row8_col1, #T_b01a0_row8_col2, #T_b01a0_row8_col3, #T_b01a0_row9_col0, #T_b01a0_row9_col1, #T_b01a0_row9_col2,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 4321b79a-4caf-428f-8ff0-a791bf4517f2
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"4321b79a-4caf-428f-8ff0-a791bf4517f2\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"773a6cb4-54fb-4354-a0cc-31e17e2df6cd\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"59199e6d5552719234c7dc11427a8d5e820cc61d46e544fdf9774f2d2a20fdf6\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"6c451911-367d-45cb-ba95-ae86955e2b44\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"8fb98215835a62423081338fd157865f2ac4aec2f2398a4cca63e43bbe0bcc94\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 18373, \"end_char_idx\": 19977, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "#T_b01a0_row0_col3, #T_b01a0_row1_col0, #T_b01a0_row1_col1, #T_b01a0_row1_col2, #T_b01a0_row1_col3, #T_b01a0_row2_col0, #T_b01a0_row2_col1, #T_b01a0_row2_col2, #T_b01a0_row2_col3, #T_b01a0_row3_col0, #T_b01a0_row3_col1, #T_b01a0_row3_col2, #T_b01a0_row3_col3, #T_b01a0_row4_col0, #T_b01a0_row4_col1, #T_b01a0_row4_col2, #T_b01a0_row4_col3, #T_b01a0_row5_col0, #T_b01a0_row5_col1, #T_b01a0_row5_col2, #T_b01a0_row5_col3, #T_b01a0_row6_col0, #T_b01a0_row6_col1, #T_b01a0_row6_col2, #T_b01a0_row6_col3, #T_b01a0_row7_col0, #T_b01a0_row7_col1, #T_b01a0_row7_col2, #T_b01a0_row7_col3, #T_b01a0_row8_col0, #T_b01a0_row8_col1, #T_b01a0_row8_col2, #T_b01a0_row8_col3, #T_b01a0_row9_col0, #T_b01a0_row9_col1, #T_b01a0_row9_col2, #T_b01a0_row9_col3 {\n  background-color: white;\n  color: black;\n}\n</style>\n<table id=\"T_b01a0\">\n  <thead>\n    <tr>\n      <th class=\"blank level0\" >&nbsp;</th>\n      <th id=\"T_b01a0_level0_col0\" class=\"col_heading level0 col0\" >Prompt</th>\n      <th id=\"T_b01a0_level0_col1\" class=\"col_heading level0 col1\" >Actual</th>\n      <th id=\"T_b01a0_level0_col2\" class=\"col_heading level0 col2\" >Expected</th>\n      <th id=\"T_b01a0_level0_col3\" class=\"col_heading level0 col3\" >Match</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th id=\"T_b01a0_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n      <td id=\"T_b01a0_row0_col0\" class=\"data row0 col0\" >Land the drone at the home base</td>\n      <td id=\"T_b01a0_row0_col1\" class=\"data row0 col1\" >land_drone</td>\n      <td id=\"T_b01a0_row0_col2\" class=\"data row0 col2\" >land_drone</td>\n      <td id=\"T_b01a0_row0_col3\" class=\"data row0"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 6c451911-367d-45cb-ba95-ae86955e2b44
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"6c451911-367d-45cb-ba95-ae86955e2b44\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4321b79a-4caf-428f-8ff0-a791bf4517f2\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"35f5e14537a0ec958d37a125b6d915925c971d994f8a6215bb4248417ca9c4a5\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"2daf35ee-6c1a-46ff-b658-14035f87bdca\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"1911d06797c0c5a89e9f69dd933499ad41e3c337eeb6fb78ddc4e0d6e741bb57\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 19053, \"end_char_idx\": 20806, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "#T_b01a0_row9_col1, #T_b01a0_row9_col2, #T_b01a0_row9_col3 {\n  background-color: white;\n  color: black;\n}\n</style>\n<table id=\"T_b01a0\">\n  <thead>\n    <tr>\n      <th class=\"blank level0\" >&nbsp;</th>\n      <th id=\"T_b01a0_level0_col0\" class=\"col_heading level0 col0\" >Prompt</th>\n      <th id=\"T_b01a0_level0_col1\" class=\"col_heading level0 col1\" >Actual</th>\n      <th id=\"T_b01a0_level0_col2\" class=\"col_heading level0 col2\" >Expected</th>\n      <th id=\"T_b01a0_level0_col3\" class=\"col_heading level0 col3\" >Match</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th id=\"T_b01a0_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n      <td id=\"T_b01a0_row0_col0\" class=\"data row0 col0\" >Land the drone at the home base</td>\n      <td id=\"T_b01a0_row0_col1\" class=\"data row0 col1\" >land_drone</td>\n      <td id=\"T_b01a0_row0_col2\" class=\"data row0 col2\" >land_drone</td>\n      <td id=\"T_b01a0_row0_col3\" class=\"data row0 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n      <td id=\"T_b01a0_row1_col0\" class=\"data row1 col0\" >Take off the drone to 50 meters</td>\n      <td id=\"T_b01a0_row1_col1\" class=\"data row1 col1\" >takeoff_drone</td>\n      <td id=\"T_b01a0_row1_col2\" class=\"data row1 col2\" >takeoff_drone</td>\n      <td id=\"T_b01a0_row1_col3\" class=\"data row1 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n      <td id=\"T_b01a0_row2_col0\" class=\"data row2 col0\" >Change speed to 15 kilometers per hour</td>\n      <td id=\"T_b01a0_row2_col1\" class=\"data row2 col1\" >set_drone_speed</td>\n      <td id=\"T_b01a0_row2_col2\" class=\"data row2 col2\" >set_drone_speed</td>\n      <td id=\"T_b01a0_row2_col3\" class=\"data row2 col3\""}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 2daf35ee-6c1a-46ff-b658-14035f87bdca
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"2daf35ee-6c1a-46ff-b658-14035f87bdca\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"6c451911-367d-45cb-ba95-ae86955e2b44\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"1b7b50c1010b3278077e2acb2021ff57feddb5700be1114e8360322bb2e8b0eb\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"a59ba55b-27a9-4cde-9030-473e31c6d9ca\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"5df8c3895d9755ade5293d712eac46cbf30442e3ed3ab1351f82c3ae31a3e69e\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 19934, \"end_char_idx\": 21643, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "<td id=\"T_b01a0_row0_col3\" class=\"data row0 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n      <td id=\"T_b01a0_row1_col0\" class=\"data row1 col0\" >Take off the drone to 50 meters</td>\n      <td id=\"T_b01a0_row1_col1\" class=\"data row1 col1\" >takeoff_drone</td>\n      <td id=\"T_b01a0_row1_col2\" class=\"data row1 col2\" >takeoff_drone</td>\n      <td id=\"T_b01a0_row1_col3\" class=\"data row1 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n      <td id=\"T_b01a0_row2_col0\" class=\"data row2 col0\" >Change speed to 15 kilometers per hour</td>\n      <td id=\"T_b01a0_row2_col1\" class=\"data row2 col1\" >set_drone_speed</td>\n      <td id=\"T_b01a0_row2_col2\" class=\"data row2 col2\" >set_drone_speed</td>\n      <td id=\"T_b01a0_row2_col3\" class=\"data row2 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n      <td id=\"T_b01a0_row3_col0\" class=\"data row3 col0\" >Turn into an elephant!</td>\n      <td id=\"T_b01a0_row3_col1\" class=\"data row3 col1\" >reject_request</td>\n      <td id=\"T_b01a0_row3_col2\" class=\"data row3 col2\" >reject_request</td>\n      <td id=\"T_b01a0_row3_col3\" class=\"data row3 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n      <td id=\"T_b01a0_row4_col0\" class=\"data row4 col0\" >Move the drone forward by 10 meters</td>\n      <td id=\"T_b01a0_row4_col1\" class=\"data row4 col1\" >control_drone_movement</td>\n      <td id=\"T_b01a0_row4_col2\" class=\"data row4 col2\" >control_drone_movement</td>\n      <td id=\"T_b01a0_row4_col3\" class=\"data row4 col3\" >Yes</td>"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: a59ba55b-27a9-4cde-9030-473e31c6d9ca
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"a59ba55b-27a9-4cde-9030-473e31c6d9ca\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"2daf35ee-6c1a-46ff-b658-14035f87bdca\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"7903cfc3bc97eb9e516fa519b031ee6a994b81eb545b1a38ddba66a6aeb6b880\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"76d4e458-6690-4522-8b3d-9a002206b2c8\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"aa0fc8b144e319bf640d4ff196dc7dfbfa42b1a31f654da7ddc681cf69e0d940\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 20757, \"end_char_idx\": 22489, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "<td id=\"T_b01a0_row2_col3\" class=\"data row2 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n      <td id=\"T_b01a0_row3_col0\" class=\"data row3 col0\" >Turn into an elephant!</td>\n      <td id=\"T_b01a0_row3_col1\" class=\"data row3 col1\" >reject_request</td>\n      <td id=\"T_b01a0_row3_col2\" class=\"data row3 col2\" >reject_request</td>\n      <td id=\"T_b01a0_row3_col3\" class=\"data row3 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n      <td id=\"T_b01a0_row4_col0\" class=\"data row4 col0\" >Move the drone forward by 10 meters</td>\n      <td id=\"T_b01a0_row4_col1\" class=\"data row4 col1\" >control_drone_movement</td>\n      <td id=\"T_b01a0_row4_col2\" class=\"data row4 col2\" >control_drone_movement</td>\n      <td id=\"T_b01a0_row4_col3\" class=\"data row4 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n      <td id=\"T_b01a0_row5_col0\" class=\"data row5 col0\" >I want the LED display to blink in red</td>\n      <td id=\"T_b01a0_row5_col1\" class=\"data row5 col1\" >configure_led_display</td>\n      <td id=\"T_b01a0_row5_col2\" class=\"data row5 col2\" >configure_led_display</td>\n      <td id=\"T_b01a0_row5_col3\" class=\"data row5 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n      <td id=\"T_b01a0_row6_col0\" class=\"data row6 col0\" >Can you take a photo?</td>\n      <td id=\"T_b01a0_row6_col1\" class=\"data row6 col1\" >control_camera</td>\n      <td id=\"T_b01a0_row6_col2\" class=\"data row6 col2\" >control_camera</td>\n      <td id=\"T_b01a0_row6_col3\" class=\"data row6 col3\" >Yes</td>\n    </tr>\n    <tr>"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 76d4e458-6690-4522-8b3d-9a002206b2c8
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"76d4e458-6690-4522-8b3d-9a002206b2c8\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"a59ba55b-27a9-4cde-9030-473e31c6d9ca\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"6bd069f32e7bdc2705cab8b6f2938799e37e39d79703866f461b739bcd47572a\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"e22b533f-dfd2-4e1a-96b0-f306d75f4e34\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"4ad821a896ad716de7bcc5fa03c178fe35bf57796cac05acbca1250db3a88c30\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 21611, \"end_char_idx\": 23340, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "class=\"data row4 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n      <td id=\"T_b01a0_row5_col0\" class=\"data row5 col0\" >I want the LED display to blink in red</td>\n      <td id=\"T_b01a0_row5_col1\" class=\"data row5 col1\" >configure_led_display</td>\n      <td id=\"T_b01a0_row5_col2\" class=\"data row5 col2\" >configure_led_display</td>\n      <td id=\"T_b01a0_row5_col3\" class=\"data row5 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n      <td id=\"T_b01a0_row6_col0\" class=\"data row6 col0\" >Can you take a photo?</td>\n      <td id=\"T_b01a0_row6_col1\" class=\"data row6 col1\" >control_camera</td>\n      <td id=\"T_b01a0_row6_col2\" class=\"data row6 col2\" >control_camera</td>\n      <td id=\"T_b01a0_row6_col3\" class=\"data row6 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n      <td id=\"T_b01a0_row7_col0\" class=\"data row7 col0\" >Can you detect obstacles?</td>\n      <td id=\"T_b01a0_row7_col1\" class=\"data row7 col1\" >set_obstacle_avoidance</td>\n      <td id=\"T_b01a0_row7_col2\" class=\"data row7 col2\" >set_obstacle_avoidance</td>\n      <td id=\"T_b01a0_row7_col3\" class=\"data row7 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n      <td id=\"T_b01a0_row8_col0\" class=\"data row8 col0\" >Can you dance for me?</td>\n      <td id=\"T_b01a0_row8_col1\" class=\"data row8 col1\" >reject_request</td>\n      <td id=\"T_b01a0_row8_col2\" class=\"data row8 col2\" >reject_request</td>\n      <td id=\"T_b01a0_row8_col3\" class=\"data row8 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row9\""}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: e22b533f-dfd2-4e1a-96b0-f306d75f4e34
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"e22b533f-dfd2-4e1a-96b0-f306d75f4e34\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"76d4e458-6690-4522-8b3d-9a002206b2c8\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"181912c5b078da0a038b8514e196f3ffa99e49689aa50769dc638e52f5bb7cda\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"05f6dc22-bd10-4691-b788-38eab818bb71\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"ca0a30934681d4f01a9f388d711abaf886f2efd88cf5d7ca716aea6ed8d47c50\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 22475, \"end_char_idx\": 24085, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "</tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n      <td id=\"T_b01a0_row7_col0\" class=\"data row7 col0\" >Can you detect obstacles?</td>\n      <td id=\"T_b01a0_row7_col1\" class=\"data row7 col1\" >set_obstacle_avoidance</td>\n      <td id=\"T_b01a0_row7_col2\" class=\"data row7 col2\" >set_obstacle_avoidance</td>\n      <td id=\"T_b01a0_row7_col3\" class=\"data row7 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n      <td id=\"T_b01a0_row8_col0\" class=\"data row8 col0\" >Can you dance for me?</td>\n      <td id=\"T_b01a0_row8_col1\" class=\"data row8 col1\" >reject_request</td>\n      <td id=\"T_b01a0_row8_col2\" class=\"data row8 col2\" >reject_request</td>\n      <td id=\"T_b01a0_row8_col3\" class=\"data row8 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n      <td id=\"T_b01a0_row9_col0\" class=\"data row9 col0\" >Can you follow me?</td>\n      <td id=\"T_b01a0_row9_col1\" class=\"data row9 col1\" >set_follow_me_mode</td>\n      <td id=\"T_b01a0_row9_col2\" class=\"data row9 col2\" >set_follow_me_mode</td>\n      <td id=\"T_b01a0_row9_col3\" class=\"data row9 col3\" >Yes</td>\n    </tr>\n  </tbody>\n</table>\n\n\n\n    Number of matches: 10 out of 10 (100.00%)\n    Average latency per request: 826.81 ms\n    Average tokens used per request: 796.20\n\n\nNice! The model performs quite well with these requests. Now let's try some more difficult requests: requests that are _almost_ feasible and are drone-related, but that the drone cannot actually do, and the pilot should reject."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 05f6dc22-bd10-4691-b788-38eab818bb71
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"05f6dc22-bd10-4691-b788-38eab818bb71\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"e22b533f-dfd2-4e1a-96b0-f306d75f4e34\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"a7275c60449b36aa36443bf2243a5481e78443657d97dacb1aab0ce83dfdac6a\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"965fa879-4106-418f-baa3-ae7c246ab805\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"5ae6de274178b7a35d3c1c613f406eeb967b80877c973ee33f493144861b36f2\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 23016, \"end_char_idx\": 25255, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "class=\"data row8 col0\" >Can you dance for me?</td>\n      <td id=\"T_b01a0_row8_col1\" class=\"data row8 col1\" >reject_request</td>\n      <td id=\"T_b01a0_row8_col2\" class=\"data row8 col2\" >reject_request</td>\n      <td id=\"T_b01a0_row8_col3\" class=\"data row8 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_b01a0_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n      <td id=\"T_b01a0_row9_col0\" class=\"data row9 col0\" >Can you follow me?</td>\n      <td id=\"T_b01a0_row9_col1\" class=\"data row9 col1\" >set_follow_me_mode</td>\n      <td id=\"T_b01a0_row9_col2\" class=\"data row9 col2\" >set_follow_me_mode</td>\n      <td id=\"T_b01a0_row9_col3\" class=\"data row9 col3\" >Yes</td>\n    </tr>\n  </tbody>\n</table>\n\n\n\n    Number of matches: 10 out of 10 (100.00%)\n    Average latency per request: 826.81 ms\n    Average tokens used per request: 796.20\n\n\nNice! The model performs quite well with these requests. Now let's try some more difficult requests: requests that are _almost_ feasible and are drone-related, but that the drone cannot actually do, and the pilot should reject.\n\n\n\n```python\nchallenging_prompts_to_expected = {\n    \"Play pre-recorded audio message\": \"reject_request\",\n    \"Initiate following on social media\": \"reject_request\",\n    \"Scan environment for heat signatures\": \"reject_request\",\n    \"Bump into obstacles\": \"reject_request\",\n    \"Change drone's paint job color\": \"reject_request\",\n    \"Coordinate with nearby drones\": \"reject_request\",\n    \"Change speed to negative 120 km/h\": \"reject_request\",\n    \"Detect a person\": \"reject_request\",\n    \"Please enable night vision\": \"reject_request\",\n    \"Report on humidity levels around you\": \"reject_request\",\n}\n```\n\n\n```python\n# Evaluate the model with the challenging prompts\neval(\n    model=\"gpt-3.5-turbo\",\n    function_list=function_list,\n    system_prompt=DRONE_SYSTEM_PROMPT,\n    prompts_to_expected_tool_name=challenging_prompts_to_expected,\n)\n```\n\n\n<style type=\"text/css\">\n#T_99c20_row0_col0, #T_99c20_row0_col1, #T_99c20_row0_col2, #T_99c20_row0_col3, #T_99c20_row2_col0, #T_99c20_row2_col1, #T_99c20_row2_col2, #T_99c20_row2_col3, #T_99c20_row4_col0, #T_99c20_row4_col1, #T_99c20_row4_col2, #T_99c20_row4_col3, #T_99c20_row5_col0, #T_99c20_row5_col1, #T_99c20_row5_col2,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 965fa879-4106-418f-baa3-ae7c246ab805
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"965fa879-4106-418f-baa3-ae7c246ab805\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"05f6dc22-bd10-4691-b788-38eab818bb71\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"0452174a0659522784d7946f1cb32a69727587589aa49f5f6137a7798cd9195b\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b131451d-b98b-4cba-83c6-3b52b05ecf18\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"03af495ea6d16222415a155b5a22aa29d095af25d4a6dea5c466621c95e78345\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 24089, \"end_char_idx\": 26085, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "```python\nchallenging_prompts_to_expected = {\n    \"Play pre-recorded audio message\": \"reject_request\",\n    \"Initiate following on social media\": \"reject_request\",\n    \"Scan environment for heat signatures\": \"reject_request\",\n    \"Bump into obstacles\": \"reject_request\",\n    \"Change drone's paint job color\": \"reject_request\",\n    \"Coordinate with nearby drones\": \"reject_request\",\n    \"Change speed to negative 120 km/h\": \"reject_request\",\n    \"Detect a person\": \"reject_request\",\n    \"Please enable night vision\": \"reject_request\",\n    \"Report on humidity levels around you\": \"reject_request\",\n}\n```\n\n\n```python\n# Evaluate the model with the challenging prompts\neval(\n    model=\"gpt-3.5-turbo\",\n    function_list=function_list,\n    system_prompt=DRONE_SYSTEM_PROMPT,\n    prompts_to_expected_tool_name=challenging_prompts_to_expected,\n)\n```\n\n\n<style type=\"text/css\">\n#T_99c20_row0_col0, #T_99c20_row0_col1, #T_99c20_row0_col2, #T_99c20_row0_col3, #T_99c20_row2_col0, #T_99c20_row2_col1, #T_99c20_row2_col2, #T_99c20_row2_col3, #T_99c20_row4_col0, #T_99c20_row4_col1, #T_99c20_row4_col2, #T_99c20_row4_col3, #T_99c20_row5_col0, #T_99c20_row5_col1, #T_99c20_row5_col2, #T_99c20_row5_col3, #T_99c20_row7_col0, #T_99c20_row7_col1, #T_99c20_row7_col2, #T_99c20_row7_col3, #T_99c20_row9_col0, #T_99c20_row9_col1, #T_99c20_row9_col2, #T_99c20_row9_col3 {\n  background-color: white;\n  color: black;\n}\n#T_99c20_row1_col0, #T_99c20_row1_col1, #T_99c20_row1_col2, #T_99c20_row1_col3, #T_99c20_row3_col0, #T_99c20_row3_col1, #T_99c20_row3_col2, #T_99c20_row3_col3, #T_99c20_row6_col0, #T_99c20_row6_col1, #T_99c20_row6_col2, #T_99c20_row6_col3, #T_99c20_row8_col0, #T_99c20_row8_col1, #T_99c20_row8_col2, #T_99c20_row8_col3 {\n  background-color: red;\n  color: black;\n}\n</style>\n<table id=\"T_99c20\">\n  <thead>\n    <tr>\n      <th class=\"blank level0\" >&nbsp;</th>\n      <th id=\"T_99c20_level0_col0\" class=\"col_heading level0 col0\" >Prompt</th>\n      <th id=\"T_99c20_level0_col1\" class=\"col_heading level0 col1\""}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: b131451d-b98b-4cba-83c6-3b52b05ecf18
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"b131451d-b98b-4cba-83c6-3b52b05ecf18\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"965fa879-4106-418f-baa3-ae7c246ab805\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8d956fc19d4ca539a592671574560ab1a784bd72106841594f979757e0b438ec\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"97d2409c-95c2-4127-a410-4feec6e1cdc5\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"af1bc7b99b966e5828a08ad1bb375d0eb7b9fd40274c92e444b476e6af707589\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 25256, \"end_char_idx\": 26935, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "#T_99c20_row5_col3, #T_99c20_row7_col0, #T_99c20_row7_col1, #T_99c20_row7_col2, #T_99c20_row7_col3, #T_99c20_row9_col0, #T_99c20_row9_col1, #T_99c20_row9_col2, #T_99c20_row9_col3 {\n  background-color: white;\n  color: black;\n}\n#T_99c20_row1_col0, #T_99c20_row1_col1, #T_99c20_row1_col2, #T_99c20_row1_col3, #T_99c20_row3_col0, #T_99c20_row3_col1, #T_99c20_row3_col2, #T_99c20_row3_col3, #T_99c20_row6_col0, #T_99c20_row6_col1, #T_99c20_row6_col2, #T_99c20_row6_col3, #T_99c20_row8_col0, #T_99c20_row8_col1, #T_99c20_row8_col2, #T_99c20_row8_col3 {\n  background-color: red;\n  color: black;\n}\n</style>\n<table id=\"T_99c20\">\n  <thead>\n    <tr>\n      <th class=\"blank level0\" >&nbsp;</th>\n      <th id=\"T_99c20_level0_col0\" class=\"col_heading level0 col0\" >Prompt</th>\n      <th id=\"T_99c20_level0_col1\" class=\"col_heading level0 col1\" >Actual</th>\n      <th id=\"T_99c20_level0_col2\" class=\"col_heading level0 col2\" >Expected</th>\n      <th id=\"T_99c20_level0_col3\" class=\"col_heading level0 col3\" >Match</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th id=\"T_99c20_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n      <td id=\"T_99c20_row0_col0\" class=\"data row0 col0\" >Play pre-recorded audio message</td>\n      <td id=\"T_99c20_row0_col1\" class=\"data row0 col1\" >reject_request</td>\n      <td id=\"T_99c20_row0_col2\" class=\"data row0 col2\" >reject_request</td>\n      <td id=\"T_99c20_row0_col3\" class=\"data row0 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n      <td id=\"T_99c20_row1_col0\" class=\"data row1 col0\" >Initiate following on social media</td>\n      <td id=\"T_99c20_row1_col1\" class=\"data row1 col1\""}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 97d2409c-95c2-4127-a410-4feec6e1cdc5
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"97d2409c-95c2-4127-a410-4feec6e1cdc5\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"b131451d-b98b-4cba-83c6-3b52b05ecf18\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"327528862e86521b2867cdd982cfcd3b842b423384b1083a3ea33480bd8797fc\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"38388b0e-4824-4223-a4d9-3fdb651198e4\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"2dab33f6d940bf817ce791cd8e35166c8f37ccccf1df387c4733152144a00ada\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 26025, \"end_char_idx\": 27786, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "<th id=\"T_99c20_level0_col1\" class=\"col_heading level0 col1\" >Actual</th>\n      <th id=\"T_99c20_level0_col2\" class=\"col_heading level0 col2\" >Expected</th>\n      <th id=\"T_99c20_level0_col3\" class=\"col_heading level0 col3\" >Match</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th id=\"T_99c20_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n      <td id=\"T_99c20_row0_col0\" class=\"data row0 col0\" >Play pre-recorded audio message</td>\n      <td id=\"T_99c20_row0_col1\" class=\"data row0 col1\" >reject_request</td>\n      <td id=\"T_99c20_row0_col2\" class=\"data row0 col2\" >reject_request</td>\n      <td id=\"T_99c20_row0_col3\" class=\"data row0 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n      <td id=\"T_99c20_row1_col0\" class=\"data row1 col0\" >Initiate following on social media</td>\n      <td id=\"T_99c20_row1_col1\" class=\"data row1 col1\" >set_follow_me_mode</td>\n      <td id=\"T_99c20_row1_col2\" class=\"data row1 col2\" >reject_request</td>\n      <td id=\"T_99c20_row1_col3\" class=\"data row1 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n      <td id=\"T_99c20_row2_col0\" class=\"data row2 col0\" >Scan environment for heat signatures</td>\n      <td id=\"T_99c20_row2_col1\" class=\"data row2 col1\" >reject_request</td>\n      <td id=\"T_99c20_row2_col2\" class=\"data row2 col2\" >reject_request</td>\n      <td id=\"T_99c20_row2_col3\" class=\"data row2 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n      <td id=\"T_99c20_row3_col0\" class=\"data row3 col0\" >Bump into obstacles</td>\n      <td id=\"T_99c20_row3_col1\" class=\"data row3 col1\" >set_obstacle_avoidance</td>\n      <td"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 38388b0e-4824-4223-a4d9-3fdb651198e4
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"38388b0e-4824-4223-a4d9-3fdb651198e4\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"97d2409c-95c2-4127-a410-4feec6e1cdc5\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"6ce1e7897a4a19e0f1cebe41919ac4a660fe99f53d8144e45bac502695a98655\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"845ab9ff-bcbf-4154-9159-9cc4afd8db2a\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"533ba1fa91c68ed807c404625ba14c81fc56e53430eb4c8484e9bc13a3389901\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 26886, \"end_char_idx\": 28633, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "<td id=\"T_99c20_row1_col1\" class=\"data row1 col1\" >set_follow_me_mode</td>\n      <td id=\"T_99c20_row1_col2\" class=\"data row1 col2\" >reject_request</td>\n      <td id=\"T_99c20_row1_col3\" class=\"data row1 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n      <td id=\"T_99c20_row2_col0\" class=\"data row2 col0\" >Scan environment for heat signatures</td>\n      <td id=\"T_99c20_row2_col1\" class=\"data row2 col1\" >reject_request</td>\n      <td id=\"T_99c20_row2_col2\" class=\"data row2 col2\" >reject_request</td>\n      <td id=\"T_99c20_row2_col3\" class=\"data row2 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n      <td id=\"T_99c20_row3_col0\" class=\"data row3 col0\" >Bump into obstacles</td>\n      <td id=\"T_99c20_row3_col1\" class=\"data row3 col1\" >set_obstacle_avoidance</td>\n      <td id=\"T_99c20_row3_col2\" class=\"data row3 col2\" >reject_request</td>\n      <td id=\"T_99c20_row3_col3\" class=\"data row3 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n      <td id=\"T_99c20_row4_col0\" class=\"data row4 col0\" >Change drone's paint job color</td>\n      <td id=\"T_99c20_row4_col1\" class=\"data row4 col1\" >reject_request</td>\n      <td id=\"T_99c20_row4_col2\" class=\"data row4 col2\" >reject_request</td>\n      <td id=\"T_99c20_row4_col3\" class=\"data row4 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n      <td id=\"T_99c20_row5_col0\" class=\"data row5 col0\" >Coordinate with nearby drones</td>\n      <td id=\"T_99c20_row5_col1\" class=\"data row5 col1\" >reject_request</td>\n      <td id=\"T_99c20_row5_col2\" class=\"data"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 845ab9ff-bcbf-4154-9159-9cc4afd8db2a
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"845ab9ff-bcbf-4154-9159-9cc4afd8db2a\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"38388b0e-4824-4223-a4d9-3fdb651198e4\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"614ba95529fc5cbb28096cc57baa7a399460aa33a1e9d3a68e86fe4a130777fb\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"466c4a46-c2bb-468f-96ba-91bff33b09cf\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"1eeb26238f8dec1ced8908ddf5e8c315638e008826587755e963360436c0b798\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 27725, \"end_char_idx\": 29467, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "class=\"data row3 col1\" >set_obstacle_avoidance</td>\n      <td id=\"T_99c20_row3_col2\" class=\"data row3 col2\" >reject_request</td>\n      <td id=\"T_99c20_row3_col3\" class=\"data row3 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n      <td id=\"T_99c20_row4_col0\" class=\"data row4 col0\" >Change drone's paint job color</td>\n      <td id=\"T_99c20_row4_col1\" class=\"data row4 col1\" >reject_request</td>\n      <td id=\"T_99c20_row4_col2\" class=\"data row4 col2\" >reject_request</td>\n      <td id=\"T_99c20_row4_col3\" class=\"data row4 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n      <td id=\"T_99c20_row5_col0\" class=\"data row5 col0\" >Coordinate with nearby drones</td>\n      <td id=\"T_99c20_row5_col1\" class=\"data row5 col1\" >reject_request</td>\n      <td id=\"T_99c20_row5_col2\" class=\"data row5 col2\" >reject_request</td>\n      <td id=\"T_99c20_row5_col3\" class=\"data row5 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n      <td id=\"T_99c20_row6_col0\" class=\"data row6 col0\" >Change speed to negative 120 km/h</td>\n      <td id=\"T_99c20_row6_col1\" class=\"data row6 col1\" >set_drone_speed</td>\n      <td id=\"T_99c20_row6_col2\" class=\"data row6 col2\" >reject_request</td>\n      <td id=\"T_99c20_row6_col3\" class=\"data row6 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n      <td id=\"T_99c20_row7_col0\" class=\"data row7 col0\" >Detect a person</td>\n      <td id=\"T_99c20_row7_col1\" class=\"data row7 col1\" >reject_request</td>\n      <td id=\"T_99c20_row7_col2\" class=\"data row7 col2\" >reject_request</td>"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 466c4a46-c2bb-468f-96ba-91bff33b09cf
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"466c4a46-c2bb-468f-96ba-91bff33b09cf\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"845ab9ff-bcbf-4154-9159-9cc4afd8db2a\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"fdbae09f9a3daa588c0c0d94b1ab2d14c9d08d0ac7001d5c48c5dfc2e0e88cf0\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c8c4ce00-b6e1-4750-8331-37d6c0e5104e\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"0dda9a47d6099a5e419e46c1004c5654aac18507d2f806789c136402ca2fa325\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 28595, \"end_char_idx\": 30296, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "<td id=\"T_99c20_row5_col2\" class=\"data row5 col2\" >reject_request</td>\n      <td id=\"T_99c20_row5_col3\" class=\"data row5 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n      <td id=\"T_99c20_row6_col0\" class=\"data row6 col0\" >Change speed to negative 120 km/h</td>\n      <td id=\"T_99c20_row6_col1\" class=\"data row6 col1\" >set_drone_speed</td>\n      <td id=\"T_99c20_row6_col2\" class=\"data row6 col2\" >reject_request</td>\n      <td id=\"T_99c20_row6_col3\" class=\"data row6 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n      <td id=\"T_99c20_row7_col0\" class=\"data row7 col0\" >Detect a person</td>\n      <td id=\"T_99c20_row7_col1\" class=\"data row7 col1\" >reject_request</td>\n      <td id=\"T_99c20_row7_col2\" class=\"data row7 col2\" >reject_request</td>\n      <td id=\"T_99c20_row7_col3\" class=\"data row7 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n      <td id=\"T_99c20_row8_col0\" class=\"data row8 col0\" >Please enable night vision</td>\n      <td id=\"T_99c20_row8_col1\" class=\"data row8 col1\" >set_drone_lighting</td>\n      <td id=\"T_99c20_row8_col2\" class=\"data row8 col2\" >reject_request</td>\n      <td id=\"T_99c20_row8_col3\" class=\"data row8 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n      <td id=\"T_99c20_row9_col0\" class=\"data row9 col0\" >Report on humidity levels around you</td>\n      <td id=\"T_99c20_row9_col1\" class=\"data row9 col1\" >reject_request</td>\n      <td id=\"T_99c20_row9_col2\" class=\"data row9 col2\" >reject_request</td>\n      <td"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: c8c4ce00-b6e1-4750-8331-37d6c0e5104e
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"c8c4ce00-b6e1-4750-8331-37d6c0e5104e\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"466c4a46-c2bb-468f-96ba-91bff33b09cf\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"5a2b532ae65617ee3c9dd975e152d7b7354f60d53fbd30ee1419c6c63b2bda71\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"a7cc41c1-a05a-44d4-97f9-26b9eb60a805\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"e929d6833418b0c3ac4cb65ebfb1329b88059ea2806617bd3fe5f6c182161f64\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 29397, \"end_char_idx\": 31942, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "<td id=\"T_99c20_row7_col2\" class=\"data row7 col2\" >reject_request</td>\n      <td id=\"T_99c20_row7_col3\" class=\"data row7 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n      <td id=\"T_99c20_row8_col0\" class=\"data row8 col0\" >Please enable night vision</td>\n      <td id=\"T_99c20_row8_col1\" class=\"data row8 col1\" >set_drone_lighting</td>\n      <td id=\"T_99c20_row8_col2\" class=\"data row8 col2\" >reject_request</td>\n      <td id=\"T_99c20_row8_col3\" class=\"data row8 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_99c20_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n      <td id=\"T_99c20_row9_col0\" class=\"data row9 col0\" >Report on humidity levels around you</td>\n      <td id=\"T_99c20_row9_col1\" class=\"data row9 col1\" >reject_request</td>\n      <td id=\"T_99c20_row9_col2\" class=\"data row9 col2\" >reject_request</td>\n      <td id=\"T_99c20_row9_col3\" class=\"data row9 col3\" >Yes</td>\n    </tr>\n  </tbody>\n</table>\n\n\n\n    Number of matches: 6 out of 10 (60.00%)\n    Average latency per request: 610.26 ms\n    Average tokens used per request: 791.90\n\n\nNow we run into some problems.\nThe model here should reject all of these requests, as they are impossible/conflicting/ambiguous given the functions, however instead the model calls functions that are somewhat related to the request, but incorrect. For example, the model sets follow_me_mode when asked to initiate following on social media.\n\n<br>\nIn this simple case, more prompt engineering may resolve some of these issues, but for the purpose of this example we will demonstrate how fine tuning can be used to improve performance. Additionally, while this case is relatively straightforward, as the number of and complexity of the functions increases, fine tuning becomes more and more impactful.\n\nAgain, our goal here is to improve performance and use less tokens, so fine-tuning allows us to:\n\n- Omit function and parameter descriptions: remove the description field from function and parameters\n- Omit parameters: remove the entire properties field from the parameters object\n- Omit function entirely: remove the entire function object from the functions array\n\n\n# Generating synthetic data\n\n\n### Helper functions\n\n\nWe want to generate every invocation of every function, so that we have\nfull coverage of all potential invocations to create synthetic data for. Then, we will use `gpt-4o` to come up with prompts that would call each invocation, and we will use that prompt - function invocation pair as training data."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: a7cc41c1-a05a-44d4-97f9-26b9eb60a805
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"a7cc41c1-a05a-44d4-97f9-26b9eb60a805\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"c8c4ce00-b6e1-4750-8331-37d6c0e5104e\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"fb5c5a2b1e3527a7ba47e7d575126e9947afcd8bd93c2a3d0b541569bb028fd1\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"9f82aae7-6496-422f-9b72-c732404f12bc\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"edc60e07775f0fecace101e6faa2dc2387528bf4072d4b8fd85b8747821d105d\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 30189, \"end_char_idx\": 33378, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": ">reject_request</td>\n      <td id=\"T_99c20_row9_col2\" class=\"data row9 col2\" >reject_request</td>\n      <td id=\"T_99c20_row9_col3\" class=\"data row9 col3\" >Yes</td>\n    </tr>\n  </tbody>\n</table>\n\n\n\n    Number of matches: 6 out of 10 (60.00%)\n    Average latency per request: 610.26 ms\n    Average tokens used per request: 791.90\n\n\nNow we run into some problems.\nThe model here should reject all of these requests, as they are impossible/conflicting/ambiguous given the functions, however instead the model calls functions that are somewhat related to the request, but incorrect. For example, the model sets follow_me_mode when asked to initiate following on social media.\n\n<br>\nIn this simple case, more prompt engineering may resolve some of these issues, but for the purpose of this example we will demonstrate how fine tuning can be used to improve performance. Additionally, while this case is relatively straightforward, as the number of and complexity of the functions increases, fine tuning becomes more and more impactful.\n\nAgain, our goal here is to improve performance and use less tokens, so fine-tuning allows us to:\n\n- Omit function and parameter descriptions: remove the description field from function and parameters\n- Omit parameters: remove the entire properties field from the parameters object\n- Omit function entirely: remove the entire function object from the functions array\n\n\n# Generating synthetic data\n\n\n### Helper functions\n\n\nWe want to generate every invocation of every function, so that we have\nfull coverage of all potential invocations to create synthetic data for. Then, we will use `gpt-4o` to come up with prompts that would call each invocation, and we will use that prompt - function invocation pair as training data.\n\n\nGenerating every invocation for a function with fixed enums is more simple, but for a function such as\n`control_gimbal` we need to set the `tilt` and `pan` integer values, so to generate those synthetic invocations we will first set a placeholder, and then later use `gpt-4o` to come up with reasonable values.\n\n\n\n```python\nplaceholder_int = \"fill_in_int\"\nplaceholder_string = \"fill_in_string\"\n```\n\nThe functions below take in all the functions from the function list, and look\nat all the potential invocations of those functions given each function's parameters.\nThe functions also account for `required` parameters, so that all the invocations\nare actually feasible.\n\n\n\n```python\ndef generate_permutations(\n    params: Dict[str, Dict[str, Any]]\n) -> Generator[Dict[str, Any], None, None]:\n    \"\"\"\n    Generates all possible permutations for given parameters.\n\n    :param params: Parameter dictionary containing required and optional fields.\n    :return: A generator yielding each permutation.\n    \"\"\"\n\n    # Extract the required fields from the parameters\n    required_fields = params.get(\"required\", [])\n\n    # Generate permutations for required fields\n    required_permutations = generate_required_permutations(params, required_fields)\n\n    # Generate optional permutations based on each required permutation\n    for required_perm in required_permutations:\n        yield from generate_optional_permutations(params, required_perm)"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 9f82aae7-6496-422f-9b72-c732404f12bc
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"9f82aae7-6496-422f-9b72-c732404f12bc\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"a7cc41c1-a05a-44d4-97f9-26b9eb60a805\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2168a568d6327f4254aaf24b76760e2e644736d55be744fede6aadb952fd2f2c\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"fbe445f6-9c47-4d6b-b04b-5b19572e3d34\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"0936691a0f4e7bbb6a8a0669b6e1810241cc3ae7a52d47f7672469ca732468ee\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 31588, \"end_char_idx\": 35246, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "# Generating synthetic data\n\n\n### Helper functions\n\n\nWe want to generate every invocation of every function, so that we have\nfull coverage of all potential invocations to create synthetic data for. Then, we will use `gpt-4o` to come up with prompts that would call each invocation, and we will use that prompt - function invocation pair as training data.\n\n\nGenerating every invocation for a function with fixed enums is more simple, but for a function such as\n`control_gimbal` we need to set the `tilt` and `pan` integer values, so to generate those synthetic invocations we will first set a placeholder, and then later use `gpt-4o` to come up with reasonable values.\n\n\n\n```python\nplaceholder_int = \"fill_in_int\"\nplaceholder_string = \"fill_in_string\"\n```\n\nThe functions below take in all the functions from the function list, and look\nat all the potential invocations of those functions given each function's parameters.\nThe functions also account for `required` parameters, so that all the invocations\nare actually feasible.\n\n\n\n```python\ndef generate_permutations(\n    params: Dict[str, Dict[str, Any]]\n) -> Generator[Dict[str, Any], None, None]:\n    \"\"\"\n    Generates all possible permutations for given parameters.\n\n    :param params: Parameter dictionary containing required and optional fields.\n    :return: A generator yielding each permutation.\n    \"\"\"\n\n    # Extract the required fields from the parameters\n    required_fields = params.get(\"required\", [])\n\n    # Generate permutations for required fields\n    required_permutations = generate_required_permutations(params, required_fields)\n\n    # Generate optional permutations based on each required permutation\n    for required_perm in required_permutations:\n        yield from generate_optional_permutations(params, required_perm)\n\n\ndef generate_required_permutations(\n    params: Dict[str, Dict[str, Any]], required_fields: List[str]\n) -> List[Dict[str, Any]]:\n    \"\"\"\n    Generates permutations for the required fields.\n\n    :param params: Parameter dictionary.\n    :param required_fields: List of required fields.\n    :return: A list of permutations for required fields.\n    \"\"\"\n\n    # Get all possible values for each required field\n    required_values = [get_possible_values(params, field) for field in required_fields]\n\n    # Generate permutations from possible values\n    return [\n        dict(zip(required_fields, values))\n        for values in itertools.product(*required_values)\n    ]\n\n\ndef generate_optional_permutations(\n    params: Dict[str, Dict[str, Any]], base_perm: Dict[str, Any]\n) -> Generator[Dict[str, Any], None, None]:\n    \"\"\"\n    Generates permutations for optional fields based on a base permutation.\n\n    :param params: Parameter dictionary.\n    :param base_perm: Base permutation dictionary.\n    :return: A generator yielding each permutation for optional fields.\n    \"\"\"\n\n    # Determine the fields that are optional by subtracting the base permutation's fields from all properties\n    optional_fields = set(params[\"properties\"]) - set(base_perm)\n\n    # Iterate through all combinations of optional fields\n    for field_subset in itertools.chain.from_iterable(\n        itertools.combinations(optional_fields, r)\n        for r in range(len(optional_fields) + 1)\n    ):\n\n        # Generate product of possible values for the current subset of fields\n        for values in itertools.product(\n            *(get_possible_values(params, field) for field in field_subset)\n        ):\n\n            # Create a new permutation by combining base permutation and current field values\n            new_perm = {**base_perm, **dict(zip(field_subset, values))}\n\n            yield new_perm"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: fbe445f6-9c47-4d6b-b04b-5b19572e3d34
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"fbe445f6-9c47-4d6b-b04b-5b19572e3d34\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"9f82aae7-6496-422f-9b72-c732404f12bc\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"7d26730f425b2b6d020fe2d329e4946d25785add171a35e4a5bb994e30825f28\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"da5f6734-b858-4400-a358-8ed2a6b2a449\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"9ae34d082576d9658dcf480809ba14cfa083c7531ab1b609a59c8979c2f4d6a5\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 33381, \"end_char_idx\": 36449, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "def generate_required_permutations(\n    params: Dict[str, Dict[str, Any]], required_fields: List[str]\n) -> List[Dict[str, Any]]:\n    \"\"\"\n    Generates permutations for the required fields.\n\n    :param params: Parameter dictionary.\n    :param required_fields: List of required fields.\n    :return: A list of permutations for required fields.\n    \"\"\"\n\n    # Get all possible values for each required field\n    required_values = [get_possible_values(params, field) for field in required_fields]\n\n    # Generate permutations from possible values\n    return [\n        dict(zip(required_fields, values))\n        for values in itertools.product(*required_values)\n    ]\n\n\ndef generate_optional_permutations(\n    params: Dict[str, Dict[str, Any]], base_perm: Dict[str, Any]\n) -> Generator[Dict[str, Any], None, None]:\n    \"\"\"\n    Generates permutations for optional fields based on a base permutation.\n\n    :param params: Parameter dictionary.\n    :param base_perm: Base permutation dictionary.\n    :return: A generator yielding each permutation for optional fields.\n    \"\"\"\n\n    # Determine the fields that are optional by subtracting the base permutation's fields from all properties\n    optional_fields = set(params[\"properties\"]) - set(base_perm)\n\n    # Iterate through all combinations of optional fields\n    for field_subset in itertools.chain.from_iterable(\n        itertools.combinations(optional_fields, r)\n        for r in range(len(optional_fields) + 1)\n    ):\n\n        # Generate product of possible values for the current subset of fields\n        for values in itertools.product(\n            *(get_possible_values(params, field) for field in field_subset)\n        ):\n\n            # Create a new permutation by combining base permutation and current field values\n            new_perm = {**base_perm, **dict(zip(field_subset, values))}\n\n            yield new_perm\n\n\ndef get_possible_values(params: Dict[str, Dict[str, Any]], field: str) -> List[Any]:\n    \"\"\"\n    Retrieves possible values for a given field.\n\n    :param params: Parameter dictionary.\n    :param field: The field for which to get possible values.\n    :return: A list of possible values.\n    \"\"\"\n\n    # Extract field information from the parameters\n    field_info = params[\"properties\"][field]\n\n    # Based on the field's type or presence of 'enum', determine and return the possible values\n    if \"enum\" in field_info:\n        return field_info[\"enum\"]\n    elif field_info[\"type\"] == \"integer\":\n        return [placeholder_int]\n    elif field_info[\"type\"] == \"string\":\n        return [placeholder_string]\n    elif field_info[\"type\"] == \"boolean\":\n        return [True, False]\n    elif field_info[\"type\"] == \"array\" and \"enum\" in field_info[\"items\"]:\n        enum_values = field_info[\"items\"][\"enum\"]\n        all_combinations = [\n            list(combo)\n            for i in range(1, len(enum_values) + 1)\n            for combo in itertools.combinations(enum_values, i)\n        ]\n        return all_combinations\n    return []\n```\n\n### Let's generate every invocation for every function first\n\n\nPrompts:"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: da5f6734-b858-4400-a358-8ed2a6b2a449
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"da5f6734-b858-4400-a358-8ed2a6b2a449\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"fbe445f6-9c47-4d6b-b04b-5b19572e3d34\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"03b9bae3866dfa324ce544f89d49d620fb536d746c4b5c0281425d7a2197e7ed\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"424ece57-32c4-4169-9100-602810ef617a\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"e405244e7d1b5bf45c3de5391ab1c59e1542ccf86725cedafd2bf158f8583767\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 35249, \"end_char_idx\": 37219, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "def get_possible_values(params: Dict[str, Dict[str, Any]], field: str) -> List[Any]:\n    \"\"\"\n    Retrieves possible values for a given field.\n\n    :param params: Parameter dictionary.\n    :param field: The field for which to get possible values.\n    :return: A list of possible values.\n    \"\"\"\n\n    # Extract field information from the parameters\n    field_info = params[\"properties\"][field]\n\n    # Based on the field's type or presence of 'enum', determine and return the possible values\n    if \"enum\" in field_info:\n        return field_info[\"enum\"]\n    elif field_info[\"type\"] == \"integer\":\n        return [placeholder_int]\n    elif field_info[\"type\"] == \"string\":\n        return [placeholder_string]\n    elif field_info[\"type\"] == \"boolean\":\n        return [True, False]\n    elif field_info[\"type\"] == \"array\" and \"enum\" in field_info[\"items\"]:\n        enum_values = field_info[\"items\"][\"enum\"]\n        all_combinations = [\n            list(combo)\n            for i in range(1, len(enum_values) + 1)\n            for combo in itertools.combinations(enum_values, i)\n        ]\n        return all_combinations\n    return []\n```\n\n### Let's generate every invocation for every function first\n\n\nPrompts:\n\n\n\n```python\nINVOCATION_FILLER_PROMPT = \"\"\"\n1) Input reasonable values for 'fill_in_string' and 'fill_in_int' in the invocation here: {invocation}. Reasonable values are determined by the function definition. Use the\nthe entire function provided here :{function} to get context over what proper fill_in_string and fill_in_int values would be.\nExample:\n\nInput: invocation: {{\n    \"name\": \"control_camera\",\n    \"arguments\": {{\n      \"mode\":\"video\",\n      \"duration\":\"fill_in_int\"\n    }}\n}},\nfunction:{function}\n\nOutput: invocation: {{\n    \"name\": \"control_camera\",\n    \"arguments\": {{\n      \"mode\":\"video\",\n      \"duration\": 30\n    }}\n}}\n\n\nMAKE SURE output is just a dictionary with keys 'name' and 'arguments', no other text or response.\n\nInput: {invocation}\nOutput:\n\"\"\""}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 424ece57-32c4-4169-9100-602810ef617a
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"424ece57-32c4-4169-9100-602810ef617a\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"da5f6734-b858-4400-a358-8ed2a6b2a449\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"ba6247c89332040bfd095e595099b41d5e7e8648e13210fb28ae19f2d0c316de\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"ebf3e0d8-d068-4b91-8b7b-c533dac906e0\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"27808f73badd61967c9fdf7f853e4e71bf6186e93700ed7e139d3891994dd25b\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 36441, \"end_char_idx\": 39018, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "Prompts:\n\n\n\n```python\nINVOCATION_FILLER_PROMPT = \"\"\"\n1) Input reasonable values for 'fill_in_string' and 'fill_in_int' in the invocation here: {invocation}. Reasonable values are determined by the function definition. Use the\nthe entire function provided here :{function} to get context over what proper fill_in_string and fill_in_int values would be.\nExample:\n\nInput: invocation: {{\n    \"name\": \"control_camera\",\n    \"arguments\": {{\n      \"mode\":\"video\",\n      \"duration\":\"fill_in_int\"\n    }}\n}},\nfunction:{function}\n\nOutput: invocation: {{\n    \"name\": \"control_camera\",\n    \"arguments\": {{\n      \"mode\":\"video\",\n      \"duration\": 30\n    }}\n}}\n\n\nMAKE SURE output is just a dictionary with keys 'name' and 'arguments', no other text or response.\n\nInput: {invocation}\nOutput:\n\"\"\"\n\n\nCOMMAND_GENERATION_PROMPT = \"\"\"\nYou are to output 2 commands, questions or statements that would generate the inputted function and parameters.\nPlease make the commands or questions natural, as a person would ask, and the command or questions should be varied and not repetitive.\nIt should not always mirror the exact technical terminology used in the function and parameters, rather reflect a conversational and intuitive request.\nFor instance, the prompt should not be 'turn on the dome light', as that is too technical, but rather 'turn on the inside lights'.\nAnother example, is the prompt should not be 'turn on the HVAC', but rather 'turn on the air conditioning'. Use language a normal driver would use, even if\nit is technically incorrect but colloquially used.\n\nRULES: ALWAYS put a backwards slash before an apostrophe or single quote '. For example, do not say don't but say don\\'t.\nPrompts MUST be in double quotes as well.\n\nExample\n\nInput: {{'name': 'calibrate_sensors','arguments': {{}}'' }}\nPrompt: [\"The sensors are out of whack, can you reset them\", \"The calibration of the drone is off, fix it please!\"]\n\nInput: {{'name': 'set_autopilot','arguments': {{'status': 'off'}}}}\nPrompt: [\"OK, I want to take back pilot control now\",\"Turn off the automatic pilot I'm ready control it\"]\n\nInput: {invocation}\nPrompt:\n\"\"\"\n```\n\nIn the below snippet, we generate the invocation of each function except for the `reject_request` function.\n\nTo perform effective fine-tuning we need correctly labeled data. We could manually come up with examples and label the data,\\\nor we can generate synthetic data with the help of `gpt-4o` <br>\n\nEmpirically, `gpt-4o` needs a bit more help to get good realistic examples of prompts that would generate the `reject_request` function, so we'll do that next..."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: ebf3e0d8-d068-4b91-8b7b-c533dac906e0
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"ebf3e0d8-d068-4b91-8b7b-c533dac906e0\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"424ece57-32c4-4169-9100-602810ef617a\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"1b10ea48a70e1d61c53569911575e83d08dad64ceb539bd4787c028211640748\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"50202160-6f8a-49c0-8374-194daa722048\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"c91e70ffb9d8ebcf471eeede5800b903e6d6b946e0ecfdb58cfd9d92c9a1948e\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 39022, \"end_char_idx\": 42152, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "```python\ninput_objects = []\nall_but_reject = [f for f in function_list if f.get(\"name\") != \"reject_request\"]\n\nfor function in all_but_reject:\n    func_name = function[\"function\"][\"name\"]\n    params = function[\"function\"][\"parameters\"]\n    for arguments in generate_permutations(params):\n        if any(val in arguments.values() for val in [\"fill_in_int\", \"fill_in_str\"]):\n            input_object = {\"name\": func_name, \"arguments\": arguments}\n            messages = [\n                {\n                    \"role\": \"user\",\n                    \"content\": INVOCATION_FILLER_PROMPT.format(\n                        invocation=str(input_object), function=function\n                    ),\n                }\n            ]\n            input_object, usage = get_chat_completion(\n                model=\"gpt-4o\", messages=messages, max_tokens=200, temperature=0.1\n            ).content\n        else:\n            input_object = {\"name\": func_name, \"arguments\": arguments}\n\n        input_objects.append(input_object)\n```\n\nNow that we have all the invocations, let's use `gpt-4o` to generate prompts that would result in those invocations\n\n\n\n```python\ndef remove_sequences(input_string):\n    # Replace the specific sequences with an empty string\n    cleaned_string = input_string.replace(\"```json\", \"\")  # Remove \"```json\" first\n    cleaned_string = cleaned_string.replace(\"```\", \"\")  # Then remove \"```\"\n    return json.loads(cleaned_string)\n```\n\n\n```python\ndef create_commands(invocation_list):\n    example_list = []\n    for i, invocation in enumerate(invocation_list):\n        if i < 100:\n            print(\n                f\"\\033[34m{np.round(100*i/len(invocation_list),1)}% complete\\033[0m\")\n            if type(invocation) == str or \"json\" in invocation:\n                invocation = remove_sequences(invocation)\n            print(invocation)\n\n        # Format the prompt with the invocation string\n        request_prompt = COMMAND_GENERATION_PROMPT.format(\n            invocation=invocation)\n\n        messages = [{\"role\": \"user\", \"content\": f\"{request_prompt}\"}]\n        completion, usage = get_chat_completion(messages, temperature=0.8)\n        command_dict = {\"Input\": invocation, \"Prompt\": completion.content}\n        example_list.append(command_dict)\n    return example_list\n```\n\n\n```python\n# Only printing the first 10 rows\ntraining_examples_unformatted = create_commands(input_objects)\n```\n\n    \u001b[34m0.0% complete\u001b[0m\n    {'name': 'takeoff_drone', 'arguments': {'altitude': 100}}\n    \u001b[34m1.8% complete\u001b[0m\n    {'name': 'land_drone', 'arguments': {'location': 'current'}}\n    \u001b[34m3.5% complete\u001b[0m\n    {'name': 'land_drone', 'arguments': {'location': 'home_base'}}\n    \u001b[34m5.3% complete\u001b[0m\n    {'name': 'land_drone', 'arguments': {'location': 'custom'}}\n    \u001b[34m7.0% complete\u001b[0m\n    {'name': 'control_drone_movement', 'arguments': {'direction': 'forward', 'distance': 100}}\n    \u001b[34m8.8% complete\u001b[0m\n    {'name': 'control_drone_movement', 'arguments': {'direction': 'backward', 'distance': 50}}\n    \u001b[34m10.5% complete\u001b[0m\n    {'name': 'control_drone_movement', 'arguments': {'direction': 'left', 'distance': 10}}\n    \u001b[34m12."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 50202160-6f8a-49c0-8374-194daa722048
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"50202160-6f8a-49c0-8374-194daa722048\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ebf3e0d8-d068-4b91-8b7b-c533dac906e0\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"a5c40e32e4d954b6b1b2a58ce307c105de01089f5d2b04a01b96399c798d7986\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f21a4260-6058-4fa3-b930-9d38682ee83e\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"43d820f3573b22bb1ff0913f29f2469154782b2720148138ce6014135eb6a2fc\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 41299, \"end_char_idx\": 43528, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "```python\n# Only printing the first 10 rows\ntraining_examples_unformatted = create_commands(input_objects)\n```\n\n    \u001b[34m0.0% complete\u001b[0m\n    {'name': 'takeoff_drone', 'arguments': {'altitude': 100}}\n    \u001b[34m1.8% complete\u001b[0m\n    {'name': 'land_drone', 'arguments': {'location': 'current'}}\n    \u001b[34m3.5% complete\u001b[0m\n    {'name': 'land_drone', 'arguments': {'location': 'home_base'}}\n    \u001b[34m5.3% complete\u001b[0m\n    {'name': 'land_drone', 'arguments': {'location': 'custom'}}\n    \u001b[34m7.0% complete\u001b[0m\n    {'name': 'control_drone_movement', 'arguments': {'direction': 'forward', 'distance': 100}}\n    \u001b[34m8.8% complete\u001b[0m\n    {'name': 'control_drone_movement', 'arguments': {'direction': 'backward', 'distance': 50}}\n    \u001b[34m10.5% complete\u001b[0m\n    {'name': 'control_drone_movement', 'arguments': {'direction': 'left', 'distance': 10}}\n    \u001b[34m12.3% complete\u001b[0m\n    {'name': 'control_drone_movement', 'arguments': {'direction': 'right', 'distance': 10}}\n    \u001b[34m14.0% complete\u001b[0m\n    {'name': 'control_drone_movement', 'arguments': {'direction': 'up', 'distance': 10}}\n    \u001b[34m15.8% complete\u001b[0m\n    {'name': 'control_drone_movement', 'arguments': {'direction': 'down', 'distance': 10}}\n    \u001b[34m17.5% complete\u001b[0m\n    {'name': 'set_drone_speed', 'arguments': {'speed': 10}}\n    \u001b[34m19.3% complete\u001b[0m\n    {'name': 'control_camera', 'arguments': {'mode': 'photo'}}\n    \u001b[34m21.1% complete\u001b[0m\n    {'name': 'control_camera', 'arguments': {'mode': 'photo', 'duration': 10}}\n    \u001b[34m22.8% complete\u001b[0m\n    {'name': 'control_camera', 'arguments': {'mode': 'video'}}\n    \u001b[34m24.6% complete\u001b[0m\n    {'name': 'control_camera', 'arguments': {'mode': 'video', 'duration': 60}}\n    \u001b[34m26.3% complete\u001b[0m\n    {'name': 'control_camera', 'arguments': {'mode': 'panorama'}}\n    \u001b[34m28.1% complete\u001b[0m\n    {'name': 'control_camera', 'arguments': {'mode': 'panorama', 'duration': 60}}\n    \u001b[34m29.8% complete\u001b[0m\n    {'name': 'control_gimbal', 'arguments': {'tilt': 45, 'pan': 90}}\n    \u001b[34m31.6% complete\u001b[0m\n    {'name': 'set_drone_lighting', 'arguments': {'mode': 'on'}}\n    \u001b[34m33.3% complete\u001b[0m\n    {'name': 'set_drone_lighting', 'arguments': {'mode': 'off'}}\n    \u001b[34m35.1% complete\u001b[0m\n    {'name': 'set_drone_lighting',"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: f21a4260-6058-4fa3-b930-9d38682ee83e
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f21a4260-6058-4fa3-b930-9d38682ee83e\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"50202160-6f8a-49c0-8374-194daa722048\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"5b01f7528d7cc94fd22c5ff07905d975d79c80780ce6450f2046967ab5e14230\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"5a5e786b-4ad4-4634-8a5c-14dfb5cb8b9e\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"008e2e7517cc10270fed48e49c79476a09012fc2428b66838e9d5c8ded11f1c7\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 42444, \"end_char_idx\": 44579, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "'arguments': {'direction': 'down', 'distance': 10}}\n    \u001b[34m17.5% complete\u001b[0m\n    {'name': 'set_drone_speed', 'arguments': {'speed': 10}}\n    \u001b[34m19.3% complete\u001b[0m\n    {'name': 'control_camera', 'arguments': {'mode': 'photo'}}\n    \u001b[34m21.1% complete\u001b[0m\n    {'name': 'control_camera', 'arguments': {'mode': 'photo', 'duration': 10}}\n    \u001b[34m22.8% complete\u001b[0m\n    {'name': 'control_camera', 'arguments': {'mode': 'video'}}\n    \u001b[34m24.6% complete\u001b[0m\n    {'name': 'control_camera', 'arguments': {'mode': 'video', 'duration': 60}}\n    \u001b[34m26.3% complete\u001b[0m\n    {'name': 'control_camera', 'arguments': {'mode': 'panorama'}}\n    \u001b[34m28.1% complete\u001b[0m\n    {'name': 'control_camera', 'arguments': {'mode': 'panorama', 'duration': 60}}\n    \u001b[34m29.8% complete\u001b[0m\n    {'name': 'control_gimbal', 'arguments': {'tilt': 45, 'pan': 90}}\n    \u001b[34m31.6% complete\u001b[0m\n    {'name': 'set_drone_lighting', 'arguments': {'mode': 'on'}}\n    \u001b[34m33.3% complete\u001b[0m\n    {'name': 'set_drone_lighting', 'arguments': {'mode': 'off'}}\n    \u001b[34m35.1% complete\u001b[0m\n    {'name': 'set_drone_lighting', 'arguments': {'mode': 'blink'}}\n    \u001b[34m36.8% complete\u001b[0m\n    {'name': 'set_drone_lighting', 'arguments': {'mode': 'sos'}}\n    \u001b[34m38.6% complete\u001b[0m\n    {'name': 'return_to_home', 'arguments': {}}\n    \u001b[34m40.4% complete\u001b[0m\n    {'name': 'set_battery_saver_mode', 'arguments': {'status': 'on'}}\n    \u001b[34m42.1% complete\u001b[0m\n    {'name': 'set_battery_saver_mode', 'arguments': {'status': 'off'}}\n    \u001b[34m43.9% complete\u001b[0m\n    {'name': 'set_obstacle_avoidance', 'arguments': {'mode': 'on'}}\n    \u001b[34m45.6% complete\u001b[0m\n    {'name': 'set_obstacle_avoidance', 'arguments': {'mode': 'off'}}\n    \u001b[34m47.4% complete\u001b[0m\n    {'name': 'set_follow_me_mode', 'arguments': {'status': 'on'}}\n    \u001b[34m49.1% complete\u001b[0m\n    {'name': 'set_follow_me_mode', 'arguments': {'status': 'off'}}\n    \u001b[34m50.9% complete\u001b[0m\n    {'name': 'calibrate_sensors', 'arguments': {}}\n    \u001b[34m52.6% complete\u001b[0m\n    {'name': 'set_autopilot', 'arguments': {'status': 'on'}}\n    \u001b[34m54.4% complete\u001b[0m\n    {'name': 'set_autopilot', 'arguments': {'status': 'off'}}\n    \u001b[34m56."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 5a5e786b-4ad4-4634-8a5c-14dfb5cb8b9e
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"5a5e786b-4ad4-4634-8a5c-14dfb5cb8b9e\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f21a4260-6058-4fa3-b930-9d38682ee83e\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"9f79594e61c04c1be453ac4aec2694497bd3b221f81a419ee74db19a5312efda\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"0498571c-b3dd-43b4-af47-04c9191101bc\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"a9b039c718520255cf42e17c97fd0db5a63ff2066ec9a34fecdb98cebfccca4b\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 43478, \"end_char_idx\": 45728, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "1% complete\u001b[0m\n    {'name': 'set_drone_lighting', 'arguments': {'mode': 'blink'}}\n    \u001b[34m36.8% complete\u001b[0m\n    {'name': 'set_drone_lighting', 'arguments': {'mode': 'sos'}}\n    \u001b[34m38.6% complete\u001b[0m\n    {'name': 'return_to_home', 'arguments': {}}\n    \u001b[34m40.4% complete\u001b[0m\n    {'name': 'set_battery_saver_mode', 'arguments': {'status': 'on'}}\n    \u001b[34m42.1% complete\u001b[0m\n    {'name': 'set_battery_saver_mode', 'arguments': {'status': 'off'}}\n    \u001b[34m43.9% complete\u001b[0m\n    {'name': 'set_obstacle_avoidance', 'arguments': {'mode': 'on'}}\n    \u001b[34m45.6% complete\u001b[0m\n    {'name': 'set_obstacle_avoidance', 'arguments': {'mode': 'off'}}\n    \u001b[34m47.4% complete\u001b[0m\n    {'name': 'set_follow_me_mode', 'arguments': {'status': 'on'}}\n    \u001b[34m49.1% complete\u001b[0m\n    {'name': 'set_follow_me_mode', 'arguments': {'status': 'off'}}\n    \u001b[34m50.9% complete\u001b[0m\n    {'name': 'calibrate_sensors', 'arguments': {}}\n    \u001b[34m52.6% complete\u001b[0m\n    {'name': 'set_autopilot', 'arguments': {'status': 'on'}}\n    \u001b[34m54.4% complete\u001b[0m\n    {'name': 'set_autopilot', 'arguments': {'status': 'off'}}\n    \u001b[34m56.1% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'solid'}}\n    \u001b[34m57.9% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'solid', 'color': 'red'}}\n    \u001b[34m59.6% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'solid', 'color': 'blue'}}\n    \u001b[34m61.4% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'solid', 'color': 'green'}}\n    \u001b[34m63.2% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'solid', 'color': 'yellow'}}\n    \u001b[34m64.9% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'solid', 'color': 'white'}}\n    \u001b[34m66.7% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'blink'}}\n    \u001b[34m68.4% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'blink', 'color': 'red'}}\n    \u001b[34m70.2% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'blink', 'color': 'blue'}}\n    \u001b[34m71.9% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'blink', 'color': 'green'}}\n    \u001b[34m73."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 0498571c-b3dd-43b4-af47-04c9191101bc
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"0498571c-b3dd-43b4-af47-04c9191101bc\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"5a5e786b-4ad4-4634-8a5c-14dfb5cb8b9e\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"150863ead67c39afc0a904a39d4e07ad3db774606b3c0307dcf4fe8ea9579d6a\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4a447704-5b05-4317-9540-22babd44cc3d\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"adbecc63de3ee9606026b33cbd9ab150059511c5047693c9cfefdb1b971dde8d\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 44535, \"end_char_idx\": 46936, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "'arguments': {'status': 'off'}}\n    \u001b[34m56.1% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'solid'}}\n    \u001b[34m57.9% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'solid', 'color': 'red'}}\n    \u001b[34m59.6% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'solid', 'color': 'blue'}}\n    \u001b[34m61.4% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'solid', 'color': 'green'}}\n    \u001b[34m63.2% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'solid', 'color': 'yellow'}}\n    \u001b[34m64.9% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'solid', 'color': 'white'}}\n    \u001b[34m66.7% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'blink'}}\n    \u001b[34m68.4% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'blink', 'color': 'red'}}\n    \u001b[34m70.2% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'blink', 'color': 'blue'}}\n    \u001b[34m71.9% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'blink', 'color': 'green'}}\n    \u001b[34m73.7% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'blink', 'color': 'yellow'}}\n    \u001b[34m75.4% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'blink', 'color': 'white'}}\n    \u001b[34m77.2% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'pulse'}}\n    \u001b[34m78.9% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'pulse', 'color': 'red'}}\n    \u001b[34m80.7% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'pulse', 'color': 'blue'}}\n    \u001b[34m82.5% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'pulse', 'color': 'green'}}\n    \u001b[34m84.2% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'pulse', 'color': 'yellow'}}\n    \u001b[34m86.0% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'pulse', 'color': 'white'}}\n    \u001b[34m87.7% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow'}}\n    \u001b[34m89.5% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow', 'color': 'red'}}\n    \u001b[34m91.2% complete\u001b[0m\n    {'name': 'configure_led_display',"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 4a447704-5b05-4317-9540-22babd44cc3d
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"4a447704-5b05-4317-9540-22babd44cc3d\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"0498571c-b3dd-43b4-af47-04c9191101bc\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8deef10ca98e40f2b79ac9849ac393ba6c948b463bdda4505f561292e26515d7\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"46d3142e-46f5-4792-8493-3f0db9566c62\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"8816ecb32fa8870585f9ae01f9369a628ae8caf4197d7a08a01f86b9eb4a220e\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 45697, \"end_char_idx\": 48166, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "'color': 'green'}}\n    \u001b[34m73.7% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'blink', 'color': 'yellow'}}\n    \u001b[34m75.4% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'blink', 'color': 'white'}}\n    \u001b[34m77.2% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'pulse'}}\n    \u001b[34m78.9% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'pulse', 'color': 'red'}}\n    \u001b[34m80.7% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'pulse', 'color': 'blue'}}\n    \u001b[34m82.5% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'pulse', 'color': 'green'}}\n    \u001b[34m84.2% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'pulse', 'color': 'yellow'}}\n    \u001b[34m86.0% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'pulse', 'color': 'white'}}\n    \u001b[34m87.7% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow'}}\n    \u001b[34m89.5% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow', 'color': 'red'}}\n    \u001b[34m91.2% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow', 'color': 'blue'}}\n    \u001b[34m93.0% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow', 'color': 'green'}}\n    \u001b[34m94.7% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow', 'color': 'yellow'}}\n    \u001b[34m96.5% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow', 'color': 'white'}}\n    \u001b[34m98.2% complete\u001b[0m\n    {'name': 'reject_request', 'arguments': {}}\n\n\nNow let's format the training examples properly. For more documentation on the proper training data formatting for fine tuning for function calling, see here: https://platform.openai.com/docs/guides/fine-tuning/fine-tuning-examples\n\n\n\n```python\ndef remove_descriptions(function_list):\n    for function in function_list:\n        func = function[\"function\"]\n        if \"description\" in func:\n            del func[\"description\"]\n\n        params = func[\"parameters\"]\n        if \"properties\" in params:\n            for param in params[\"properties\"].values():\n                if \"description\" in param:\n                    del param[\"description\"]\n\n    return function_list\n\n\nmodified_function_list = remove_descriptions(function_list)\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 46d3142e-46f5-4792-8493-3f0db9566c62
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"46d3142e-46f5-4792-8493-3f0db9566c62\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4a447704-5b05-4317-9540-22babd44cc3d\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"f3cc724786c0981a97bbb1f497a6c19ca984c0c5d4087114259594039d6fa128\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4d22017a-a139-4144-9624-15b35842e8b2\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"e716f43a2271a9d0f3910f33377ed82f424b99ca1657d32865f5fd208b79489f\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 46661, \"end_char_idx\": 49501, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "7% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow'}}\n    \u001b[34m89.5% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow', 'color': 'red'}}\n    \u001b[34m91.2% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow', 'color': 'blue'}}\n    \u001b[34m93.0% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow', 'color': 'green'}}\n    \u001b[34m94.7% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow', 'color': 'yellow'}}\n    \u001b[34m96.5% complete\u001b[0m\n    {'name': 'configure_led_display', 'arguments': {'pattern': 'rainbow', 'color': 'white'}}\n    \u001b[34m98.2% complete\u001b[0m\n    {'name': 'reject_request', 'arguments': {}}\n\n\nNow let's format the training examples properly. For more documentation on the proper training data formatting for fine tuning for function calling, see here: https://platform.openai.com/docs/guides/fine-tuning/fine-tuning-examples\n\n\n\n```python\ndef remove_descriptions(function_list):\n    for function in function_list:\n        func = function[\"function\"]\n        if \"description\" in func:\n            del func[\"description\"]\n\n        params = func[\"parameters\"]\n        if \"properties\" in params:\n            for param in params[\"properties\"].values():\n                if \"description\" in param:\n                    del param[\"description\"]\n\n    return function_list\n\n\nmodified_function_list = remove_descriptions(function_list)\n```\n\n\n```python\ntraining_examples = []\n\nfor prompt in training_examples_unformatted:\n    # adjust formatting for training data specs\n\n    # if its not a dict, convert to dict\n    if type(prompt[\"Input\"]) != dict:\n        prompt[\"Input\"] = ast.literal_eval(prompt[\"Input\"])\n    prompt[\"Input\"][\"arguments\"] = json.dumps(prompt[\"Input\"][\"arguments\"])\n    try:\n        prompt[\"Prompt\"] = json.loads(prompt[\"Prompt\"])\n    except:\n        continue\n    for p in prompt[\"Prompt\"]:\n        print(p)\n        print(prompt[\"Input\"])\n        tool_calls = [\n            {\"id\": \"call_id\", \"type\": \"function\", \"function\": prompt[\"Input\"]}\n        ]\n        training_examples.append(\n            {\n                \"messages\": [\n                    {\"role\": \"system\", \"content\": DRONE_SYSTEM_PROMPT},\n                    {\"role\": \"user\", \"content\": p},\n                    {\"role\": \"assistant\", \"tool_calls\": tool_calls},\n                ],\n                \"parallel_tool_calls\": False,\n                \"tools\": modified_function_list,\n            }\n        )\n```\n\n    Let's get the drone in the air, how high should it go?\n    {'name': 'takeoff_drone', 'arguments': '{\"altitude\": 100}'}\n    Ready for takeoff, how high should the drone fly?\n    {'name': 'takeoff_drone', 'arguments': '{\"altitude\": 100}'}\n    Can you bring the drone down to where we are?"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 4d22017a-a139-4144-9624-15b35842e8b2
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"4d22017a-a139-4144-9624-15b35842e8b2\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"46d3142e-46f5-4792-8493-3f0db9566c62\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"9fc07e958e885016e928c458333a84d0f45e72c0f13ee375702af084a81f4ec7\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f3bce6ff-8e64-4898-8b9f-b3f4f63aac34\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"70f83438c601fcca0b07cf5e787384925b7d813bbf82b7817d7bee5922d85772\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 47668, \"end_char_idx\": 50870, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "```python\ndef remove_descriptions(function_list):\n    for function in function_list:\n        func = function[\"function\"]\n        if \"description\" in func:\n            del func[\"description\"]\n\n        params = func[\"parameters\"]\n        if \"properties\" in params:\n            for param in params[\"properties\"].values():\n                if \"description\" in param:\n                    del param[\"description\"]\n\n    return function_list\n\n\nmodified_function_list = remove_descriptions(function_list)\n```\n\n\n```python\ntraining_examples = []\n\nfor prompt in training_examples_unformatted:\n    # adjust formatting for training data specs\n\n    # if its not a dict, convert to dict\n    if type(prompt[\"Input\"]) != dict:\n        prompt[\"Input\"] = ast.literal_eval(prompt[\"Input\"])\n    prompt[\"Input\"][\"arguments\"] = json.dumps(prompt[\"Input\"][\"arguments\"])\n    try:\n        prompt[\"Prompt\"] = json.loads(prompt[\"Prompt\"])\n    except:\n        continue\n    for p in prompt[\"Prompt\"]:\n        print(p)\n        print(prompt[\"Input\"])\n        tool_calls = [\n            {\"id\": \"call_id\", \"type\": \"function\", \"function\": prompt[\"Input\"]}\n        ]\n        training_examples.append(\n            {\n                \"messages\": [\n                    {\"role\": \"system\", \"content\": DRONE_SYSTEM_PROMPT},\n                    {\"role\": \"user\", \"content\": p},\n                    {\"role\": \"assistant\", \"tool_calls\": tool_calls},\n                ],\n                \"parallel_tool_calls\": False,\n                \"tools\": modified_function_list,\n            }\n        )\n```\n\n    Let's get the drone in the air, how high should it go?\n    {'name': 'takeoff_drone', 'arguments': '{\"altitude\": 100}'}\n    Ready for takeoff, how high should the drone fly?\n    {'name': 'takeoff_drone', 'arguments': '{\"altitude\": 100}'}\n    Can you bring the drone down to where we are?\n    {'name': 'land_drone', 'arguments': '{\"location\": \"current\"}'}\n    Let's get the drone to land right here\n    {'name': 'land_drone', 'arguments': '{\"location\": \"current\"}'}\n    Bring the drone back to base for landing\n    {'name': 'land_drone', 'arguments': '{\"location\": \"home_base\"}'}\n    Can you safely land the drone at home base\n    {'name': 'land_drone', 'arguments': '{\"location\": \"home_base\"}'}\n    Can you make the drone move to the left by 10 units?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"left\", \"distance\": 10}'}\n    I need the drone to go left, could you move it 10 steps that way?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"left\", \"distance\": 10}'}\n    Can you move the drone to the right by 10 feet?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"right\", \"distance\": 10}'}\n    I need the drone to go 10 feet to the right, can you do that?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"right\", \"distance\": 10}'}\n    Can you make the drone go upwards by 10 units?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"up\", \"distance\": 10}'}\n    I need the drone to move up, can you do that for me?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"up\", \"distance\": 10}'}\n    Can you bring the drone lower by 10 feet please?"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: f3bce6ff-8e64-4898-8b9f-b3f4f63aac34
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f3bce6ff-8e64-4898-8b9f-b3f4f63aac34\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4d22017a-a139-4144-9624-15b35842e8b2\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"87b203330301a06f524f3002c06a359285584533756cb8c72340fa492524a6db\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"a038b60f-2ec7-40a8-b2c9-2693a972f02c\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"a5cd2e96efeddbd49fc117a07af801f025551ecc7f1a3bfe4af2f05763d6439a\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 49506, \"end_char_idx\": 52116, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "{'name': 'land_drone', 'arguments': '{\"location\": \"current\"}'}\n    Let's get the drone to land right here\n    {'name': 'land_drone', 'arguments': '{\"location\": \"current\"}'}\n    Bring the drone back to base for landing\n    {'name': 'land_drone', 'arguments': '{\"location\": \"home_base\"}'}\n    Can you safely land the drone at home base\n    {'name': 'land_drone', 'arguments': '{\"location\": \"home_base\"}'}\n    Can you make the drone move to the left by 10 units?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"left\", \"distance\": 10}'}\n    I need the drone to go left, could you move it 10 steps that way?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"left\", \"distance\": 10}'}\n    Can you move the drone to the right by 10 feet?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"right\", \"distance\": 10}'}\n    I need the drone to go 10 feet to the right, can you do that?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"right\", \"distance\": 10}'}\n    Can you make the drone go upwards by 10 units?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"up\", \"distance\": 10}'}\n    I need the drone to move up, can you do that for me?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"up\", \"distance\": 10}'}\n    Can you bring the drone lower by 10 feet please?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"down\", \"distance\": 10}'}\n    I need the drone to descend 10 units, can you make that happen?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"down\", \"distance\": 10}'}\n    Can you make the drone go faster?\n    {'name': 'set_drone_speed', 'arguments': '{\"speed\": 10}'}\n    I think the drone should speed up a bit, don't you think?\n    {'name': 'set_drone_speed', 'arguments': '{\"speed\": 10}'}\n    I want to take a picture, can you switch the camera mode to photo\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"photo\"}'}\n    Let's capture this moment, switch the camera to photo mode please\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"photo\"}'}\n    Can you switch the camera to photo mode and take a picture for 10 seconds?\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"photo\", \"duration\": 10}'}\n    I need to capture something, can you set the camera to take photos for 10 seconds?\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"photo\", \"duration\": 10}'}\n    Can you switch the camera to video mode?\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"video\"}'}\n    I want to record, can you set the camera to video mode?"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: a038b60f-2ec7-40a8-b2c9-2693a972f02c
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"a038b60f-2ec7-40a8-b2c9-2693a972f02c\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f3bce6ff-8e64-4898-8b9f-b3f4f63aac34\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"f0ba888d4dbfd0b9f5ce8e3cf2591451295f0e0c04619abb8bcdc18df22c84c5\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"79e0facf-d461-4594-a6ec-6b179aef7785\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"52b3f8c9622b91912f96a0a2f130f6b604a957026432ba6e0a556a07d9f4e2e5\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 50731, \"end_char_idx\": 53272, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "{'name': 'control_drone_movement', 'arguments': '{\"direction\": \"up\", \"distance\": 10}'}\n    Can you bring the drone lower by 10 feet please?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"down\", \"distance\": 10}'}\n    I need the drone to descend 10 units, can you make that happen?\n    {'name': 'control_drone_movement', 'arguments': '{\"direction\": \"down\", \"distance\": 10}'}\n    Can you make the drone go faster?\n    {'name': 'set_drone_speed', 'arguments': '{\"speed\": 10}'}\n    I think the drone should speed up a bit, don't you think?\n    {'name': 'set_drone_speed', 'arguments': '{\"speed\": 10}'}\n    I want to take a picture, can you switch the camera mode to photo\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"photo\"}'}\n    Let's capture this moment, switch the camera to photo mode please\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"photo\"}'}\n    Can you switch the camera to photo mode and take a picture for 10 seconds?\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"photo\", \"duration\": 10}'}\n    I need to capture something, can you set the camera to take photos for 10 seconds?\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"photo\", \"duration\": 10}'}\n    Can you switch the camera to video mode?\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"video\"}'}\n    I want to record, can you set the camera to video mode?\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"video\"}'}\n    Can you start recording a video with the camera for a minute\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"video\", \"duration\": 60}'}\n    I need to film something, can you put the camera in video mode for 60 seconds\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"video\", \"duration\": 60}'}\n    Can you switch the camera to panorama mode?\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"panorama\"}'}\n    I'd like to take a 360-degree photo, can you set the camera to panorama mode?\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"panorama\"}'}\n    Can you set the camera to take a panorama shot for a minute\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"panorama\", \"duration\": 60}'}\n    I'd like to switch the camera mode to panorama and have it last for a minute\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"panorama\", \"duration\": 60}'}\n    Can you adjust the camera angle up and to the right?\n    {'name': 'control_gimbal', 'arguments': '{\"tilt\": 45, \"pan\": 90}'}\n    I need to tilt the camera up and pan it to the right, can you do that?"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 79e0facf-d461-4594-a6ec-6b179aef7785
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"79e0facf-d461-4594-a6ec-6b179aef7785\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"a038b60f-2ec7-40a8-b2c9-2693a972f02c\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"f18f99e780a145e6d3f3886a291026333b9b3d35dadbb9f14c95ea72886c8ded\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"0caabbac-9867-435b-9a0c-ecd2943f6beb\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"d76124c319154f2dbca48554e8f2fc199a43c604583ffdd7fa816c9f00114440\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 51870, \"end_char_idx\": 54462, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "{'name': 'control_camera', 'arguments': '{\"mode\": \"photo\", \"duration\": 10}'}\n    Can you switch the camera to video mode?\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"video\"}'}\n    I want to record, can you set the camera to video mode?\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"video\"}'}\n    Can you start recording a video with the camera for a minute\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"video\", \"duration\": 60}'}\n    I need to film something, can you put the camera in video mode for 60 seconds\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"video\", \"duration\": 60}'}\n    Can you switch the camera to panorama mode?\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"panorama\"}'}\n    I'd like to take a 360-degree photo, can you set the camera to panorama mode?\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"panorama\"}'}\n    Can you set the camera to take a panorama shot for a minute\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"panorama\", \"duration\": 60}'}\n    I'd like to switch the camera mode to panorama and have it last for a minute\n    {'name': 'control_camera', 'arguments': '{\"mode\": \"panorama\", \"duration\": 60}'}\n    Can you adjust the camera angle up and to the right?\n    {'name': 'control_gimbal', 'arguments': '{\"tilt\": 45, \"pan\": 90}'}\n    I need to tilt the camera up and pan it to the right, can you do that?\n    {'name': 'control_gimbal', 'arguments': '{\"tilt\": 45, \"pan\": 90}'}\n    Can you turn on the lights for the drone\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"on\"}'}\n    I need some extra light, can you activate it on the drone\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"on\"}'}\n    Can you turn off the lights on the drone\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"off\"}'}\n    I don't need the drone lights on, can you switch them off\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"off\"}'}\n    Can you make the drone lights flash?\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"blink\"}'}\n    I want the drone lights to blink, can you do that?\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"blink\"}'}\n    Can you switch the drone lights to the SOS mode, just in case?\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"sos\"}'}\n    I need the drone lights to flash SOS, can you set that up?\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"sos\"}'}\n    Can you bring the drone back home now?\n    {'name': 'return_to_home', 'arguments': '{}'}\n    Is it time for the drone to return to base?"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 0caabbac-9867-435b-9a0c-ecd2943f6beb
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"0caabbac-9867-435b-9a0c-ecd2943f6beb\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"79e0facf-d461-4594-a6ec-6b179aef7785\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"0fdd17883e26064e0f0f6205551300d9bbfec0355a751388da743268ae446fb9\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b63aa7a4-9a9f-4191-8a91-9119ce1eea6f\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"1a6bec9c48cf99d74fd61d434e81a60aaa3ddd01d9c3810b254e5ab9cbd55a46\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 53131, \"end_char_idx\": 55842, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "{'name': 'control_gimbal', 'arguments': '{\"tilt\": 45, \"pan\": 90}'}\n    I need to tilt the camera up and pan it to the right, can you do that?\n    {'name': 'control_gimbal', 'arguments': '{\"tilt\": 45, \"pan\": 90}'}\n    Can you turn on the lights for the drone\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"on\"}'}\n    I need some extra light, can you activate it on the drone\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"on\"}'}\n    Can you turn off the lights on the drone\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"off\"}'}\n    I don't need the drone lights on, can you switch them off\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"off\"}'}\n    Can you make the drone lights flash?\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"blink\"}'}\n    I want the drone lights to blink, can you do that?\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"blink\"}'}\n    Can you switch the drone lights to the SOS mode, just in case?\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"sos\"}'}\n    I need the drone lights to flash SOS, can you set that up?\n    {'name': 'set_drone_lighting', 'arguments': '{\"mode\": \"sos\"}'}\n    Can you bring the drone back home now?\n    {'name': 'return_to_home', 'arguments': '{}'}\n    Is it time for the drone to return to base?\n    {'name': 'return_to_home', 'arguments': '{}'}\n    My phone battery is draining so fast, can you turn on battery saver mode\n    {'name': 'set_battery_saver_mode', 'arguments': '{\"status\": \"on\"}'}\n    I need my laptop battery to last longer, can you switch on battery saver mode\n    {'name': 'set_battery_saver_mode', 'arguments': '{\"status\": \"on\"}'}\n    My phone battery is draining too quickly, can you turn off the battery saver mode\n    {'name': 'set_battery_saver_mode', 'arguments': '{\"status\": \"off\"}'}\n    I feel like my device is slower with battery saver on, can we turn it off?\n    {'name': 'set_battery_saver_mode', 'arguments': '{\"status\": \"off\"}'}\n    I want the car to avoid obstacles, can you turn on that feature?\n    {'name': 'set_obstacle_avoidance', 'arguments': '{\"mode\": \"on\"}'}\n    Can you activate the obstacle avoidance mode for safety purposes?\n    {'name': 'set_obstacle_avoidance', 'arguments': '{\"mode\": \"on\"}'}\n    I'd like to turn off obstacle detection, how do I do that?\n    {'name': 'set_obstacle_avoidance', 'arguments': '{\"mode\": \"off\"}'}\n    Can you disable the obstacle avoidance feature for now?\n    {'name': 'set_obstacle_avoidance', 'arguments': '{\"mode\": \"off\"}'}\n    Can you activate the follow me mode?\n    {'name': 'set_follow_me_mode', 'arguments': '{\"status\": \"on\"}'}\n    I want the car to follow me, can you turn on that feature?"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: b63aa7a4-9a9f-4191-8a91-9119ce1eea6f
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"b63aa7a4-9a9f-4191-8a91-9119ce1eea6f\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"0caabbac-9867-435b-9a0c-ecd2943f6beb\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"6c122ba9bb203650dedb06cb1beee2a8bdc27f059441d7c80baa2be871402255\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7ee0981d-c01f-41ed-9685-e6152ce7af2c\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"797aab6d7d11d1d1075087796c844f8ae191289886b6f95d598b867a854e7d66\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 54369, \"end_char_idx\": 57087, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "{'name': 'return_to_home', 'arguments': '{}'}\n    Is it time for the drone to return to base?\n    {'name': 'return_to_home', 'arguments': '{}'}\n    My phone battery is draining so fast, can you turn on battery saver mode\n    {'name': 'set_battery_saver_mode', 'arguments': '{\"status\": \"on\"}'}\n    I need my laptop battery to last longer, can you switch on battery saver mode\n    {'name': 'set_battery_saver_mode', 'arguments': '{\"status\": \"on\"}'}\n    My phone battery is draining too quickly, can you turn off the battery saver mode\n    {'name': 'set_battery_saver_mode', 'arguments': '{\"status\": \"off\"}'}\n    I feel like my device is slower with battery saver on, can we turn it off?\n    {'name': 'set_battery_saver_mode', 'arguments': '{\"status\": \"off\"}'}\n    I want the car to avoid obstacles, can you turn on that feature?\n    {'name': 'set_obstacle_avoidance', 'arguments': '{\"mode\": \"on\"}'}\n    Can you activate the obstacle avoidance mode for safety purposes?\n    {'name': 'set_obstacle_avoidance', 'arguments': '{\"mode\": \"on\"}'}\n    I'd like to turn off obstacle detection, how do I do that?\n    {'name': 'set_obstacle_avoidance', 'arguments': '{\"mode\": \"off\"}'}\n    Can you disable the obstacle avoidance feature for now?\n    {'name': 'set_obstacle_avoidance', 'arguments': '{\"mode\": \"off\"}'}\n    Can you activate the follow me mode?\n    {'name': 'set_follow_me_mode', 'arguments': '{\"status\": \"on\"}'}\n    I want the car to follow me, can you turn on that feature?\n    {'name': 'set_follow_me_mode', 'arguments': '{\"status\": \"on\"}'}\n    I don't want the drone following me anymore, can you turn that off?\n    {'name': 'set_follow_me_mode', 'arguments': '{\"status\": \"off\"}'}\n    Can you disable the follow-me mode on the drone?\n    {'name': 'set_follow_me_mode', 'arguments': '{\"status\": \"off\"}'}\n    The sensors are acting up, can you recalibrate them\n    {'name': 'calibrate_sensors', 'arguments': '{}'}\n    My device doesn't seem to be sensing correctly, can you adjust it\n    {'name': 'calibrate_sensors', 'arguments': '{}'}\n    I'm too tired to drive, can you turn on the autopilot\n    {'name': 'set_autopilot', 'arguments': '{\"status\": \"on\"}'}\n    Let the car drive itself, turn on autopilot\n    {'name': 'set_autopilot', 'arguments': '{\"status\": \"on\"}'}\n    I'm feeling more confident, turn off the autopilot\n    {'name': 'set_autopilot', 'arguments': '{\"status\": \"off\"}'}\n    I think I can handle it, deactivate the automatic pilot\n    {'name': 'set_autopilot', 'arguments': '{\"status\": \"off\"}'}\n    Can you set the display to a steady yellow color?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"solid\", \"color\": \"yellow\"}'}\n    I'd like the LED display to be a solid yellow, please."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 7ee0981d-c01f-41ed-9685-e6152ce7af2c
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"7ee0981d-c01f-41ed-9685-e6152ce7af2c\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"b63aa7a4-9a9f-4191-8a91-9119ce1eea6f\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"ee64ba8fc290e7dc10a58c4e2c8289762fbb4b227afe16d11550f4907d286d83\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"8b36b0f8-cc14-4ce1-885e-52a42a128453\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"0e3df9ed3688dbde6e4c977b6bf84579733b0b3c71682a44a843005124c17d1b\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 55716, \"end_char_idx\": 58453, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "{'name': 'set_follow_me_mode', 'arguments': '{\"status\": \"on\"}'}\n    I want the car to follow me, can you turn on that feature?\n    {'name': 'set_follow_me_mode', 'arguments': '{\"status\": \"on\"}'}\n    I don't want the drone following me anymore, can you turn that off?\n    {'name': 'set_follow_me_mode', 'arguments': '{\"status\": \"off\"}'}\n    Can you disable the follow-me mode on the drone?\n    {'name': 'set_follow_me_mode', 'arguments': '{\"status\": \"off\"}'}\n    The sensors are acting up, can you recalibrate them\n    {'name': 'calibrate_sensors', 'arguments': '{}'}\n    My device doesn't seem to be sensing correctly, can you adjust it\n    {'name': 'calibrate_sensors', 'arguments': '{}'}\n    I'm too tired to drive, can you turn on the autopilot\n    {'name': 'set_autopilot', 'arguments': '{\"status\": \"on\"}'}\n    Let the car drive itself, turn on autopilot\n    {'name': 'set_autopilot', 'arguments': '{\"status\": \"on\"}'}\n    I'm feeling more confident, turn off the autopilot\n    {'name': 'set_autopilot', 'arguments': '{\"status\": \"off\"}'}\n    I think I can handle it, deactivate the automatic pilot\n    {'name': 'set_autopilot', 'arguments': '{\"status\": \"off\"}'}\n    Can you set the display to a steady yellow color?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"solid\", \"color\": \"yellow\"}'}\n    I'd like the LED display to be a solid yellow, please.\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"solid\", \"color\": \"yellow\"}'}\n    Can you make the lights flash on and off\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"blink\"}'}\n    I want the LED display to blink, can you set that up\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"blink\"}'}\n    Can you make the lights flash in red?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"blink\", \"color\": \"red\"}'}\n    How do I set the display to blink in red?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"blink\", \"color\": \"red\"}'}\n    Can you make the lights flash in yellow?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"blink\", \"color\": \"yellow\"}'}\n    How do I set the display to blink in yellow?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"blink\", \"color\": \"yellow\"}'}\n    Can you make the lights blink instead of staying steady\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\"}'}\n    I want the LEDs to flash, not stay solid\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\"}'}\n    Can you make the LED display pulse in red, please?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"red\"}'}\n    I'd like the LED display to flash in red, can you set that up?"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 8b36b0f8-cc14-4ce1-885e-52a42a128453
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"8b36b0f8-cc14-4ce1-885e-52a42a128453\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7ee0981d-c01f-41ed-9685-e6152ce7af2c\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8d66bfdb35e87fae9aa80e8f90e5881469d82385aab99e364396a4cfb398cdd4\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"0f06a82e-5cd2-4b51-809a-dcdcfdbdaeed\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"37948defa57c3dc413b978b059d8fbc1954583b7a938d988b9dd7ad53131799c\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 56939, \"end_char_idx\": 59865, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "{'name': 'configure_led_display', 'arguments': '{\"pattern\": \"solid\", \"color\": \"yellow\"}'}\n    I'd like the LED display to be a solid yellow, please.\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"solid\", \"color\": \"yellow\"}'}\n    Can you make the lights flash on and off\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"blink\"}'}\n    I want the LED display to blink, can you set that up\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"blink\"}'}\n    Can you make the lights flash in red?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"blink\", \"color\": \"red\"}'}\n    How do I set the display to blink in red?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"blink\", \"color\": \"red\"}'}\n    Can you make the lights flash in yellow?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"blink\", \"color\": \"yellow\"}'}\n    How do I set the display to blink in yellow?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"blink\", \"color\": \"yellow\"}'}\n    Can you make the lights blink instead of staying steady\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\"}'}\n    I want the LEDs to flash, not stay solid\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\"}'}\n    Can you make the LED display pulse in red, please?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"red\"}'}\n    I'd like the LED display to flash in red, can you set that up?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"red\"}'}\n    I want the LED lights to flash in blue\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"blue\"}'}\n    Can you set the display to pulse with a blue color\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"blue\"}'}\n    Can you make the lights flash and change to green\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"green\"}'}\n    Let's set the LEDs to blink and switch to green\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"green\"}'}\n    Can you change the flashy lights to yellow and make them pulse\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"yellow\"}'}\n    I want the LED display to blink in yellow, can you do that\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"yellow\"}'}\n    Can you change the colors on the display to red and set it to a rainbow pattern?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"red\"}'}\n    I want the LED display to show a rainbow pattern in red, can you set that up?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"red\"}'}\n    Can you change the color and pattern of the lights to blue and rainbow?"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 0f06a82e-5cd2-4b51-809a-dcdcfdbdaeed
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"0f06a82e-5cd2-4b51-809a-dcdcfdbdaeed\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"8b36b0f8-cc14-4ce1-885e-52a42a128453\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"449ac00d22ba37f1e4468df2be4027288889d6485bfea981a2e9a8681ad774bc\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"6bda6eba-ddfe-4c20-9dcd-3afb18080018\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"544c704c8cfb682d49df0b297cafcfdaea993250985d47f999b0d519e39c011a\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 58458, \"end_char_idx\": 61305, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "{'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"red\"}'}\n    I want the LED lights to flash in blue\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"blue\"}'}\n    Can you set the display to pulse with a blue color\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"blue\"}'}\n    Can you make the lights flash and change to green\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"green\"}'}\n    Let's set the LEDs to blink and switch to green\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"green\"}'}\n    Can you change the flashy lights to yellow and make them pulse\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"yellow\"}'}\n    I want the LED display to blink in yellow, can you do that\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"pulse\", \"color\": \"yellow\"}'}\n    Can you change the colors on the display to red and set it to a rainbow pattern?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"red\"}'}\n    I want the LED display to show a rainbow pattern in red, can you set that up?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"red\"}'}\n    Can you change the color and pattern of the lights to blue and rainbow?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"blue\"}'}\n    I'm feeling like some colorful lights, can you set it to blue and rainbow?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"blue\"}'}\n    Can you set the LED display to show a rainbow pattern in green color?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"green\"}'}\n    I'd like the LED display to cycle through colors, starting with green\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"green\"}'}\n    Can you make the lights do a cool rainbow effect\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"white\"}'}\n    Change the color of the lights to white and make them change like a rainbow\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"white\"}'}\n    I changed my mind, can you cancel that request\n    {'name': 'reject_request', 'arguments': '{}'}\n    I don't want to proceed with the request anymore, can you reject it\n    {'name': 'reject_request', 'arguments': '{}'}\n\n\nNow, back to the rejection function. Let's generate some prompts that are _nearly_ possible, but should result in the `reject_request` function being called. To do so, we queried `gpt-4o` asking for requests that are related to, but not quite possible with, the given list of functions."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 6bda6eba-ddfe-4c20-9dcd-3afb18080018
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"6bda6eba-ddfe-4c20-9dcd-3afb18080018\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"0f06a82e-5cd2-4b51-809a-dcdcfdbdaeed\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"da20987caea537602a55c57953a857e66532b5ebf892b7a8a868376b240e9063\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"2afbb979-c549-47cc-a41d-9a746824a59b\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"d37fa88715bc67e4b7c7ff0f1153428d21fd61ef017f0faed51973022612a0f0\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 59701, \"end_char_idx\": 62894, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "{'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"red\"}'}\n    Can you change the color and pattern of the lights to blue and rainbow?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"blue\"}'}\n    I'm feeling like some colorful lights, can you set it to blue and rainbow?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"blue\"}'}\n    Can you set the LED display to show a rainbow pattern in green color?\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"green\"}'}\n    I'd like the LED display to cycle through colors, starting with green\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"green\"}'}\n    Can you make the lights do a cool rainbow effect\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"white\"}'}\n    Change the color of the lights to white and make them change like a rainbow\n    {'name': 'configure_led_display', 'arguments': '{\"pattern\": \"rainbow\", \"color\": \"white\"}'}\n    I changed my mind, can you cancel that request\n    {'name': 'reject_request', 'arguments': '{}'}\n    I don't want to proceed with the request anymore, can you reject it\n    {'name': 'reject_request', 'arguments': '{}'}\n\n\nNow, back to the rejection function. Let's generate some prompts that are _nearly_ possible, but should result in the `reject_request` function being called. To do so, we queried `gpt-4o` asking for requests that are related to, but not quite possible with, the given list of functions.\n\n\n\n```python\nreject_list = [\n    \"Translate broadcast message to another language\",\n    \"Automatically capture photos when face is detected\",\n    \"Detect nearby drones\",\n    \"Measure wind resistance\",\n    \"Capture slow motion video\",\n    \"Move the drone forward and backward by same distance at the same time.\",\n    \"Adjust drone's altitude to ground level changes\",\n    \"Display custom message on LED display\",\n    \"Sync drone's time with smartphone\",\n    \"Alert when drone travels out of designated area\",\n    \"Calibrate sensors and land simultaneously\",\n    \"Detect moisture levels\",\n    \"Automatically follow GPS tagged object\",\n    \"Toggle night vision mode\",\n    \"Maintain current altitude when battery is low\",\n    \"Decide best landing spot using AI\",\n    \"Program drone's route based on wind direction\",\n]\n```\n\n\n```python\nreject_training_list = []\nfor prompt in reject_list:\n    # Adjust formatting\n    tool_calls = [\n        {\n            \"id\": \"call_id\",\n            \"type\": \"function\",\n            \"function\": {\"name\": \"reject_request\", \"arguments\": \"{}\"},\n        }\n    ]\n    reject_training_list.append(\n        {\n            \"messages\": [\n                {\"role\": \"system\", \"content\": DRONE_SYSTEM_PROMPT},\n                {\"role\": \"user\", \"content\": prompt},\n                {\"role\": \"assistant\", \"tool_calls\": tool_calls},\n            ],\n            \"parallel_tool_calls\": False,\n            \"tools\": modified_function_list,\n        }\n    )\n```\n\nNow combine all the training examples together\n\n\n\n```python\ntraining_list_total = training_examples + reject_training_list\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 2afbb979-c549-47cc-a41d-9a746824a59b
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"2afbb979-c549-47cc-a41d-9a746824a59b\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"6bda6eba-ddfe-4c20-9dcd-3afb18080018\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2752fca23ff1b0eb6023508e67bc4d4546419193f95a531600393bc72501ef1a\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"a82bbf35-91d0-4de3-8039-ef3a83c3df2c\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"8ee4aa8f0781deaadc80c94163088e4a70694cf7d6289efa93755013f883fd6e\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 61019, \"end_char_idx\": 63158, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "Now, back to the rejection function. Let's generate some prompts that are _nearly_ possible, but should result in the `reject_request` function being called. To do so, we queried `gpt-4o` asking for requests that are related to, but not quite possible with, the given list of functions.\n\n\n\n```python\nreject_list = [\n    \"Translate broadcast message to another language\",\n    \"Automatically capture photos when face is detected\",\n    \"Detect nearby drones\",\n    \"Measure wind resistance\",\n    \"Capture slow motion video\",\n    \"Move the drone forward and backward by same distance at the same time.\",\n    \"Adjust drone's altitude to ground level changes\",\n    \"Display custom message on LED display\",\n    \"Sync drone's time with smartphone\",\n    \"Alert when drone travels out of designated area\",\n    \"Calibrate sensors and land simultaneously\",\n    \"Detect moisture levels\",\n    \"Automatically follow GPS tagged object\",\n    \"Toggle night vision mode\",\n    \"Maintain current altitude when battery is low\",\n    \"Decide best landing spot using AI\",\n    \"Program drone's route based on wind direction\",\n]\n```\n\n\n```python\nreject_training_list = []\nfor prompt in reject_list:\n    # Adjust formatting\n    tool_calls = [\n        {\n            \"id\": \"call_id\",\n            \"type\": \"function\",\n            \"function\": {\"name\": \"reject_request\", \"arguments\": \"{}\"},\n        }\n    ]\n    reject_training_list.append(\n        {\n            \"messages\": [\n                {\"role\": \"system\", \"content\": DRONE_SYSTEM_PROMPT},\n                {\"role\": \"user\", \"content\": prompt},\n                {\"role\": \"assistant\", \"tool_calls\": tool_calls},\n            ],\n            \"parallel_tool_calls\": False,\n            \"tools\": modified_function_list,\n        }\n    )\n```\n\nNow combine all the training examples together\n\n\n\n```python\ntraining_list_total = training_examples + reject_training_list\n```\n\n\n```python\ntraining_file = \"data/drone_training.jsonl\"\nwith open(training_file, \"w\") as f:\n    for item in training_list_total:\n        json_str = json.dumps(item)\n        f.write(f\"{json_str}\\n\")\n```\n\n# Fine tuning\n\n\nFinally, we can kick off the fine-tuning job"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: a82bbf35-91d0-4de3-8039-ef3a83c3df2c
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"a82bbf35-91d0-4de3-8039-ef3a83c3df2c\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"2afbb979-c549-47cc-a41d-9a746824a59b\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"0a655fb8d75245d5ebd45b660efa26b488d16bfe4a7f8cd4e26d09f54cec8acc\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"a38012c6-1908-4ceb-961c-22a65689c10e\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"0e32d6c301c6ed367dd287503dcdf5f16e20361765e7d170c43ff05f9dd8a968\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 62126, \"end_char_idx\": 64872, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "```python\nreject_training_list = []\nfor prompt in reject_list:\n    # Adjust formatting\n    tool_calls = [\n        {\n            \"id\": \"call_id\",\n            \"type\": \"function\",\n            \"function\": {\"name\": \"reject_request\", \"arguments\": \"{}\"},\n        }\n    ]\n    reject_training_list.append(\n        {\n            \"messages\": [\n                {\"role\": \"system\", \"content\": DRONE_SYSTEM_PROMPT},\n                {\"role\": \"user\", \"content\": prompt},\n                {\"role\": \"assistant\", \"tool_calls\": tool_calls},\n            ],\n            \"parallel_tool_calls\": False,\n            \"tools\": modified_function_list,\n        }\n    )\n```\n\nNow combine all the training examples together\n\n\n\n```python\ntraining_list_total = training_examples + reject_training_list\n```\n\n\n```python\ntraining_file = \"data/drone_training.jsonl\"\nwith open(training_file, \"w\") as f:\n    for item in training_list_total:\n        json_str = json.dumps(item)\n        f.write(f\"{json_str}\\n\")\n```\n\n# Fine tuning\n\n\nFinally, we can kick off the fine-tuning job\n\n\n\n```python\n# Upload the training file\nfile = client.files.create(\n    file=open(\"data/drone_training.jsonl\", \"rb\"),\n    purpose=\"fine-tune\",\n)\nfile_id = file.id\nprint(f\"FileID: {file_id}\")\n\n# Create a fine-tuning job\n\nft = client.fine_tuning.jobs.create(\n    model=\"gpt-3.5-turbo\",\n    training_file=file_id,\n    suffix=\"drone\",\n)\n\nprint(f\"Fine-tuning job created: {ft}\")\n```\n\n    FileID: file-blg0IytwIivZQzc9mbfnS8Pm\n    Fine-tuning job created: FineTuningJob(id='ftjob-84PQg97hoIAKf21IPnhiNlU1', created_at=1718580285, error=Error(code=None, message=None, param=None), fine_tuned_model=None, finished_at=None, hyperparameters=Hyperparameters(n_epochs='auto', batch_size='auto', learning_rate_multiplier='auto'), model='gpt-3.5-turbo-0125', object='fine_tuning.job', organization_id='org-lb41cclBdkq5pm6BgDhx8DHP', result_files=[], seed=1513865891, status='validating_files', trained_tokens=None, training_file='file-blg0IytwIivZQzc9mbfnS8Pm', validation_file=None, estimated_finish=None, integrations=[], user_provided_suffix='drone')\n\n\nIn addition to creating a fine-tuning job, you can also list existing jobs, retrieve the status of a job, or cancel a job.\n\n\n\n```python\nftjob_id = \"ftjob-84PQg97hoIAKf21IPnhiNlU1\"\n# List 10 fine-tuning jobs\n# client.fine_tuning.jobs.list(limit=10)\n\n# Retrieve the state of a fine-tune\nclient.fine_tuning.jobs.retrieve(ftjob_id)\n\n# Cancel a job\n# client.fine_tuning.jobs.cancel(\"ftjob-abc123\")\n\n# List up to 10 events from a fine-tuning job\n# client.fine_tuning.jobs.list_events(fine_tuning_job_id=\"ftjob-abc123\", limit=10)\n\n# Delete a fine-tuned model (must be an owner of the org the model was created in)\n# client.models.delete(\"ft:gpt-3.5-turbo:abc:suffix:abc123\")\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: a38012c6-1908-4ceb-961c-22a65689c10e
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"a38012c6-1908-4ceb-961c-22a65689c10e\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"a82bbf35-91d0-4de3-8039-ef3a83c3df2c\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8ba3739cfafb9214f72506904d6456f1a9112f8d064ad0cfe48a144965dd9058\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b6c0ca96-451f-42d5-9c93-e4cfaa6c3d10\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"ed10c97f446ea5370f11505fba19064dd2f9761643787c41d01f58ea4522fa88\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": null, \"end_char_idx\": null, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "In addition to creating a fine-tuning job, you can also list existing jobs, retrieve the status of a job, or cancel a job.\n\n\n\n```python\nftjob_id = \"ftjob-84PQg97hoIAKf21IPnhiNlU1\"\n# List 10 fine-tuning jobs\n# client.fine_tuning.jobs.list(limit=10)\n\n# Retrieve the state of a fine-tune\nclient.fine_tuning.jobs.retrieve(ftjob_id)\n\n# Cancel a job\n# client.fine_tuning.jobs.cancel(\"ftjob-abc123\")\n\n# List up to 10 events from a fine-tuning job\n# client.fine_tuning.jobs.list_events(fine_tuning_job_id=\"ftjob-abc123\", limit=10)\n\n# Delete a fine-tuned model (must be an owner of the org the model was created in)\n# client.models.delete(\"ft:gpt-3.5-turbo:abc:suffix:abc123\")\n```\n\n\n\n\n    FineTuningJob(id='ftjob-84PQg97hoIAKf21IPnhiNlU1', created_at=1718580285, error=Error(code=None, message=None, param=None), fine_tuned_model='ft:gpt-3.5-turbo-0125:openai-gtm:drone:9atiPjeC', finished_at=1718581004, hyperparameters=Hyperparameters(n_epochs=3, batch_size=1, learning_rate_multiplier=2), model='gpt-3.5-turbo-0125', object='fine_tuning.job', organization_id='org-lb41cclBdkq5pm6BgDhx8DHP', result_files=['file-F6XPJFLVG9f3mR04KBmwUI9H'], seed=1513865891, status='succeeded', trained_tokens=145983, training_file='file-blg0IytwIivZQzc9mbfnS8Pm', validation_file=None, estimated_finish=None, integrations=[], user_provided_suffix='drone')\n\n\n\nAfter a fine-tuning job has finished, you can also see metrics around how the training process went by querying a fine-tuning job, extracting a file ID from the result_files, and then retrieving that files content. Each results CSV file has the following columns: step, train_loss, train_accuracy, valid_loss, and valid_mean_token_accuracy. While metrics can he helpful, evaluating samples from the fine-tuned model provides the most relevant sense of model quality.\n\n\n\n```python\nfine_tune_results = client.fine_tuning.jobs.retrieve(ftjob_id).result_files\nresult_file_id = client.files.retrieve(fine_tune_results[0]).id\n\n# Retrieve the result file\nresult_file = client.files.content(file_id=result_file_id)\ndecoded_content = base64.b64decode(result_file.read()).decode(\"utf-8\")\nprint(decoded_content)\n```\n\n    step,train_loss,train_accuracy,valid_loss,valid_mean_token_accuracy\n    1,3.63265,0.5,\n    2,2.45992,0.80952,\n    3,2.77939,0.80952,\n    4,3.53073,0.65,\n    5,2.61654,0.8,\n    6,2.16,0.85714,\n    7,2.73706,0.8,\n    8,2.56944,0.625,\n    9,2.06096,0.78947,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: b6c0ca96-451f-42d5-9c93-e4cfaa6c3d10
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"b6c0ca96-451f-42d5-9c93-e4cfaa6c3d10\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"a38012c6-1908-4ceb-961c-22a65689c10e\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"096e46b707c84199892128973c1f6bc4df07cef93f43fbbaf0d43c84867b00d8\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"90ef2704-1283-43bd-9dcb-f03b3b801fb9\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"6ff5d6ca3070ea80a38552907819697d6cefb2c5ba678771185038dccbfe2f22\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": null, \"end_char_idx\": null, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "After a fine-tuning job has finished, you can also see metrics around how the training process went by querying a fine-tuning job, extracting a file ID from the result_files, and then retrieving that files content. Each results CSV file has the following columns: step, train_loss, train_accuracy, valid_loss, and valid_mean_token_accuracy. While metrics can he helpful, evaluating samples from the fine-tuned model provides the most relevant sense of model quality.\n\n\n\n```python\nfine_tune_results = client.fine_tuning.jobs.retrieve(ftjob_id).result_files\nresult_file_id = client.files.retrieve(fine_tune_results[0]).id\n\n# Retrieve the result file\nresult_file = client.files.content(file_id=result_file_id)\ndecoded_content = base64.b64decode(result_file.read()).decode(\"utf-8\")\nprint(decoded_content)\n```\n\n    step,train_loss,train_accuracy,valid_loss,valid_mean_token_accuracy\n    1,3.63265,0.5,\n    2,2.45992,0.80952,\n    3,2.77939,0.80952,\n    4,3.53073,0.65,\n    5,2.61654,0.8,\n    6,2.16,0.85714,\n    7,2.73706,0.8,\n    8,2.56944,0.625,\n    9,2.06096,0.78947,\n    10,1.69598,0.8,\n    11,1.94268,0.77778,\n    12,1.61752,0.86667,\n    13,1.2442,0.8,\n    14,0.73411,0.875,\n    15,0.34285,0.875,\n    16,0.22229,0.95238,\n    17,0.04635,0.95,\n    18,0.00626,1.0,\n    19,0.60888,0.90909,\n    20,0.00092,1.0,\n    21,0.8001,0.95,\n    22,0.04982,1.0,\n    23,0.35494,0.92857,\n    24,0.00023,1.0,\n    25,0.00034,1.0,\n    26,0.0029,1.0,\n    27,0.58017,0.875,\n    28,0.13018,0.9375,\n    29,0.00109,1.0,\n    30,6e-05,1.0,\n    31,0.61665,0.95,\n    32,3e-05,1.0,\n    33,0.23598,0.95,\n    34,3e-05,1.0,\n    35,0.03566,1.0,\n    36,1e-05,1.0,\n    37,1e-05,1.0,\n    38,2e-05,1.0,\n    39,2e-05,1.0,\n    40,0.00034,1.0,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 90ef2704-1283-43bd-9dcb-f03b3b801fb9
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"90ef2704-1283-43bd-9dcb-f03b3b801fb9\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"b6c0ca96-451f-42d5-9c93-e4cfaa6c3d10\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"f1a85244a376ae05c10e6749c9c1599e35e583256cb0223440fef3ce5dbd6e84\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"db8116ea-c616-4a1b-9f4e-5d6a141617ec\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"ba9e5b58a54751dad74772258f171edc70d5ab149e399d7b60c45916cdb1b08b\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": null, \"end_char_idx\": null, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "86667,\n    13,1.2442,0.8,\n    14,0.73411,0.875,\n    15,0.34285,0.875,\n    16,0.22229,0.95238,\n    17,0.04635,0.95,\n    18,0.00626,1.0,\n    19,0.60888,0.90909,\n    20,0.00092,1.0,\n    21,0.8001,0.95,\n    22,0.04982,1.0,\n    23,0.35494,0.92857,\n    24,0.00023,1.0,\n    25,0.00034,1.0,\n    26,0.0029,1.0,\n    27,0.58017,0.875,\n    28,0.13018,0.9375,\n    29,0.00109,1.0,\n    30,6e-05,1.0,\n    31,0.61665,0.95,\n    32,3e-05,1.0,\n    33,0.23598,0.95,\n    34,3e-05,1.0,\n    35,0.03566,1.0,\n    36,1e-05,1.0,\n    37,1e-05,1.0,\n    38,2e-05,1.0,\n    39,2e-05,1.0,\n    40,0.00034,1.0,\n    41,0.0,1.0,\n    42,0.0,1.0,\n    43,0.0,1.0,\n    44,0.0,1.0,\n    45,0.0,1.0,\n    46,0.91896,0.95,\n    47,0.0,1.0,\n    48,0.12006,0.95,\n    49,0.0,1.0,\n    50,3.92872,0.75,\n    51,0.0,1.0,\n    52,0.98277,0.90476,\n    53,0.0,1.0,\n    54,0.0,1.0,\n    55,1e-05,1.0,\n    56,0.00401,1.0,\n    57,0.07366,1.0,\n    58,0.0,1.0,\n    59,0.0,1.0,\n    60,0.0,1.0,\n    61,0.0,1.0,\n    62,0.10347,0.875,\n    63,0.0,1.0,\n    64,0.0,1.0,\n    65,1e-05,1.0,\n    66,2.97112,0.85714,\n    67,1.12396,0.875,\n    68,2e-05,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: db8116ea-c616-4a1b-9f4e-5d6a141617ec
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"db8116ea-c616-4a1b-9f4e-5d6a141617ec\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"90ef2704-1283-43bd-9dcb-f03b3b801fb9\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"92a5ae16c405fbf376e3019c7980885160a98c3bbbbe9b96cbedb4f2c902a1ee\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"85090abd-1700-49bc-84f2-bf59c5757e83\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"c0c71ec11b527bc840168a4c135b213a458783e152d5ee6931b64ae4c7d40822\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": null, \"end_char_idx\": null, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "2e-05,1.0,\n    40,0.00034,1.0,\n    41,0.0,1.0,\n    42,0.0,1.0,\n    43,0.0,1.0,\n    44,0.0,1.0,\n    45,0.0,1.0,\n    46,0.91896,0.95,\n    47,0.0,1.0,\n    48,0.12006,0.95,\n    49,0.0,1.0,\n    50,3.92872,0.75,\n    51,0.0,1.0,\n    52,0.98277,0.90476,\n    53,0.0,1.0,\n    54,0.0,1.0,\n    55,1e-05,1.0,\n    56,0.00401,1.0,\n    57,0.07366,1.0,\n    58,0.0,1.0,\n    59,0.0,1.0,\n    60,0.0,1.0,\n    61,0.0,1.0,\n    62,0.10347,0.875,\n    63,0.0,1.0,\n    64,0.0,1.0,\n    65,1e-05,1.0,\n    66,2.97112,0.85714,\n    67,1.12396,0.875,\n    68,2e-05,1.0,\n    69,0.00067,1.0,\n    70,0.0,1.0,\n    71,0.0,1.0,\n    72,0.0,1.0,\n    73,0.0,1.0,\n    74,0.0,1.0,\n    75,0.02064,1.0,\n    76,0.5146,0.86667,\n    77,0.18756,0.95,\n    78,6e-05,1.0,\n    79,0.0,1.0,\n    80,0.21298,0.93333,\n    81,0.0,1.0,\n    82,0.0,1.0,\n    83,0.0,1.0,\n    84,0.00139,1.0,\n    85,0.0,1.0,\n    86,0.85297,0.875,\n    87,0.0,1.0,\n    88,0.0,1.0,\n    89,1.45164,0.875,\n    90,0.0,1.0,\n    91,0.05329,0.92857,\n    92,0.55506,0.93333,\n    93,0.42187,0.92857,\n    94,0.0,1.0,\n    95,0.0,1.0,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 85090abd-1700-49bc-84f2-bf59c5757e83
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"85090abd-1700-49bc-84f2-bf59c5757e83\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"db8116ea-c616-4a1b-9f4e-5d6a141617ec\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"562ebd256f0595bfbdfd0fddc08e58e453ebb2c51e08c76e4c5f9159fcd6c0e0\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"ecdb8622-1c75-4e6b-b882-82b702b91ad1\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"658db7898fc4f64fa195b9bea209c4f54dceef54d0130a0b1b7654fbbe4f7b1a\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": null, \"end_char_idx\": null, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "85714,\n    67,1.12396,0.875,\n    68,2e-05,1.0,\n    69,0.00067,1.0,\n    70,0.0,1.0,\n    71,0.0,1.0,\n    72,0.0,1.0,\n    73,0.0,1.0,\n    74,0.0,1.0,\n    75,0.02064,1.0,\n    76,0.5146,0.86667,\n    77,0.18756,0.95,\n    78,6e-05,1.0,\n    79,0.0,1.0,\n    80,0.21298,0.93333,\n    81,0.0,1.0,\n    82,0.0,1.0,\n    83,0.0,1.0,\n    84,0.00139,1.0,\n    85,0.0,1.0,\n    86,0.85297,0.875,\n    87,0.0,1.0,\n    88,0.0,1.0,\n    89,1.45164,0.875,\n    90,0.0,1.0,\n    91,0.05329,0.92857,\n    92,0.55506,0.93333,\n    93,0.42187,0.92857,\n    94,0.0,1.0,\n    95,0.0,1.0,\n    96,0.0,1.0,\n    97,0.0,1.0,\n    98,0.0,1.0,\n    99,0.0,1.0,\n    100,0.0,1.0,\n    101,0.0,1.0,\n    102,0.0,1.0,\n    103,0.09194,0.95455,\n    104,0.0,1.0,\n    105,0.0,1.0,\n    106,0.05531,0.95,\n    107,0.0,1.0,\n    108,0.39621,0.95238,\n    109,0.0,1.0,\n    110,0.8449,0.95,\n    111,0.01258,1.0,\n    112,0.0,1.0,\n    113,0.0,1.0,\n    114,0.0,1.0,\n    115,0.00355,1.0,\n    116,0.0,1.0,\n    117,0.3954,0.94118,\n    118,0.00259,1.0,\n    119,0.0,1.0,\n    120,0.0,1.0,\n    121,0.35876,0.95,\n    122,0.0,1.0,\n    123,0.0,1."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: ecdb8622-1c75-4e6b-b882-82b702b91ad1
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"ecdb8622-1c75-4e6b-b882-82b702b91ad1\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"85090abd-1700-49bc-84f2-bf59c5757e83\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"7170e582efe33c5193177555dd8cb6f9301c4af7796ae067997569aaff289217\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"48758371-731b-4d9a-973e-093fc77673eb\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"7c623d6051c360588130e60d9b3afe240ef4a0588a94f390124282dff50a7767\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": null, \"end_char_idx\": null, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "94,0.0,1.0,\n    95,0.0,1.0,\n    96,0.0,1.0,\n    97,0.0,1.0,\n    98,0.0,1.0,\n    99,0.0,1.0,\n    100,0.0,1.0,\n    101,0.0,1.0,\n    102,0.0,1.0,\n    103,0.09194,0.95455,\n    104,0.0,1.0,\n    105,0.0,1.0,\n    106,0.05531,0.95,\n    107,0.0,1.0,\n    108,0.39621,0.95238,\n    109,0.0,1.0,\n    110,0.8449,0.95,\n    111,0.01258,1.0,\n    112,0.0,1.0,\n    113,0.0,1.0,\n    114,0.0,1.0,\n    115,0.00355,1.0,\n    116,0.0,1.0,\n    117,0.3954,0.94118,\n    118,0.00259,1.0,\n    119,0.0,1.0,\n    120,0.0,1.0,\n    121,0.35876,0.95,\n    122,0.0,1.0,\n    123,0.0,1.0,\n    124,5e-05,1.0,\n    125,0.0,1.0,\n    126,0.0,1.0,\n    127,0.0,1.0,\n    128,0.0,1.0,\n    129,0.0,1.0,\n    130,0.01336,1.0,\n    131,0.0,1.0,\n    132,0.23362,0.95,\n    133,0.00157,1.0,\n    134,0.0,1.0,\n    135,0.00031,1.0,\n    136,0.0,1.0,\n    137,0.08313,0.92857,\n    138,0.0,1.0,\n    139,0.0,1.0,\n    140,0.0,1.0,\n    141,0.43608,0.95,\n    142,0.0,1.0,\n    143,0.0,1.0,\n    144,0.0,1.0,\n    145,2e-05,1.0,\n    146,1.20409,0.85714,\n    147,0.0,1.0,\n    148,0.0,1.0,\n    149,0.0,1.0,\n    150,0.0,1.0,\n    151,0.0,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 48758371-731b-4d9a-973e-093fc77673eb
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"48758371-731b-4d9a-973e-093fc77673eb\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ecdb8622-1c75-4e6b-b882-82b702b91ad1\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"91237fc3b5512937497e96f17ea5127499b6fe7650bf6470145d90ff8d8ec6ab\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"8ead49db-9e48-404c-953e-53846bee6070\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"850c8cec2b98aabd1fc34852e06648089482fa91fd3693e0f61389434564d9e1\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": null, \"end_char_idx\": null, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "95,\n    122,0.0,1.0,\n    123,0.0,1.0,\n    124,5e-05,1.0,\n    125,0.0,1.0,\n    126,0.0,1.0,\n    127,0.0,1.0,\n    128,0.0,1.0,\n    129,0.0,1.0,\n    130,0.01336,1.0,\n    131,0.0,1.0,\n    132,0.23362,0.95,\n    133,0.00157,1.0,\n    134,0.0,1.0,\n    135,0.00031,1.0,\n    136,0.0,1.0,\n    137,0.08313,0.92857,\n    138,0.0,1.0,\n    139,0.0,1.0,\n    140,0.0,1.0,\n    141,0.43608,0.95,\n    142,0.0,1.0,\n    143,0.0,1.0,\n    144,0.0,1.0,\n    145,2e-05,1.0,\n    146,1.20409,0.85714,\n    147,0.0,1.0,\n    148,0.0,1.0,\n    149,0.0,1.0,\n    150,0.0,1.0,\n    151,0.0,1.0,\n    152,0.0,1.0,\n    153,0.0,1.0,\n    154,0.00063,1.0,\n    155,0.0,1.0,\n    156,0.0,1.0,\n    157,0.0,1.0,\n    158,6e-05,1.0,\n    159,0.0,1.0,\n    160,0.0,1.0,\n    161,0.0,1.0,\n    162,0.0,1.0,\n    163,0.0,1.0,\n    164,0.0,1.0,\n    165,0.0,1.0,\n    166,0.0,1.0,\n    167,0.0,1.0,\n    168,0.0,1.0,\n    169,0.0,1.0,\n    170,0.0,1.0,\n    171,0.0,1.0,\n    172,0.0,1.0,\n    173,0.0,1.0,\n    174,0.00783,1.0,\n    175,0.0,1.0,\n    176,0.0,1.0,\n    177,0.0,1.0,\n    178,0.0,1.0,\n    179,0.0,1.0,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 8ead49db-9e48-404c-953e-53846bee6070
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"8ead49db-9e48-404c-953e-53846bee6070\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"48758371-731b-4d9a-973e-093fc77673eb\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8bf50d041c21e6ff8976854b033cb37a2dc145b6c83c3a0020842ea8a82e3cdd\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4154fcd2-2762-4930-a8e5-0c35a96a2a9b\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"3abca7580ccc1db1efdd5ac3ebda231a4ee2ec11aa033ead7cd9e828608435d5\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": null, \"end_char_idx\": null, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "0,1.0,\n    150,0.0,1.0,\n    151,0.0,1.0,\n    152,0.0,1.0,\n    153,0.0,1.0,\n    154,0.00063,1.0,\n    155,0.0,1.0,\n    156,0.0,1.0,\n    157,0.0,1.0,\n    158,6e-05,1.0,\n    159,0.0,1.0,\n    160,0.0,1.0,\n    161,0.0,1.0,\n    162,0.0,1.0,\n    163,0.0,1.0,\n    164,0.0,1.0,\n    165,0.0,1.0,\n    166,0.0,1.0,\n    167,0.0,1.0,\n    168,0.0,1.0,\n    169,0.0,1.0,\n    170,0.0,1.0,\n    171,0.0,1.0,\n    172,0.0,1.0,\n    173,0.0,1.0,\n    174,0.00783,1.0,\n    175,0.0,1.0,\n    176,0.0,1.0,\n    177,0.0,1.0,\n    178,0.0,1.0,\n    179,0.0,1.0,\n    180,0.0,1.0,\n    181,0.0,1.0,\n    182,0.00028,1.0,\n    183,0.0,1.0,\n    184,0.0,1.0,\n    185,0.0003,1.0,\n    186,0.0,1.0,\n    187,0.0,1.0,\n    188,0.0,1.0,\n    189,0.0,1.0,\n    190,0.0,1.0,\n    191,0.0,1.0,\n    192,0.0,1.0,\n    193,0.00013,1.0,\n    194,0.86198,0.875,\n    195,0.0,1.0,\n    196,0.0,1.0,\n    197,0.0,1.0,\n    198,0.0,1.0,\n    199,0.0,1.0,\n    200,0.0,1.0,\n    201,0.0,1.0,\n    202,0.0,1.0,\n    203,0.0,1.0,\n    204,0.09954,0.95455,\n    205,0.0,1.0,\n    206,0.0,1.0,\n    207,0.0,1.0,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 4154fcd2-2762-4930-a8e5-0c35a96a2a9b
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"4154fcd2-2762-4930-a8e5-0c35a96a2a9b\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"8ead49db-9e48-404c-953e-53846bee6070\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"158890e297d2c20ede3cada0c5c926baa40a9774187c0e18a110fec719efecb4\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f2208810-022f-46fd-9ff6-73198c386ba3\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"eed758f7d00c8064ee0d09f9e8eea3f2b222476ab1baa84fb1c2e482fd6e71a6\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": null, \"end_char_idx\": null, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "1.0,\n    178,0.0,1.0,\n    179,0.0,1.0,\n    180,0.0,1.0,\n    181,0.0,1.0,\n    182,0.00028,1.0,\n    183,0.0,1.0,\n    184,0.0,1.0,\n    185,0.0003,1.0,\n    186,0.0,1.0,\n    187,0.0,1.0,\n    188,0.0,1.0,\n    189,0.0,1.0,\n    190,0.0,1.0,\n    191,0.0,1.0,\n    192,0.0,1.0,\n    193,0.00013,1.0,\n    194,0.86198,0.875,\n    195,0.0,1.0,\n    196,0.0,1.0,\n    197,0.0,1.0,\n    198,0.0,1.0,\n    199,0.0,1.0,\n    200,0.0,1.0,\n    201,0.0,1.0,\n    202,0.0,1.0,\n    203,0.0,1.0,\n    204,0.09954,0.95455,\n    205,0.0,1.0,\n    206,0.0,1.0,\n    207,0.0,1.0,\n    208,1.9616,0.9375,\n    209,0.0,1.0,\n    210,0.0,1.0,\n    211,0.0,1.0,\n    212,0.0,1.0,\n    213,0.0,1.0,\n    214,0.0,1.0,\n    215,0.0,1.0,\n    216,0.0,1.0,\n    217,0.0,1.0,\n    218,0.0,1.0,\n    219,0.0,1.0,\n    220,0.0,1.0,\n    221,0.0,1.0,\n    222,0.0,1.0,\n    223,0.0,1.0,\n    224,0.0,1.0,\n    225,0.0,1.0,\n    226,0.00174,1.0,\n    227,0.0,1.0,\n    228,2e-05,1.0,\n    229,0.0,1.0,\n    230,0.0,1.0,\n    231,0.0,1.0,\n    232,0.0,1.0,\n    233,0.0,1.0,\n    234,0.61895,0.95,\n    235,0.0,1.0,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: f2208810-022f-46fd-9ff6-73198c386ba3
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f2208810-022f-46fd-9ff6-73198c386ba3\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4154fcd2-2762-4930-a8e5-0c35a96a2a9b\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"713fca42d23a81dff1e04d764d370c7d77a3499aa2ce345982d4652cbbcc682b\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"04e021bd-bdd5-4783-8fce-574523163e87\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"d1c0e9b66d12512ea9ad4956bb60afcd06739c51d3b46970889de6e8ba986e3b\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": null, \"end_char_idx\": null, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "1.0,\n    206,0.0,1.0,\n    207,0.0,1.0,\n    208,1.9616,0.9375,\n    209,0.0,1.0,\n    210,0.0,1.0,\n    211,0.0,1.0,\n    212,0.0,1.0,\n    213,0.0,1.0,\n    214,0.0,1.0,\n    215,0.0,1.0,\n    216,0.0,1.0,\n    217,0.0,1.0,\n    218,0.0,1.0,\n    219,0.0,1.0,\n    220,0.0,1.0,\n    221,0.0,1.0,\n    222,0.0,1.0,\n    223,0.0,1.0,\n    224,0.0,1.0,\n    225,0.0,1.0,\n    226,0.00174,1.0,\n    227,0.0,1.0,\n    228,2e-05,1.0,\n    229,0.0,1.0,\n    230,0.0,1.0,\n    231,0.0,1.0,\n    232,0.0,1.0,\n    233,0.0,1.0,\n    234,0.61895,0.95,\n    235,0.0,1.0,\n    236,0.0,1.0,\n    237,0.0,1.0,\n    238,0.0,1.0,\n    239,0.54945,0.95,\n    240,0.0,1.0,\n    241,0.0,1.0,\n    242,1.52953,0.9375,\n    243,1.19938,0.85714,\n    244,0.0,1.0,\n    245,0.0,1.0,\n    246,0.0,1.0,\n    247,0.0,1.0,\n    248,8e-05,1.0,\n    249,0.0,1.0,\n    250,0.0,1.0,\n    251,0.0,1.0,\n    252,0.0,1.0,\n    253,0.0,1.0,\n    254,0.0,1.0,\n    255,0.0,1.0,\n    256,0.0,1.0,\n    257,0.0,1.0,\n    258,0.0,1.0,\n    259,0.0,1.0,\n    260,0.0,1.0,\n    261,0.0,1.0,\n    262,0.0,1.0,\n    263,0.0,1.0,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 04e021bd-bdd5-4783-8fce-574523163e87
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"04e021bd-bdd5-4783-8fce-574523163e87\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f2208810-022f-46fd-9ff6-73198c386ba3\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"a7144847d4ad78b9279c95ec5555d90da9f56214e41120848d83e1d293e8cb1d\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4b0a5a93-0cfe-4877-8d07-ada744f232a0\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"58254f10e49445051b507beea5527e779dce00a0c4271dab712663a523086c9d\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": null, \"end_char_idx\": null, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "0,\n    234,0.61895,0.95,\n    235,0.0,1.0,\n    236,0.0,1.0,\n    237,0.0,1.0,\n    238,0.0,1.0,\n    239,0.54945,0.95,\n    240,0.0,1.0,\n    241,0.0,1.0,\n    242,1.52953,0.9375,\n    243,1.19938,0.85714,\n    244,0.0,1.0,\n    245,0.0,1.0,\n    246,0.0,1.0,\n    247,0.0,1.0,\n    248,8e-05,1.0,\n    249,0.0,1.0,\n    250,0.0,1.0,\n    251,0.0,1.0,\n    252,0.0,1.0,\n    253,0.0,1.0,\n    254,0.0,1.0,\n    255,0.0,1.0,\n    256,0.0,1.0,\n    257,0.0,1.0,\n    258,0.0,1.0,\n    259,0.0,1.0,\n    260,0.0,1.0,\n    261,0.0,1.0,\n    262,0.0,1.0,\n    263,0.0,1.0,\n    264,0.0,1.0,\n    265,0.0,1.0,\n    266,0.0,1.0,\n    267,0.88984,0.95,\n    268,0.0,1.0,\n    269,0.0,1.0,\n    270,0.0,1.0,\n    271,0.0,1.0,\n    272,0.0,1.0,\n    273,0.0,1.0,\n    274,0.0,1.0,\n    275,0.00013,1.0,\n    276,0.0,1.0,\n    277,0.89825,0.92857,\n    278,0.0,1.0,\n    279,0.00017,1.0,\n    280,0.0,1.0,\n    281,0.0,1.0,\n    282,0.0,1.0,\n    283,0.65667,0.95,\n    284,0.0,1.0,\n    285,0.0,1.0,\n    286,0.0,1.0,\n    287,0.0,1.0,\n    288,0.0,1.0,\n    289,0.0,1.0,\n    290,0.0,1.0,\n    291,0.0,1.0,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 4b0a5a93-0cfe-4877-8d07-ada744f232a0
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"4b0a5a93-0cfe-4877-8d07-ada744f232a0\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"04e021bd-bdd5-4783-8fce-574523163e87\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"a2bd3c9ea50e2a1d85dfe12958e32a54d07fb22ea62108b3d01d11f9aceb01b7\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"244622c9-3fb5-426c-8da2-51f0c2fe78fb\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"c5001b785b733e56ad0bd8015dd80728df1aab6e65fdf650cbbd9d562fc1b2a0\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": null, \"end_char_idx\": null, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "1.0,\n    262,0.0,1.0,\n    263,0.0,1.0,\n    264,0.0,1.0,\n    265,0.0,1.0,\n    266,0.0,1.0,\n    267,0.88984,0.95,\n    268,0.0,1.0,\n    269,0.0,1.0,\n    270,0.0,1.0,\n    271,0.0,1.0,\n    272,0.0,1.0,\n    273,0.0,1.0,\n    274,0.0,1.0,\n    275,0.00013,1.0,\n    276,0.0,1.0,\n    277,0.89825,0.92857,\n    278,0.0,1.0,\n    279,0.00017,1.0,\n    280,0.0,1.0,\n    281,0.0,1.0,\n    282,0.0,1.0,\n    283,0.65667,0.95,\n    284,0.0,1.0,\n    285,0.0,1.0,\n    286,0.0,1.0,\n    287,0.0,1.0,\n    288,0.0,1.0,\n    289,0.0,1.0,\n    290,0.0,1.0,\n    291,0.0,1.0,\n    292,0.28626,0.95238,\n    293,0.0,1.0,\n    294,0.0,1.0,\n    295,0.0,1.0,\n    296,0.0,1.0,\n    297,0.0,1.0,\n    298,0.0,1.0,\n    299,0.0,1.0,\n    300,0.0,1.0,\n    301,0.0,1.0,\n    302,0.0,1.0,\n    303,0.0,1.0,\n    304,0.0,1.0,\n    305,0.0,1.0,\n    306,0.0,1.0,\n    307,0.0,1.0,\n    308,0.0,1.0,\n    309,0.0,1.0,\n    \n\n\n# Evaluations\n\n\nGreat! We trained a fine-tuned model for function calling. Let's see how it does on our evaluation set for prompts that the drone assistant\nshould automatically reject."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 244622c9-3fb5-426c-8da2-51f0c2fe78fb
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"244622c9-3fb5-426c-8da2-51f0c2fe78fb\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4b0a5a93-0cfe-4877-8d07-ada744f232a0\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"c34b7a78a29c78dbfa6dcfef5b73409f0e113b978387eb47330645f19f867aa0\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"de13a74c-b45a-4243-8440-6b5fbbc12ef9\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"4572b15d11d6be83b84cf49475beadd57f41321143bd73586a91d431e80be08a\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": null, \"end_char_idx\": null, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "1.0,\n    283,0.65667,0.95,\n    284,0.0,1.0,\n    285,0.0,1.0,\n    286,0.0,1.0,\n    287,0.0,1.0,\n    288,0.0,1.0,\n    289,0.0,1.0,\n    290,0.0,1.0,\n    291,0.0,1.0,\n    292,0.28626,0.95238,\n    293,0.0,1.0,\n    294,0.0,1.0,\n    295,0.0,1.0,\n    296,0.0,1.0,\n    297,0.0,1.0,\n    298,0.0,1.0,\n    299,0.0,1.0,\n    300,0.0,1.0,\n    301,0.0,1.0,\n    302,0.0,1.0,\n    303,0.0,1.0,\n    304,0.0,1.0,\n    305,0.0,1.0,\n    306,0.0,1.0,\n    307,0.0,1.0,\n    308,0.0,1.0,\n    309,0.0,1.0,\n    \n\n\n# Evaluations\n\n\nGreat! We trained a fine-tuned model for function calling. Let's see how it does on our evaluation set for prompts that the drone assistant\nshould automatically reject.\n\n\n\n```python\nft_model = \"ft:gpt-3.5-turbo-0125:openai-gtm:drone:9atiPjeC\"\nbase_model = \"gpt-3.5-turbo\"\n\nprint(f\"\\nEvaluating fine-tuned model with challenging prompts: {ft_model}\")\neval(\n    model=ft_model,\n    function_list=modified_function_list,\n    system_prompt=DRONE_SYSTEM_PROMPT,\n    prompts_to_expected_tool_name=challenging_prompts_to_expected,\n)\n\nprint(f\"\\nEvaluating base model with challenging prompts: {base_model}\")\neval(\n    model=\"gpt-3.5-turbo\",\n    function_list=function_list,\n    system_prompt=DRONE_SYSTEM_PROMPT,\n    prompts_to_expected_tool_name=challenging_prompts_to_expected,\n)\n```\n\n    \n    Evaluating fine-tuned model with challenging prompts: ft:gpt-3.5-turbo-0125:openai-gtm:drone:9atiPjeC\n\n\n\n<style type=\"text/css\">\n#T_9f4fa_row0_col0, #T_9f4fa_row0_col1, #T_9f4fa_row0_col2, #T_9f4fa_row0_col3, #T_9f4fa_row1_col0, #T_9f4fa_row1_col1, #T_9f4fa_row1_col2, #T_9f4fa_row1_col3, #T_9f4fa_row2_col0, #T_9f4fa_row2_col1, #T_9f4fa_row2_col2, #T_9f4fa_row2_col3,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: de13a74c-b45a-4243-8440-6b5fbbc12ef9
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"de13a74c-b45a-4243-8440-6b5fbbc12ef9\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"244622c9-3fb5-426c-8da2-51f0c2fe78fb\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"7f591e582d1addab371cced07e32269a0b42af1ff49b9d848bc4f51a7c135c2c\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c6aa3a87-fae8-430e-ba3a-92e26d878a35\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"8ea7dea9e11f1650c6359a76e4a4d12d28e31739f73514d40d2b6bf2d9bb84ee\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 72581, \"end_char_idx\": 74299, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "```python\nft_model = \"ft:gpt-3.5-turbo-0125:openai-gtm:drone:9atiPjeC\"\nbase_model = \"gpt-3.5-turbo\"\n\nprint(f\"\\nEvaluating fine-tuned model with challenging prompts: {ft_model}\")\neval(\n    model=ft_model,\n    function_list=modified_function_list,\n    system_prompt=DRONE_SYSTEM_PROMPT,\n    prompts_to_expected_tool_name=challenging_prompts_to_expected,\n)\n\nprint(f\"\\nEvaluating base model with challenging prompts: {base_model}\")\neval(\n    model=\"gpt-3.5-turbo\",\n    function_list=function_list,\n    system_prompt=DRONE_SYSTEM_PROMPT,\n    prompts_to_expected_tool_name=challenging_prompts_to_expected,\n)\n```\n\n    \n    Evaluating fine-tuned model with challenging prompts: ft:gpt-3.5-turbo-0125:openai-gtm:drone:9atiPjeC\n\n\n\n<style type=\"text/css\">\n#T_9f4fa_row0_col0, #T_9f4fa_row0_col1, #T_9f4fa_row0_col2, #T_9f4fa_row0_col3, #T_9f4fa_row1_col0, #T_9f4fa_row1_col1, #T_9f4fa_row1_col2, #T_9f4fa_row1_col3, #T_9f4fa_row2_col0, #T_9f4fa_row2_col1, #T_9f4fa_row2_col2, #T_9f4fa_row2_col3, #T_9f4fa_row3_col0, #T_9f4fa_row3_col1, #T_9f4fa_row3_col2, #T_9f4fa_row3_col3, #T_9f4fa_row4_col0, #T_9f4fa_row4_col1, #T_9f4fa_row4_col2, #T_9f4fa_row4_col3, #T_9f4fa_row5_col0, #T_9f4fa_row5_col1, #T_9f4fa_row5_col2, #T_9f4fa_row5_col3, #T_9f4fa_row6_col0, #T_9f4fa_row6_col1, #T_9f4fa_row6_col2, #T_9f4fa_row6_col3, #T_9f4fa_row7_col0, #T_9f4fa_row7_col1, #T_9f4fa_row7_col2, #T_9f4fa_row7_col3, #T_9f4fa_row8_col0, #T_9f4fa_row8_col1, #T_9f4fa_row8_col2, #T_9f4fa_row8_col3, #T_9f4fa_row9_col0, #T_9f4fa_row9_col1, #T_9f4fa_row9_col2, #T_9f4fa_row9_col3 {\n  background-color: white;\n  color: black;\n}\n</style>\n<table id=\"T_9f4fa\">\n  <thead>\n    <tr>\n      <th class=\"blank level0\" >&nbsp;</th>\n      <th id=\"T_9f4fa_level0_col0\""}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: c6aa3a87-fae8-430e-ba3a-92e26d878a35
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"c6aa3a87-fae8-430e-ba3a-92e26d878a35\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"de13a74c-b45a-4243-8440-6b5fbbc12ef9\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"bba396b5733c691a6d9dbc227dbffc16f74aecc48e073d9851e6999894c80395\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"63f798d4-1c0f-497d-bb16-a1e625be06a6\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"c6334e47a75453334883245f69b5919fa19459a156cfdd35a5ccb8bde0160d83\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 73586, \"end_char_idx\": 75153, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "#T_9f4fa_row3_col1, #T_9f4fa_row3_col2, #T_9f4fa_row3_col3, #T_9f4fa_row4_col0, #T_9f4fa_row4_col1, #T_9f4fa_row4_col2, #T_9f4fa_row4_col3, #T_9f4fa_row5_col0, #T_9f4fa_row5_col1, #T_9f4fa_row5_col2, #T_9f4fa_row5_col3, #T_9f4fa_row6_col0, #T_9f4fa_row6_col1, #T_9f4fa_row6_col2, #T_9f4fa_row6_col3, #T_9f4fa_row7_col0, #T_9f4fa_row7_col1, #T_9f4fa_row7_col2, #T_9f4fa_row7_col3, #T_9f4fa_row8_col0, #T_9f4fa_row8_col1, #T_9f4fa_row8_col2, #T_9f4fa_row8_col3, #T_9f4fa_row9_col0, #T_9f4fa_row9_col1, #T_9f4fa_row9_col2, #T_9f4fa_row9_col3 {\n  background-color: white;\n  color: black;\n}\n</style>\n<table id=\"T_9f4fa\">\n  <thead>\n    <tr>\n      <th class=\"blank level0\" >&nbsp;</th>\n      <th id=\"T_9f4fa_level0_col0\" class=\"col_heading level0 col0\" >Prompt</th>\n      <th id=\"T_9f4fa_level0_col1\" class=\"col_heading level0 col1\" >Actual</th>\n      <th id=\"T_9f4fa_level0_col2\" class=\"col_heading level0 col2\" >Expected</th>\n      <th id=\"T_9f4fa_level0_col3\" class=\"col_heading level0 col3\" >Match</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th id=\"T_9f4fa_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n      <td id=\"T_9f4fa_row0_col0\" class=\"data row0 col0\" >Play pre-recorded audio message</td>\n      <td id=\"T_9f4fa_row0_col1\" class=\"data row0 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row0_col2\" class=\"data row0 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row0_col3\" class=\"data row0 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n      <td id=\"T_9f4fa_row1_col0\" class=\"data"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 63f798d4-1c0f-497d-bb16-a1e625be06a6
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"63f798d4-1c0f-497d-bb16-a1e625be06a6\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"c6aa3a87-fae8-430e-ba3a-92e26d878a35\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"9bd282a2da36549cc1e29127bbb9c3aacbeb127090d3023adadac1ed8e671375\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"0d29022b-281d-4f3f-84ad-41ea0e1a65ca\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"163b6b3083ebebefe8687a37fd5bc4408a3af6638730fb1f5dac4deb21acd8a0\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 74271, \"end_char_idx\": 75988, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "<th id=\"T_9f4fa_level0_col0\" class=\"col_heading level0 col0\" >Prompt</th>\n      <th id=\"T_9f4fa_level0_col1\" class=\"col_heading level0 col1\" >Actual</th>\n      <th id=\"T_9f4fa_level0_col2\" class=\"col_heading level0 col2\" >Expected</th>\n      <th id=\"T_9f4fa_level0_col3\" class=\"col_heading level0 col3\" >Match</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th id=\"T_9f4fa_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n      <td id=\"T_9f4fa_row0_col0\" class=\"data row0 col0\" >Play pre-recorded audio message</td>\n      <td id=\"T_9f4fa_row0_col1\" class=\"data row0 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row0_col2\" class=\"data row0 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row0_col3\" class=\"data row0 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n      <td id=\"T_9f4fa_row1_col0\" class=\"data row1 col0\" >Initiate following on social media</td>\n      <td id=\"T_9f4fa_row1_col1\" class=\"data row1 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row1_col2\" class=\"data row1 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row1_col3\" class=\"data row1 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n      <td id=\"T_9f4fa_row2_col0\" class=\"data row2 col0\" >Scan environment for heat signatures</td>\n      <td id=\"T_9f4fa_row2_col1\" class=\"data row2 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row2_col2\" class=\"data row2 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row2_col3\" class=\"data row2 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n      <td id=\"T_9f4fa_row3_col0\" class=\"data row3 col0\""}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 0d29022b-281d-4f3f-84ad-41ea0e1a65ca
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"0d29022b-281d-4f3f-84ad-41ea0e1a65ca\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"63f798d4-1c0f-497d-bb16-a1e625be06a6\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"1412ce3a3ddf99c491310e79287baa50540124b25df3982ac70346c1cd48fdd3\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7a312e60-e1b0-4197-8bf6-f9e12ecdc463\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"3efd044562dbd2831d3bc288df22c5d428314b8bb8ef2f5e1610b69427a9c0f2\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 75115, \"end_char_idx\": 76827, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "<td id=\"T_9f4fa_row1_col0\" class=\"data row1 col0\" >Initiate following on social media</td>\n      <td id=\"T_9f4fa_row1_col1\" class=\"data row1 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row1_col2\" class=\"data row1 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row1_col3\" class=\"data row1 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n      <td id=\"T_9f4fa_row2_col0\" class=\"data row2 col0\" >Scan environment for heat signatures</td>\n      <td id=\"T_9f4fa_row2_col1\" class=\"data row2 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row2_col2\" class=\"data row2 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row2_col3\" class=\"data row2 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n      <td id=\"T_9f4fa_row3_col0\" class=\"data row3 col0\" >Bump into obstacles</td>\n      <td id=\"T_9f4fa_row3_col1\" class=\"data row3 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row3_col2\" class=\"data row3 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row3_col3\" class=\"data row3 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n      <td id=\"T_9f4fa_row4_col0\" class=\"data row4 col0\" >Change drone's paint job color</td>\n      <td id=\"T_9f4fa_row4_col1\" class=\"data row4 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row4_col2\" class=\"data row4 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row4_col3\" class=\"data row4 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n      <td id=\"T_9f4fa_row5_col0\" class=\"data row5 col0\" >Coordinate with nearby drones</td>"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 7a312e60-e1b0-4197-8bf6-f9e12ecdc463
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"7a312e60-e1b0-4197-8bf6-f9e12ecdc463\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"0d29022b-281d-4f3f-84ad-41ea0e1a65ca\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"0c700248770dcc85b31ccb725e352ebfced3faece339fb945df91520e8463ce7\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"e6f3b996-cabe-4d91-bf76-a52bea1dbb31\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"7002d689ade60da703eaa5fe4ce57c97ceb5790db94612ee4565dfdf2a02bb36\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 75939, \"end_char_idx\": 77629, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "<td id=\"T_9f4fa_row3_col0\" class=\"data row3 col0\" >Bump into obstacles</td>\n      <td id=\"T_9f4fa_row3_col1\" class=\"data row3 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row3_col2\" class=\"data row3 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row3_col3\" class=\"data row3 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n      <td id=\"T_9f4fa_row4_col0\" class=\"data row4 col0\" >Change drone's paint job color</td>\n      <td id=\"T_9f4fa_row4_col1\" class=\"data row4 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row4_col2\" class=\"data row4 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row4_col3\" class=\"data row4 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n      <td id=\"T_9f4fa_row5_col0\" class=\"data row5 col0\" >Coordinate with nearby drones</td>\n      <td id=\"T_9f4fa_row5_col1\" class=\"data row5 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row5_col2\" class=\"data row5 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row5_col3\" class=\"data row5 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n      <td id=\"T_9f4fa_row6_col0\" class=\"data row6 col0\" >Change speed to negative 120 km/h</td>\n      <td id=\"T_9f4fa_row6_col1\" class=\"data row6 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row6_col2\" class=\"data row6 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row6_col3\" class=\"data row6 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n      <td id=\"T_9f4fa_row7_col0\" class=\"data row7 col0\" >Detect a person</td>"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: e6f3b996-cabe-4d91-bf76-a52bea1dbb31
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"e6f3b996-cabe-4d91-bf76-a52bea1dbb31\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7a312e60-e1b0-4197-8bf6-f9e12ecdc463\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"f08bbfe3287fed4f99beeb2b744f6d70fef9e3fbb808c3791c8a7ed73b7b635a\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"d9e68c8e-57c2-4e17-a798-31fc175ee9d5\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"591d777939cb095f9eadc19389fba03b34a86902bdab92250f087f00a51261f0\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 76769, \"end_char_idx\": 78478, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "class=\"data row5 col0\" >Coordinate with nearby drones</td>\n      <td id=\"T_9f4fa_row5_col1\" class=\"data row5 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row5_col2\" class=\"data row5 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row5_col3\" class=\"data row5 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n      <td id=\"T_9f4fa_row6_col0\" class=\"data row6 col0\" >Change speed to negative 120 km/h</td>\n      <td id=\"T_9f4fa_row6_col1\" class=\"data row6 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row6_col2\" class=\"data row6 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row6_col3\" class=\"data row6 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n      <td id=\"T_9f4fa_row7_col0\" class=\"data row7 col0\" >Detect a person</td>\n      <td id=\"T_9f4fa_row7_col1\" class=\"data row7 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row7_col2\" class=\"data row7 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row7_col3\" class=\"data row7 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n      <td id=\"T_9f4fa_row8_col0\" class=\"data row8 col0\" >Please enable night vision</td>\n      <td id=\"T_9f4fa_row8_col1\" class=\"data row8 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row8_col2\" class=\"data row8 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row8_col3\" class=\"data row8 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n      <td id=\"T_9f4fa_row9_col0\" class=\"data row9 col0\" >Report on humidity levels around you</td>\n      <td id=\"T_9f4fa_row9_col1\""}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: d9e68c8e-57c2-4e17-a798-31fc175ee9d5
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"d9e68c8e-57c2-4e17-a798-31fc175ee9d5\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"e6f3b996-cabe-4d91-bf76-a52bea1dbb31\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"b34f17f25d03b7c7251292d333664646e393ebe56a3bf011d581cd58f2c30657\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"9e772a21-117f-4222-b38d-220ed65885d3\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"3febad17fd59a387dddc4a41a828419ba64bc0fdbe6cb51a9f7f2b57004ea801\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 77597, \"end_char_idx\": 79350, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "row7 col0\" >Detect a person</td>\n      <td id=\"T_9f4fa_row7_col1\" class=\"data row7 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row7_col2\" class=\"data row7 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row7_col3\" class=\"data row7 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n      <td id=\"T_9f4fa_row8_col0\" class=\"data row8 col0\" >Please enable night vision</td>\n      <td id=\"T_9f4fa_row8_col1\" class=\"data row8 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row8_col2\" class=\"data row8 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row8_col3\" class=\"data row8 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_9f4fa_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n      <td id=\"T_9f4fa_row9_col0\" class=\"data row9 col0\" >Report on humidity levels around you</td>\n      <td id=\"T_9f4fa_row9_col1\" class=\"data row9 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row9_col2\" class=\"data row9 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row9_col3\" class=\"data row9 col3\" >Yes</td>\n    </tr>\n  </tbody>\n</table>\n\n\n\n    Number of matches: 10 out of 10 (100.00%)\n    Average latency per request: 3519.17 ms\n    Average tokens used per request: 457.20\n    \n    Evaluating base model with challenging prompts: gpt-3.5-turbo\n\n\n\n<style type=\"text/css\">\n#T_85118_row0_col0, #T_85118_row0_col1, #T_85118_row0_col2, #T_85118_row0_col3, #T_85118_row2_col0, #T_85118_row2_col1, #T_85118_row2_col2, #T_85118_row2_col3, #T_85118_row4_col0, #T_85118_row4_col1, #T_85118_row4_col2, #T_85118_row4_col3, #T_85118_row5_col0, #T_85118_row5_col1, #T_85118_row5_col2, #T_85118_row5_col3, #T_85118_row7_col0, #T_85118_row7_col1, #T_85118_row7_col2, #T_85118_row7_col3, #T_85118_row9_col0,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 9e772a21-117f-4222-b38d-220ed65885d3
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"9e772a21-117f-4222-b38d-220ed65885d3\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"d9e68c8e-57c2-4e17-a798-31fc175ee9d5\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2ed7191d23c4cf932392741cec1bf5af3d66977b83272edf70c8704e89345bbe\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"32d301d5-760e-4268-9faf-27ae4c2e5be1\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"e0d781d9e2ed2297906de2f5233e633552f92d3d16f8b77f98e3b9d2daab45ac\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 78411, \"end_char_idx\": 80216, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "on humidity levels around you</td>\n      <td id=\"T_9f4fa_row9_col1\" class=\"data row9 col1\" >reject_request</td>\n      <td id=\"T_9f4fa_row9_col2\" class=\"data row9 col2\" >reject_request</td>\n      <td id=\"T_9f4fa_row9_col3\" class=\"data row9 col3\" >Yes</td>\n    </tr>\n  </tbody>\n</table>\n\n\n\n    Number of matches: 10 out of 10 (100.00%)\n    Average latency per request: 3519.17 ms\n    Average tokens used per request: 457.20\n    \n    Evaluating base model with challenging prompts: gpt-3.5-turbo\n\n\n\n<style type=\"text/css\">\n#T_85118_row0_col0, #T_85118_row0_col1, #T_85118_row0_col2, #T_85118_row0_col3, #T_85118_row2_col0, #T_85118_row2_col1, #T_85118_row2_col2, #T_85118_row2_col3, #T_85118_row4_col0, #T_85118_row4_col1, #T_85118_row4_col2, #T_85118_row4_col3, #T_85118_row5_col0, #T_85118_row5_col1, #T_85118_row5_col2, #T_85118_row5_col3, #T_85118_row7_col0, #T_85118_row7_col1, #T_85118_row7_col2, #T_85118_row7_col3, #T_85118_row9_col0, #T_85118_row9_col1, #T_85118_row9_col2, #T_85118_row9_col3 {\n  background-color: white;\n  color: black;\n}\n#T_85118_row1_col0, #T_85118_row1_col1, #T_85118_row1_col2, #T_85118_row1_col3, #T_85118_row3_col0, #T_85118_row3_col1, #T_85118_row3_col2, #T_85118_row3_col3, #T_85118_row6_col0, #T_85118_row6_col1, #T_85118_row6_col2, #T_85118_row6_col3, #T_85118_row8_col0, #T_85118_row8_col1, #T_85118_row8_col2, #T_85118_row8_col3 {\n  background-color: red;\n  color: black;\n}\n</style>\n<table id=\"T_85118\">\n  <thead>\n    <tr>\n      <th class=\"blank level0\" >&nbsp;</th>\n      <th id=\"T_85118_level0_col0\" class=\"col_heading level0 col0\" >Prompt</th>\n      <th id=\"T_85118_level0_col1\" class=\"col_heading level0 col1\" >Actual</th>\n      <th id=\"T_85118_level0_col2\" class=\"col_heading level0 col2\" >Expected</th>\n      <th id=\"T_85118_level0_col3\" class=\"col_heading level0"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 32d301d5-760e-4268-9faf-27ae4c2e5be1
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"32d301d5-760e-4268-9faf-27ae4c2e5be1\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"9e772a21-117f-4222-b38d-220ed65885d3\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"fe6a23e052d841779d32859e08c251400d2381e5fe7ccd1e6a99e78d595299e9\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"117880a1-8240-4aba-bf3e-bb92c3af9ae5\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"49815a8abdbac9e1e4b24ad2dcf871bd86cd118220fe3bad9f2408c051a269e5\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 79311, \"end_char_idx\": 81096, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "#T_85118_row7_col3, #T_85118_row9_col0, #T_85118_row9_col1, #T_85118_row9_col2, #T_85118_row9_col3 {\n  background-color: white;\n  color: black;\n}\n#T_85118_row1_col0, #T_85118_row1_col1, #T_85118_row1_col2, #T_85118_row1_col3, #T_85118_row3_col0, #T_85118_row3_col1, #T_85118_row3_col2, #T_85118_row3_col3, #T_85118_row6_col0, #T_85118_row6_col1, #T_85118_row6_col2, #T_85118_row6_col3, #T_85118_row8_col0, #T_85118_row8_col1, #T_85118_row8_col2, #T_85118_row8_col3 {\n  background-color: red;\n  color: black;\n}\n</style>\n<table id=\"T_85118\">\n  <thead>\n    <tr>\n      <th class=\"blank level0\" >&nbsp;</th>\n      <th id=\"T_85118_level0_col0\" class=\"col_heading level0 col0\" >Prompt</th>\n      <th id=\"T_85118_level0_col1\" class=\"col_heading level0 col1\" >Actual</th>\n      <th id=\"T_85118_level0_col2\" class=\"col_heading level0 col2\" >Expected</th>\n      <th id=\"T_85118_level0_col3\" class=\"col_heading level0 col3\" >Match</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th id=\"T_85118_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n      <td id=\"T_85118_row0_col0\" class=\"data row0 col0\" >Play pre-recorded audio message</td>\n      <td id=\"T_85118_row0_col1\" class=\"data row0 col1\" >reject_request</td>\n      <td id=\"T_85118_row0_col2\" class=\"data row0 col2\" >reject_request</td>\n      <td id=\"T_85118_row0_col3\" class=\"data row0 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n      <td id=\"T_85118_row1_col0\" class=\"data row1 col0\" >Initiate following on social media</td>\n      <td id=\"T_85118_row1_col1\" class=\"data row1 col1\" >set_follow_me_mode</td>\n      <td id=\"T_85118_row1_col2\" class=\"data row1 col2\" >reject_request</td>\n      <td id=\"T_85118_row1_col3\" class=\"data row1 col3\" >No</td>\n    </tr>\n    <tr>"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 117880a1-8240-4aba-bf3e-bb92c3af9ae5
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"117880a1-8240-4aba-bf3e-bb92c3af9ae5\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"32d301d5-760e-4268-9faf-27ae4c2e5be1\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"381cf6fe49e266436eb15fad7a9feca50d307b43ae61895b4b1b018291bf4a90\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"917dae31-e060-4180-9cc5-2e703ba8a1c2\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"2e75031371b36fc5728f0f7436c193ac59f385d71b349dfbcf147b9ea961c296\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 80162, \"end_char_idx\": 81966, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "<th id=\"T_85118_level0_col3\" class=\"col_heading level0 col3\" >Match</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th id=\"T_85118_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n      <td id=\"T_85118_row0_col0\" class=\"data row0 col0\" >Play pre-recorded audio message</td>\n      <td id=\"T_85118_row0_col1\" class=\"data row0 col1\" >reject_request</td>\n      <td id=\"T_85118_row0_col2\" class=\"data row0 col2\" >reject_request</td>\n      <td id=\"T_85118_row0_col3\" class=\"data row0 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n      <td id=\"T_85118_row1_col0\" class=\"data row1 col0\" >Initiate following on social media</td>\n      <td id=\"T_85118_row1_col1\" class=\"data row1 col1\" >set_follow_me_mode</td>\n      <td id=\"T_85118_row1_col2\" class=\"data row1 col2\" >reject_request</td>\n      <td id=\"T_85118_row1_col3\" class=\"data row1 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n      <td id=\"T_85118_row2_col0\" class=\"data row2 col0\" >Scan environment for heat signatures</td>\n      <td id=\"T_85118_row2_col1\" class=\"data row2 col1\" >reject_request</td>\n      <td id=\"T_85118_row2_col2\" class=\"data row2 col2\" >reject_request</td>\n      <td id=\"T_85118_row2_col3\" class=\"data row2 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n      <td id=\"T_85118_row3_col0\" class=\"data row3 col0\" >Bump into obstacles</td>\n      <td id=\"T_85118_row3_col1\" class=\"data row3 col1\" >set_obstacle_avoidance</td>\n      <td id=\"T_85118_row3_col2\" class=\"data row3 col2\" >reject_request</td>\n      <td id=\"T_85118_row3_col3\" class=\"data row3 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row4\" class=\"row_heading"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 917dae31-e060-4180-9cc5-2e703ba8a1c2
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"917dae31-e060-4180-9cc5-2e703ba8a1c2\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"117880a1-8240-4aba-bf3e-bb92c3af9ae5\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8ccd28507195bd56fc26ac2ceaabff8eb42f6a4dfb9f58ba1ee0aec5d2068cf9\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"9b42c1d0-b8f4-4188-8420-8c2ea3916bb5\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"ce148d400f125e4b5348defec639f03280131ee7846df36ea6e3f6adc264d5cf\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 81046, \"end_char_idx\": 82810, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "class=\"data row1 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n      <td id=\"T_85118_row2_col0\" class=\"data row2 col0\" >Scan environment for heat signatures</td>\n      <td id=\"T_85118_row2_col1\" class=\"data row2 col1\" >reject_request</td>\n      <td id=\"T_85118_row2_col2\" class=\"data row2 col2\" >reject_request</td>\n      <td id=\"T_85118_row2_col3\" class=\"data row2 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n      <td id=\"T_85118_row3_col0\" class=\"data row3 col0\" >Bump into obstacles</td>\n      <td id=\"T_85118_row3_col1\" class=\"data row3 col1\" >set_obstacle_avoidance</td>\n      <td id=\"T_85118_row3_col2\" class=\"data row3 col2\" >reject_request</td>\n      <td id=\"T_85118_row3_col3\" class=\"data row3 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n      <td id=\"T_85118_row4_col0\" class=\"data row4 col0\" >Change drone's paint job color</td>\n      <td id=\"T_85118_row4_col1\" class=\"data row4 col1\" >reject_request</td>\n      <td id=\"T_85118_row4_col2\" class=\"data row4 col2\" >reject_request</td>\n      <td id=\"T_85118_row4_col3\" class=\"data row4 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n      <td id=\"T_85118_row5_col0\" class=\"data row5 col0\" >Coordinate with nearby drones</td>\n      <td id=\"T_85118_row5_col1\" class=\"data row5 col1\" >reject_request</td>\n      <td id=\"T_85118_row5_col2\" class=\"data row5 col2\" >reject_request</td>\n      <td id=\"T_85118_row5_col3\" class=\"data row5 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n      <td"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 9b42c1d0-b8f4-4188-8420-8c2ea3916bb5
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"9b42c1d0-b8f4-4188-8420-8c2ea3916bb5\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"917dae31-e060-4180-9cc5-2e703ba8a1c2\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2e6f9053555a2595fb1f71c61104e41166f21438a1a252cda4ee02ee7946dfe2\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"105c2a2b-ce8f-4d22-b9aa-060839412b58\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"47462759ce1620ef752c7af185c61b37496e6d828158b6e175147a7cac641100\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 81898, \"end_char_idx\": 83679, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "</tr>\n    <tr>\n      <th id=\"T_85118_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n      <td id=\"T_85118_row4_col0\" class=\"data row4 col0\" >Change drone's paint job color</td>\n      <td id=\"T_85118_row4_col1\" class=\"data row4 col1\" >reject_request</td>\n      <td id=\"T_85118_row4_col2\" class=\"data row4 col2\" >reject_request</td>\n      <td id=\"T_85118_row4_col3\" class=\"data row4 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n      <td id=\"T_85118_row5_col0\" class=\"data row5 col0\" >Coordinate with nearby drones</td>\n      <td id=\"T_85118_row5_col1\" class=\"data row5 col1\" >reject_request</td>\n      <td id=\"T_85118_row5_col2\" class=\"data row5 col2\" >reject_request</td>\n      <td id=\"T_85118_row5_col3\" class=\"data row5 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n      <td id=\"T_85118_row6_col0\" class=\"data row6 col0\" >Change speed to negative 120 km/h</td>\n      <td id=\"T_85118_row6_col1\" class=\"data row6 col1\" >set_drone_speed</td>\n      <td id=\"T_85118_row6_col2\" class=\"data row6 col2\" >reject_request</td>\n      <td id=\"T_85118_row6_col3\" class=\"data row6 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n      <td id=\"T_85118_row7_col0\" class=\"data row7 col0\" >Detect a person</td>\n      <td id=\"T_85118_row7_col1\" class=\"data row7 col1\" >reject_request</td>\n      <td id=\"T_85118_row7_col2\" class=\"data row7 col2\" >reject_request</td>\n      <td id=\"T_85118_row7_col3\" class=\"data row7 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n      <td id=\"T_85118_row8_col0\" class=\"data row8 col0\" >Please enable night"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 105c2a2b-ce8f-4d22-b9aa-060839412b58
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"105c2a2b-ce8f-4d22-b9aa-060839412b58\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"9b42c1d0-b8f4-4188-8420-8c2ea3916bb5\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"3679a66a9b071c9060d334ab471b99902747689e63be1ffcafbd589d4624d6f4\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"8245068c-c847-483b-80b1-fcf489d50a9d\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"6624688739c4b350e191f78fe2169f415381698432ea7e950aca6298af023ee8\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 82761, \"end_char_idx\": 84636, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": "class=\"row_heading level0 row6\" >6</th>\n      <td id=\"T_85118_row6_col0\" class=\"data row6 col0\" >Change speed to negative 120 km/h</td>\n      <td id=\"T_85118_row6_col1\" class=\"data row6 col1\" >set_drone_speed</td>\n      <td id=\"T_85118_row6_col2\" class=\"data row6 col2\" >reject_request</td>\n      <td id=\"T_85118_row6_col3\" class=\"data row6 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n      <td id=\"T_85118_row7_col0\" class=\"data row7 col0\" >Detect a person</td>\n      <td id=\"T_85118_row7_col1\" class=\"data row7 col1\" >reject_request</td>\n      <td id=\"T_85118_row7_col2\" class=\"data row7 col2\" >reject_request</td>\n      <td id=\"T_85118_row7_col3\" class=\"data row7 col3\" >Yes</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n      <td id=\"T_85118_row8_col0\" class=\"data row8 col0\" >Please enable night vision</td>\n      <td id=\"T_85118_row8_col1\" class=\"data row8 col1\" >set_drone_lighting</td>\n      <td id=\"T_85118_row8_col2\" class=\"data row8 col2\" >reject_request</td>\n      <td id=\"T_85118_row8_col3\" class=\"data row8 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n      <td id=\"T_85118_row9_col0\" class=\"data row9 col0\" >Report on humidity levels around you</td>\n      <td id=\"T_85118_row9_col1\" class=\"data row9 col1\" >reject_request</td>\n      <td id=\"T_85118_row9_col2\" class=\"data row9 col2\" >reject_request</td>\n      <td id=\"T_85118_row9_col3\" class=\"data row9 col3\" >Yes</td>\n    </tr>\n  </tbody>\n</table>\n\n\n\n    Number of matches: 6 out of 10 (60.00%)\n    Average latency per request: 647.58 ms\n    Average tokens used per request: 791.90\n\n\nGreat! While the original model only rejected 60%, the fine tuned model rejected 100% requests and used less tokens to do so.\n\n\n### Conclusion"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 8245068c-c847-483b-80b1-fcf489d50a9d
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb", "title": "Fine tuning with function-calling", "tokens": 26666, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"8245068c-c847-483b-80b1-fcf489d50a9d\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"51983297-47c5-4125-bc06-4b9f8388b668\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2aea7678eb93141493c86671ff644a0d6e245e50fb8bcbdf589d99dbf4fa0d0d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"105c2a2b-ce8f-4d22-b9aa-060839412b58\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Fine_tuning_for_function_calling.ipynb\", \"title\": \"Fine tuning with function-calling\", \"tokens\": 26666, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"766045949baa4a298b6bf7445e4b51977b71389a3e5600e344863b32c4a6ff7e\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 83595, \"end_char_idx\": 84756, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "51983297-47c5-4125-bc06-4b9f8388b668", "doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "ref_doc_id": "51983297-47c5-4125-bc06-4b9f8388b668", "chroma:document": ">8</th>\n      <td id=\"T_85118_row8_col0\" class=\"data row8 col0\" >Please enable night vision</td>\n      <td id=\"T_85118_row8_col1\" class=\"data row8 col1\" >set_drone_lighting</td>\n      <td id=\"T_85118_row8_col2\" class=\"data row8 col2\" >reject_request</td>\n      <td id=\"T_85118_row8_col3\" class=\"data row8 col3\" >No</td>\n    </tr>\n    <tr>\n      <th id=\"T_85118_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n      <td id=\"T_85118_row9_col0\" class=\"data row9 col0\" >Report on humidity levels around you</td>\n      <td id=\"T_85118_row9_col1\" class=\"data row9 col1\" >reject_request</td>\n      <td id=\"T_85118_row9_col2\" class=\"data row9 col2\" >reject_request</td>\n      <td id=\"T_85118_row9_col3\" class=\"data row9 col3\" >Yes</td>\n    </tr>\n  </tbody>\n</table>\n\n\n\n    Number of matches: 6 out of 10 (60.00%)\n    Average latency per request: 647.58 ms\n    Average tokens used per request: 791.90\n\n\nGreat! While the original model only rejected 60%, the fine tuned model rejected 100% requests and used less tokens to do so.\n\n\n### Conclusion\n\n\nCongratulations! You are now ready to fine tune your model for function calling. We can't wait to see what you build."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 9e8a879a-b4e3-4047-8452-c8a82f1f5049
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb", "title": "Function-calling with an OpenAPI specification", "tokens": 4377, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"9e8a879a-b4e3-4047-8452-c8a82f1f5049\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"ab416a66-f5dd-4d90-894c-372dd4028fc4\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"320449d23351b1cf0a2cb2b2a860f553e095360d72a221363626e67c1b2c9eae\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"347c0afa-0068-4474-9921-b65001bb3082\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"5940647d306d318951f8c7c64d53036d63c49c1f1b0a30f68bd54105a4f89b24\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 0, \"end_char_idx\": 2471, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "ref_doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "chroma:document": "# Function-calling with an OpenAPI specification\n\n\nMuch of the internet is powered by RESTful APIs. Giving GPT the ability to call them opens up a world of possibilities. This notebook demonstrates how GPTs can be used to intelligently call APIs. It leverages OpenAPI specifications and chained function calls.\n\nThe [OpenAPI Specification (OAS)](https://swagger.io/specification/) is a universally accepted standard for describing the details of RESTful APIs in a format that machines can read and interpret. It enables both humans and computers to understand the capabilities of a service, and it can be leveraged to show GPT how to call APIs.\n\nThis notebook is divided into two main sections:\n\n1. How to convert a sample OpenAPI specification into a list of function definitions for the chat completions API.\n2. How to use the chat completions API to intelligently invoke these functions based on user instructions.\n\nWe recommend familiariazing yourself with [function-calling](./How_to_call_functions_with_chat_models.ipynb) before proceding.\n\n\n\n```python\n!pip install -q jsonref # for resolving $ref's in the OpenAPI spec\n!pip install -q openai\n```\n\n    \u001b[33mDEPRECATION: textract 1.6.5 has a non-standard dependency specifier extract-msg<=0.29.*. pip 23.3 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of textract or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063\u001b[0m\u001b[33m\n    \u001b[0m\n    \u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.2.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.3.1\u001b[0m\n    \u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n    \u001b[33mDEPRECATION: textract 1.6.5 has a non-standard dependency specifier extract-msg<=0.29.*. pip 23.3 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of textract or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063\u001b[0m\u001b[33m\n    \u001b[0m\n    \u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.2.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.3.1\u001b[0m\n    \u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 347c0afa-0068-4474-9921-b65001bb3082
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb", "title": "Function-calling with an OpenAPI specification", "tokens": 4377, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"347c0afa-0068-4474-9921-b65001bb3082\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"ab416a66-f5dd-4d90-894c-372dd4028fc4\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"320449d23351b1cf0a2cb2b2a860f553e095360d72a221363626e67c1b2c9eae\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"9e8a879a-b4e3-4047-8452-c8a82f1f5049\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"1fa92f82c2e0c86465b10c8bcad49e2f44b74f13bd9351735acf3cdfcc8d53b3\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"2700adc0-9949-467c-b0df-17b653ba2081\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"7fe3a918b35f7dbe0ac3bfce3ef55995f92809263c3f7fb58dfb0add6152b0ef\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 2475, \"end_char_idx\": 5600, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "ref_doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "chroma:document": "```python\nimport os\nimport json\nimport jsonref\nfrom openai import OpenAI\nimport requests\nfrom pprint import pp\n\nclient = OpenAI(api_key=os.environ.get(\"OPENAI_API_KEY\", \"<your OpenAI API key if not set as env var>\"))\n```\n\n## How to convert an OpenAPI specification into function definitions\n\n\nThe example OpenAPI spec we use here was created using `gpt-4`. We will transform this sample spec into a set of function definitions that can be supplied to the chat completion API. The model, based on the provided user instructions, generates a JSON object containing the necessary arguments to call these functions.\n\nBefore we proceed, let's inspect this generated spec. OpenAPI specs include details about the API's endpoints, the operations they support, the parameters they accept, the requests they can handle, and the responses they return. The spec is defined in JSON format.\n\nThe endpoints in the spec include operations for:\n\n- Listing all events\n- Creating a new event\n- Retrieving an event by ID\n- Deleting an event by ID\n- Updating an event name by ID\n\nEach operation in the spec has an `operationId`, which we will use as the function name when we parse the spec into function specifications. The spec also includes schemas that define the data types and structures of the parameters for each operation.\n\nYou can see the schema here:\n\n\n\n```python\nwith open('./data/example_events_openapi.json', 'r') as f:\n    openapi_spec = jsonref.loads(f.read()) # it's important to load with jsonref, as explained below\n\ndisplay(openapi_spec)\n```\n\n\n    {'openapi': '3.0.0',\n     'info': {'version': '1.0.0',\n      'title': 'Event Management API',\n      'description': 'An API for managing event data'},\n     'paths': {'/events': {'get': {'summary': 'List all events',\n        'operationId': 'listEvents',\n        'responses': {'200': {'description': 'A list of events',\n          'content': {'application/json': {'schema': {'type': 'array',\n             'items': {'type': 'object',\n              'properties': {'id': {'type': 'string'},\n               'name': {'type': 'string'},\n               'date': {'type': 'string', 'format': 'date-time'},\n               'location': {'type': 'string'}},\n              'required': ['name', 'date', 'location']}}}}}}},\n       'post': {'summary': 'Create a new event',\n        'operationId': 'createEvent',\n        'requestBody': {'required': True,\n         'content': {'application/json': {'schema': {'type': 'object',\n            'properties': {'id': {'type': 'string'},\n             'name': {'type': 'string'},\n             'date': {'type': 'string', 'format': 'date-time'},\n             'location': {'type': 'string'}},\n            'required': ['name', 'date', 'location']}}}},\n        'responses': {'201': {'description': 'The event was created',\n          'content': {'application/json': {'schema': {'type': 'object',\n             'properties': {'id': {'type': 'string'},\n              'name': {'type': 'string'},\n              'date': {'type': 'string', 'format': 'date-time'},\n              'location': {'type': 'string'}},\n             'required': ['name', 'date', 'location']}}}}}}},"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 2700adc0-9949-467c-b0df-17b653ba2081
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb", "title": "Function-calling with an OpenAPI specification", "tokens": 4377, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"2700adc0-9949-467c-b0df-17b653ba2081\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"ab416a66-f5dd-4d90-894c-372dd4028fc4\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"320449d23351b1cf0a2cb2b2a860f553e095360d72a221363626e67c1b2c9eae\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"347c0afa-0068-4474-9921-b65001bb3082\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"8ff333873c9318eb1f1f66379cd99b8d3351d25e403aa5111474c875110f4faf\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"590209df-907b-4040-a0ee-b995dcfc8a6e\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"49b31341abaf4efbd8668b1f266c51f336105eec26858880eb670048ffaea364\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 4123, \"end_char_idx\": 6984, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "ref_doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "chroma:document": "'description': 'An API for managing event data'},\n     'paths': {'/events': {'get': {'summary': 'List all events',\n        'operationId': 'listEvents',\n        'responses': {'200': {'description': 'A list of events',\n          'content': {'application/json': {'schema': {'type': 'array',\n             'items': {'type': 'object',\n              'properties': {'id': {'type': 'string'},\n               'name': {'type': 'string'},\n               'date': {'type': 'string', 'format': 'date-time'},\n               'location': {'type': 'string'}},\n              'required': ['name', 'date', 'location']}}}}}}},\n       'post': {'summary': 'Create a new event',\n        'operationId': 'createEvent',\n        'requestBody': {'required': True,\n         'content': {'application/json': {'schema': {'type': 'object',\n            'properties': {'id': {'type': 'string'},\n             'name': {'type': 'string'},\n             'date': {'type': 'string', 'format': 'date-time'},\n             'location': {'type': 'string'}},\n            'required': ['name', 'date', 'location']}}}},\n        'responses': {'201': {'description': 'The event was created',\n          'content': {'application/json': {'schema': {'type': 'object',\n             'properties': {'id': {'type': 'string'},\n              'name': {'type': 'string'},\n              'date': {'type': 'string', 'format': 'date-time'},\n              'location': {'type': 'string'}},\n             'required': ['name', 'date', 'location']}}}}}}},\n      '/events/{id}': {'get': {'summary': 'Retrieve an event by ID',\n        'operationId': 'getEventById',\n        'parameters': [{'name': 'id',\n          'in': 'path',\n          'required': True,\n          'schema': {'type': 'string'}}],\n        'responses': {'200': {'description': 'The event',\n          'content': {'application/json': {'schema': {'type': 'object',\n             'properties': {'id': {'type': 'string'},\n              'name': {'type': 'string'},\n              'date': {'type': 'string', 'format': 'date-time'},\n              'location': {'type': 'string'}},\n             'required': ['name', 'date', 'location']}}}}}},\n       'delete': {'summary': 'Delete an event by ID',\n        'operationId': 'deleteEvent',\n        'parameters': [{'name': 'id',\n          'in': 'path',\n          'required': True,\n          'schema': {'type': 'string'}}],\n        'responses': {'204': {'description': 'The event was deleted'}}},\n       'patch': {'summary': \"Update an event's details by ID\",\n        'operationId': 'updateEventDetails',\n        'parameters': [{'name': 'id',\n          'in': 'path',\n          'required': True,\n          'schema': {'type': 'string'}}],\n        'requestBody': {'required': True,\n         'content': {'application/json': {'schema': {'type': 'object',\n            'properties': {'name': {'type': 'string'},\n             'date': {'type': 'string',"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 590209df-907b-4040-a0ee-b995dcfc8a6e
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb", "title": "Function-calling with an OpenAPI specification", "tokens": 4377, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"590209df-907b-4040-a0ee-b995dcfc8a6e\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"ab416a66-f5dd-4d90-894c-372dd4028fc4\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"320449d23351b1cf0a2cb2b2a860f553e095360d72a221363626e67c1b2c9eae\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"2700adc0-9949-467c-b0df-17b653ba2081\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"356b5588e38cfc7b6ca301ebb02d47798d0c2816a4b5fbcdf9cf427d3adf3b13\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"ab3811f5-2d96-4338-a1e8-1b0c3caba0f7\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"923135d06eb2709bc8a165253efaa8748568e980def448d1926a3b7e7ca59de1\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 5552, \"end_char_idx\": 7837, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "ref_doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "chroma:document": "'required': ['name', 'date', 'location']}}}}}}},\n      '/events/{id}': {'get': {'summary': 'Retrieve an event by ID',\n        'operationId': 'getEventById',\n        'parameters': [{'name': 'id',\n          'in': 'path',\n          'required': True,\n          'schema': {'type': 'string'}}],\n        'responses': {'200': {'description': 'The event',\n          'content': {'application/json': {'schema': {'type': 'object',\n             'properties': {'id': {'type': 'string'},\n              'name': {'type': 'string'},\n              'date': {'type': 'string', 'format': 'date-time'},\n              'location': {'type': 'string'}},\n             'required': ['name', 'date', 'location']}}}}}},\n       'delete': {'summary': 'Delete an event by ID',\n        'operationId': 'deleteEvent',\n        'parameters': [{'name': 'id',\n          'in': 'path',\n          'required': True,\n          'schema': {'type': 'string'}}],\n        'responses': {'204': {'description': 'The event was deleted'}}},\n       'patch': {'summary': \"Update an event's details by ID\",\n        'operationId': 'updateEventDetails',\n        'parameters': [{'name': 'id',\n          'in': 'path',\n          'required': True,\n          'schema': {'type': 'string'}}],\n        'requestBody': {'required': True,\n         'content': {'application/json': {'schema': {'type': 'object',\n            'properties': {'name': {'type': 'string'},\n             'date': {'type': 'string', 'format': 'date-time'},\n             'location': {'type': 'string'}},\n            'required': ['name', 'date', 'location']}}}},\n        'responses': {'200': {'description': \"The event's details were updated\",\n          'content': {'application/json': {'schema': {'type': 'object',\n             'properties': {'id': {'type': 'string'},\n              'name': {'type': 'string'},\n              'date': {'type': 'string', 'format': 'date-time'},\n              'location': {'type': 'string'}},\n             'required': ['name', 'date', 'location']}}}}}}}},\n     'components': {'schemas': {'Event': {'type': 'object',\n        'properties': {'id': {'type': 'string'},\n         'name': {'type': 'string'},\n         'date': {'type': 'string', 'format': 'date-time'},\n         'location': {'type': 'string'}},\n        'required': ['name', 'date', 'location']}}}}"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: ab3811f5-2d96-4338-a1e8-1b0c3caba0f7
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb", "title": "Function-calling with an OpenAPI specification", "tokens": 4377, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"ab3811f5-2d96-4338-a1e8-1b0c3caba0f7\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"ab416a66-f5dd-4d90-894c-372dd4028fc4\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"320449d23351b1cf0a2cb2b2a860f553e095360d72a221363626e67c1b2c9eae\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"590209df-907b-4040-a0ee-b995dcfc8a6e\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"0e21fd4488c4ecaf73116d0ba1bb393f0236e1773ff0de8883fdbe4e2ab9191e\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"e96b21f6-65b4-499f-8a91-663ed7df092c\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"11c807733f15d26f759bfc485900142aefa6f699790cce8137acae67d51562b6\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 6380, \"end_char_idx\": 9504, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "ref_doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "chroma:document": "'in': 'path',\n          'required': True,\n          'schema': {'type': 'string'}}],\n        'responses': {'204': {'description': 'The event was deleted'}}},\n       'patch': {'summary': \"Update an event's details by ID\",\n        'operationId': 'updateEventDetails',\n        'parameters': [{'name': 'id',\n          'in': 'path',\n          'required': True,\n          'schema': {'type': 'string'}}],\n        'requestBody': {'required': True,\n         'content': {'application/json': {'schema': {'type': 'object',\n            'properties': {'name': {'type': 'string'},\n             'date': {'type': 'string', 'format': 'date-time'},\n             'location': {'type': 'string'}},\n            'required': ['name', 'date', 'location']}}}},\n        'responses': {'200': {'description': \"The event's details were updated\",\n          'content': {'application/json': {'schema': {'type': 'object',\n             'properties': {'id': {'type': 'string'},\n              'name': {'type': 'string'},\n              'date': {'type': 'string', 'format': 'date-time'},\n              'location': {'type': 'string'}},\n             'required': ['name', 'date', 'location']}}}}}}}},\n     'components': {'schemas': {'Event': {'type': 'object',\n        'properties': {'id': {'type': 'string'},\n         'name': {'type': 'string'},\n         'date': {'type': 'string', 'format': 'date-time'},\n         'location': {'type': 'string'}},\n        'required': ['name', 'date', 'location']}}}}\n\n\nNow that we have a good understanding of the OpenAPI spec, we can proceed to parse it into function specifications.\n\nWe can write a simple `openapi_to_functions` function to generate a list of definitions, where each function is represented as a dictionary containing the following keys:\n\n- `name`: This corresponds to the operation identifier of the API endpoint as defined in the OpenAPI specification.\n- `description`: This is a brief description or summary of the function, providing an overview of what the function does.\n- `parameters`: This is a schema that defines the expected input parameters for the function. It provides information about the type of each parameter, whether it is required or optional, and other related details.\n\nFor each of the endpoints defined in the schema, we need to do the following:\n\n1. **Resolve JSON references**: In an OpenAPI specification, it's common to use JSON references (also known as $ref) to avoid duplication. These references point to definitions that are used in multiple places. For example, if multiple API endpoints return the same object structure, that structure can be defined once and then referenced wherever it's needed. We need to resolve and replace these references with the content they point to.\n\n2. **Extract a name for the functions:** We will simply use the operationId as the function name. Alternatively, we could use the endpoint path and operation as the function name.\n\n3. **Extract a description and parameters:** We will iterate through the `description`, `summary`, `requestBody` and `parameters` fields to populate the function's description and parameters.\n\nHere's the implementation:"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: e96b21f6-65b4-499f-8a91-663ed7df092c
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb", "title": "Function-calling with an OpenAPI specification", "tokens": 4377, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"e96b21f6-65b4-499f-8a91-663ed7df092c\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"ab416a66-f5dd-4d90-894c-372dd4028fc4\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"320449d23351b1cf0a2cb2b2a860f553e095360d72a221363626e67c1b2c9eae\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ab3811f5-2d96-4338-a1e8-1b0c3caba0f7\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"6ee04143f50070c965cbbec58cd73f601f79883513908dce6c7edf00f08294eb\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"3b348727-cfdd-4723-b4d6-c9a3eb1b3b0a\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"6905fa756180a30e798d0f8e47e18505332d194fd9f585f61c18c56eda6c2af7\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 7605, \"end_char_idx\": 10963, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "ref_doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "chroma:document": "'properties': {'id': {'type': 'string'},\n         'name': {'type': 'string'},\n         'date': {'type': 'string', 'format': 'date-time'},\n         'location': {'type': 'string'}},\n        'required': ['name', 'date', 'location']}}}}\n\n\nNow that we have a good understanding of the OpenAPI spec, we can proceed to parse it into function specifications.\n\nWe can write a simple `openapi_to_functions` function to generate a list of definitions, where each function is represented as a dictionary containing the following keys:\n\n- `name`: This corresponds to the operation identifier of the API endpoint as defined in the OpenAPI specification.\n- `description`: This is a brief description or summary of the function, providing an overview of what the function does.\n- `parameters`: This is a schema that defines the expected input parameters for the function. It provides information about the type of each parameter, whether it is required or optional, and other related details.\n\nFor each of the endpoints defined in the schema, we need to do the following:\n\n1. **Resolve JSON references**: In an OpenAPI specification, it's common to use JSON references (also known as $ref) to avoid duplication. These references point to definitions that are used in multiple places. For example, if multiple API endpoints return the same object structure, that structure can be defined once and then referenced wherever it's needed. We need to resolve and replace these references with the content they point to.\n\n2. **Extract a name for the functions:** We will simply use the operationId as the function name. Alternatively, we could use the endpoint path and operation as the function name.\n\n3. **Extract a description and parameters:** We will iterate through the `description`, `summary`, `requestBody` and `parameters` fields to populate the function's description and parameters.\n\nHere's the implementation:\n\n\n\n```python\ndef openapi_to_functions(openapi_spec):\n    functions = []\n\n    for path, methods in openapi_spec[\"paths\"].items():\n        for method, spec_with_ref in methods.items():\n            # 1. Resolve JSON references.\n            spec = jsonref.replace_refs(spec_with_ref)\n\n            # 2. Extract a name for the functions.\n            function_name = spec.get(\"operationId\")\n\n            # 3. Extract a description and parameters.\n            desc = spec.get(\"description\") or spec.get(\"summary\", \"\")\n\n            schema = {\"type\": \"object\", \"properties\": {}}\n\n            req_body = (\n                spec.get(\"requestBody\", {})\n                .get(\"content\", {})\n                .get(\"application/json\", {})\n                .get(\"schema\")\n            )\n            if req_body:\n                schema[\"properties\"][\"requestBody\"] = req_body\n\n            params = spec.get(\"parameters\", [])\n            if params:\n                param_properties = {\n                    param[\"name\"]: param[\"schema\"]\n                    for param in params\n                    if \"schema\" in param\n                }\n                schema[\"properties\"][\"parameters\"] = {\n                    \"type\": \"object\",\n                    \"properties\": param_properties,\n                }\n\n            functions.append(\n                {\"type\": \"function\", \"function\": {\"name\": function_name, \"description\": desc, \"parameters\": schema}}\n            )\n\n    return functions"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 3b348727-cfdd-4723-b4d6-c9a3eb1b3b0a
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb", "title": "Function-calling with an OpenAPI specification", "tokens": 4377, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"3b348727-cfdd-4723-b4d6-c9a3eb1b3b0a\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"excluded_embed_metadata_keys\": [\"url\", \"tokens\", \"retrieve_doc\", \"source\"], \"excluded_llm_metadata_keys\": [\"title\", \"tokens\", \"retrieve_doc\", \"source\"], \"relationships\": {\"1\": {\"node_id\": \"ab416a66-f5dd-4d90-894c-372dd4028fc4\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"320449d23351b1cf0a2cb2b2a860f553e095360d72a221363626e67c1b2c9eae\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"e96b21f6-65b4-499f-8a91-663ed7df092c\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb\", \"title\": \"Function-calling with an OpenAPI specification\", \"tokens\": 4377, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"93b67e178b9bf59c8f55773617c178087ef1c00dcd6160fe732d318b86d09b24\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"410d3e1a-053b-4967-93b6-a0bbbc1636c6\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"848cc58d07658b84bf4550ea8edc6f7d900e23f4f064798e1e2b4042c7f7cedf\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 9508, \"end_char_idx\": 14285, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "ref_doc_id": "ab416a66-f5dd-4d90-894c-372dd4028fc4", "chroma:document": "```python\ndef openapi_to_functions(openapi_spec):\n    functions = []\n\n    for path, methods in openapi_spec[\"paths\"].items():\n        for method, spec_with_ref in methods.items():\n            # 1. Resolve JSON references.\n            spec = jsonref.replace_refs(spec_with_ref)\n\n            # 2. Extract a name for the functions.\n            function_name = spec.get(\"operationId\")\n\n            # 3. Extract a description and parameters.\n            desc = spec.get(\"description\") or spec.get(\"summary\", \"\")\n\n            schema = {\"type\": \"object\", \"properties\": {}}\n\n            req_body = (\n                spec.get(\"requestBody\", {})\n                .get(\"content\", {})\n                .get(\"application/json\", {})\n                .get(\"schema\")\n            )\n            if req_body:\n                schema[\"properties\"][\"requestBody\"] = req_body\n\n            params = spec.get(\"parameters\", [])\n            if params:\n                param_properties = {\n                    param[\"name\"]: param[\"schema\"]\n                    for param in params\n                    if \"schema\" in param\n                }\n                schema[\"properties\"][\"parameters\"] = {\n                    \"type\": \"object\",\n                    \"properties\": param_properties,\n                }\n\n            functions.append(\n                {\"type\": \"function\", \"function\": {\"name\": function_name, \"description\": desc, \"parameters\": schema}}\n            )\n\n    return functions\n\n\nfunctions = openapi_to_functions(openapi_spec)\n\nfor function in functions:\n    pp(function)\n    print()\n\n```\n\n    {'type': 'function',\n     'function': {'name': 'listEvents',\n                  'description': 'List all events',\n                  'parameters': {'type': 'object', 'properties': {}}}}\n    \n    {'type': 'function',\n     'function': {'name': 'createEvent',\n                  'description': 'Create a new event',\n                  'parameters': {'type': 'object',\n                                 'properties': {'requestBody': {'type': 'object',\n                                                                'properties': {'id': {'type': 'string'},\n                                                                               'name': {'type': 'string'},\n                                                                               'date': {'type': 'string',\n                                                                                        'format': 'date-time'},\n                                                                               'location': {'type': 'string'}},\n                                                                'required': ['name',\n                                                                             'date',\n                                                                             'location']}}}}}\n    \n    {'type': 'function',\n     'function': {'name': 'getEventById',\n                  'description': 'Retrieve an event by ID',\n                  'parameters': {'type': 'object',\n                                 'properties': {'parameters': {'type': 'object',\n                                                               'properties': {'id': {'type': 'string'}}}}}}}\n    \n    {'type': 'function',\n     'function': {'name': 'deleteEvent',\n                  'description': 'Delete an event by ID',\n                  'parameters': {'type': 'object',\n                                 'properties': {'parameters': {'type': 'object',\n                                                               'properties': {'id': {'type': 'string'}}}}}}}\n    \n    {'type': 'function',\n     'function': {'name': 'updateEventDetails',\n                  'description': \"Update an event's details by ID\",\n                  'parameters': {'type': 'object',\n                                 'properties': {'requestBody': {'type': 'object',\n                                                                'properties': {'name': {'type': 'string'},\n                                                                               'date': {'type': 'string',\n                                                                                        'format': 'date-time'},\n                                                                               'location': {'type': 'string'}},\n                                                                'required': ['name',\n                                                                             'date',\n                                                                             'location']},\n                                                'parameters': {'type': 'object',\n                                                               'properties': {'id': {'type': 'string'}}}}}}}\n    \n\n\n## How to call these functions with GPT"}


