# embeddings_queue

created_at: 2024-07-28 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 7b6d4614-5e97-4db0-986b-5bb4fa641286
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_\": \"7b6d4614-5e97-4db0-986b-5bb4fa641286\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"51a02fa2-4a2c-4efa-828a-9e7d2f28d515\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 51a02fa2-4a2c-4efa-828a-9e7d2f28d515
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_\": \"51a02fa2-4a2c-4efa-828a-9e7d2f28d515\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7b6d4614-5e97-4db0-986b-5bb4fa641286\", \"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\": \"f4a7bcb305bf42e083fa5db4f80ddec148b35d5dc9fbd622cfcac982d133b6a6\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"051c9c52-3e30-417d-9500-0aadd469d4bf\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 051c9c52-3e30-417d-9500-0aadd469d4bf
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_\": \"051c9c52-3e30-417d-9500-0aadd469d4bf\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"51a02fa2-4a2c-4efa-828a-9e7d2f28d515\", \"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\": \"84354a2984409a05228c5f7af1acde95db230796262f8573a5f36fde5c0e0d5f\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"1c0a7b7b-6e48-41cc-bb88-c0c2ddca7aec\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 1c0a7b7b-6e48-41cc-bb88-c0c2ddca7aec
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_\": \"1c0a7b7b-6e48-41cc-bb88-c0c2ddca7aec\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"051c9c52-3e30-417d-9500-0aadd469d4bf\", \"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\": \"c66f58d5ddfe625a89b2cfedd5e5a15dd29baa101f63fa21aeedab0b4f7c1e21\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c9914776-66ae-4cc8-bad8-0bdad88f6cdf\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: c9914776-66ae-4cc8-bad8-0bdad88f6cdf
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_\": \"c9914776-66ae-4cc8-bad8-0bdad88f6cdf\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"1c0a7b7b-6e48-41cc-bb88-c0c2ddca7aec\", \"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\": \"8c46191e7b6be9d401e075b1b10fbc6234cb1c25f3af1e65f8aa1d96005b6bc1\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"80ae8fd3-845b-473c-8c94-f2c050e06391\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 80ae8fd3-845b-473c-8c94-f2c050e06391
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_\": \"80ae8fd3-845b-473c-8c94-f2c050e06391\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"c9914776-66ae-4cc8-bad8-0bdad88f6cdf\", \"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\": \"53ed103ed4903650cae37167c57c4823bb54f5e9b66a36206b32e9a106eed382\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"362b6339-ce97-4b90-b44b-6795594efe5a\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 362b6339-ce97-4b90-b44b-6795594efe5a
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_\": \"362b6339-ce97-4b90-b44b-6795594efe5a\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"80ae8fd3-845b-473c-8c94-f2c050e06391\", \"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\": \"8ef62d918d3df88189248301ccf320054a22b646f8052ed9bcf5207729fbc03c\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"55c73e53-7d41-4365-94ce-fe44a8e67b78\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 55c73e53-7d41-4365-94ce-fe44a8e67b78
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_\": \"55c73e53-7d41-4365-94ce-fe44a8e67b78\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"362b6339-ce97-4b90-b44b-6795594efe5a\", \"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\": \"fbb4c45fd93aaaf3f18be44b90ad7f0970f09fff331afb643bbd9fbe3f4b0c07\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"3aafb590-3fd2-4955-a489-07b4d2741bfc\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 3aafb590-3fd2-4955-a489-07b4d2741bfc
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_\": \"3aafb590-3fd2-4955-a489-07b4d2741bfc\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"55c73e53-7d41-4365-94ce-fe44a8e67b78\", \"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\": \"3eddd42036d3660c4791c5bddcb312e1ecc9d2a7c062cad41d86fb101ecb1142\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c54f886f-d7e3-436b-8d17-689e71419006\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: c54f886f-d7e3-436b-8d17-689e71419006
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_\": \"c54f886f-d7e3-436b-8d17-689e71419006\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"3aafb590-3fd2-4955-a489-07b4d2741bfc\", \"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\": \"0e905e60150b1f90fb85b4fcb35c47f4946c3070ba3eae1d3ec9d52da894368f\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"23a92b94-6a05-4bd5-838d-c271dc303179\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 23a92b94-6a05-4bd5-838d-c271dc303179
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_\": \"23a92b94-6a05-4bd5-838d-c271dc303179\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"c54f886f-d7e3-436b-8d17-689e71419006\", \"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\": \"cdad9d878fe1f2d828498f09658d2c05d66ac905dfb98c7c96384e7ee1f377e9\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"ccca5055-c53f-46c1-8f39-486ac6c42080\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: ccca5055-c53f-46c1-8f39-486ac6c42080
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_\": \"ccca5055-c53f-46c1-8f39-486ac6c42080\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"23a92b94-6a05-4bd5-838d-c271dc303179\", \"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\": \"bab7c2ebac3c36b709d78704e294e5693d158d755b71351abec8e64792707308\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"cd1f6d22-95c5-46e6-ad97-34607a1f1622\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: cd1f6d22-95c5-46e6-ad97-34607a1f1622
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_\": \"cd1f6d22-95c5-46e6-ad97-34607a1f1622\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ccca5055-c53f-46c1-8f39-486ac6c42080\", \"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\": \"64ed8567f391da2cc3f5a96fed4906963ed49bddd2f0060903a811a342073eba\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"9f4d7091-5069-4319-95d3-6c167d9cbb98\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 9f4d7091-5069-4319-95d3-6c167d9cbb98
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_\": \"9f4d7091-5069-4319-95d3-6c167d9cbb98\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"cd1f6d22-95c5-46e6-ad97-34607a1f1622\", \"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\": \"9448de77e71fc01cb65b6b6bb8d759ffa13bc547b9930443b2462769a5464b11\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4f093754-bfe1-4c97-9de4-8c45ec40b76a\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 4f093754-bfe1-4c97-9de4-8c45ec40b76a
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_\": \"4f093754-bfe1-4c97-9de4-8c45ec40b76a\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"9f4d7091-5069-4319-95d3-6c167d9cbb98\", \"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\": \"37f2692b99a575abbbc124a5fb9a51d2bcdc94d2678e2306bdcdd3d0995549e7\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"2fd4bdfd-9855-4020-94d7-5b59104492a7\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 2fd4bdfd-9855-4020-94d7-5b59104492a7
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_\": \"2fd4bdfd-9855-4020-94d7-5b59104492a7\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4f093754-bfe1-4c97-9de4-8c45ec40b76a\", \"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\": \"830bc68eacc5d54a21dfd282925633c3ec26fb1150c612af3bf9a258a0422de0\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"df574749-b27d-44b8-810c-d00d2a87035e\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: df574749-b27d-44b8-810c-d00d2a87035e
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_\": \"df574749-b27d-44b8-810c-d00d2a87035e\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"2fd4bdfd-9855-4020-94d7-5b59104492a7\", \"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\": \"3df7c63faace321ab7be866f0f98d1c407f64eb69ac1de50c7f434a288a06928\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"ed00e2ad-1448-4e73-aa4e-dde8e5b3f290\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: ed00e2ad-1448-4e73-aa4e-dde8e5b3f290
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_\": \"ed00e2ad-1448-4e73-aa4e-dde8e5b3f290\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"df574749-b27d-44b8-810c-d00d2a87035e\", \"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\": \"0be580060dd94c481e535cc1b817b147f685ca188376764534150a84491a286e\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"d58bc4ce-182d-4d9e-9f1c-e22d1da7342c\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: d58bc4ce-182d-4d9e-9f1c-e22d1da7342c
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_\": \"d58bc4ce-182d-4d9e-9f1c-e22d1da7342c\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ed00e2ad-1448-4e73-aa4e-dde8e5b3f290\", \"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\": \"1c088620d78fadaa48b71194f50880ef4a02d7087875c0b20524cb44d91eed09\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f39ceed8-7f0f-4123-b92b-726226d75263\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: f39ceed8-7f0f-4123-b92b-726226d75263
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_\": \"f39ceed8-7f0f-4123-b92b-726226d75263\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"d58bc4ce-182d-4d9e-9f1c-e22d1da7342c\", \"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\": \"f126a03a521d0b429e6c963d53841c0d49a863cc1d17a08756ae4c768174e532\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"528543d3-08e9-4326-b7a3-ab89b2ad6b34\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 528543d3-08e9-4326-b7a3-ab89b2ad6b34
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_\": \"528543d3-08e9-4326-b7a3-ab89b2ad6b34\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f39ceed8-7f0f-4123-b92b-726226d75263\", \"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\": \"e6e878b00445b96c184eef2e78f94a40e3f27be640d34515e2b376a8805c1621\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"e7eda091-8c38-4eb7-9d8f-97d425d7b2dc\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: e7eda091-8c38-4eb7-9d8f-97d425d7b2dc
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_\": \"e7eda091-8c38-4eb7-9d8f-97d425d7b2dc\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"528543d3-08e9-4326-b7a3-ab89b2ad6b34\", \"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\": \"0a0b0465bd2f35d28f8ff47bdf14dd9f0d0d1a85a8b348b97aa8b50fe6756501\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b0bdf8ab-7aec-4e56-8246-e011d7f708fe\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: b0bdf8ab-7aec-4e56-8246-e011d7f708fe
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_\": \"b0bdf8ab-7aec-4e56-8246-e011d7f708fe\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"e7eda091-8c38-4eb7-9d8f-97d425d7b2dc\", \"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\": \"9815868a96a82aae69991cf8602246cecee39fef0dd58a2c4da0392a64b12b1a\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"01dd1be5-88f5-4105-9b81-dde3657f5c30\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 01dd1be5-88f5-4105-9b81-dde3657f5c30
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_\": \"01dd1be5-88f5-4105-9b81-dde3657f5c30\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"b0bdf8ab-7aec-4e56-8246-e011d7f708fe\", \"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\": \"7b9d86a6bd485c58ae4731ca24238ec3eb90b5dbb9028c9051d8f5e981b77ab8\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c6e00e1b-cc88-4465-84ec-6b2a55ffd5b4\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: c6e00e1b-cc88-4465-84ec-6b2a55ffd5b4
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_\": \"c6e00e1b-cc88-4465-84ec-6b2a55ffd5b4\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"01dd1be5-88f5-4105-9b81-dde3657f5c30\", \"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\": \"28a7d8cd01a9bb929c44333276c81e8c192513728bffad745e487af561018c14\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"24458b10-beb5-408f-8f7f-68754050e6f2\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 24458b10-beb5-408f-8f7f-68754050e6f2
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_\": \"24458b10-beb5-408f-8f7f-68754050e6f2\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"c6e00e1b-cc88-4465-84ec-6b2a55ffd5b4\", \"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\": \"617b5fa7b8277f349b67bea1be74ab702f4797a3754f94a29347390875fb5dd3\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"66ad3e92-fd1b-4904-aadd-15fc78066604\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 66ad3e92-fd1b-4904-aadd-15fc78066604
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_\": \"66ad3e92-fd1b-4904-aadd-15fc78066604\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"24458b10-beb5-408f-8f7f-68754050e6f2\", \"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\": \"2709af6610f4327ba87945793cbdf60bb0764169e9371d8f36d67516c61b3f82\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4f8a1de4-eea9-4ba5-a5bd-2af9d207f186\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 4f8a1de4-eea9-4ba5-a5bd-2af9d207f186
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_\": \"4f8a1de4-eea9-4ba5-a5bd-2af9d207f186\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"66ad3e92-fd1b-4904-aadd-15fc78066604\", \"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\": \"f70326b6950d8271ee5ba14609142f99c0c9694a7ab4b2f95a89b96fd1e9b303\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"65855be7-e4a1-4050-bddf-66cb8f38b17b\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 65855be7-e4a1-4050-bddf-66cb8f38b17b
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_\": \"65855be7-e4a1-4050-bddf-66cb8f38b17b\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4f8a1de4-eea9-4ba5-a5bd-2af9d207f186\", \"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\": \"b041289c576ac7ca22abcebb5f3e144ad444dc42a562a3ada570c78ae66d68e0\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4c49aea9-5a0b-4bd4-9ec6-1b932c21032e\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 4c49aea9-5a0b-4bd4-9ec6-1b932c21032e
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_\": \"4c49aea9-5a0b-4bd4-9ec6-1b932c21032e\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"65855be7-e4a1-4050-bddf-66cb8f38b17b\", \"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\": \"eddc6a883b86e0624cb38eb08bdad1b9e4169b4079e4b29a8e7b4327a272cc44\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"08ab6804-9cee-4f46-ab33-7dec60011974\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 08ab6804-9cee-4f46-ab33-7dec60011974
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_\": \"08ab6804-9cee-4f46-ab33-7dec60011974\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4c49aea9-5a0b-4bd4-9ec6-1b932c21032e\", \"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\": \"fb4080a01123b88c8f1ea82f0723a8bf0c3e7ca206310ed09e46dbebb14ef019\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"743f6d64-5050-4806-9654-25aa35d0b773\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 743f6d64-5050-4806-9654-25aa35d0b773
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_\": \"743f6d64-5050-4806-9654-25aa35d0b773\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"08ab6804-9cee-4f46-ab33-7dec60011974\", \"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\": \"7330aaebab4cf88796aac7eb0e1f6b4ff81b5b69a76130ba934c2651feb82fa1\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"3ab1a439-da04-402c-8243-e0dab12c3c4c\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 3ab1a439-da04-402c-8243-e0dab12c3c4c
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_\": \"3ab1a439-da04-402c-8243-e0dab12c3c4c\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"743f6d64-5050-4806-9654-25aa35d0b773\", \"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\": \"1fa62a088fe696d7e296d2d19e90a299f1348e10b4d037735529fd455ff75dee\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"2a0a45d3-2f45-4ca6-9de0-cacfcdb55962\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 2a0a45d3-2f45-4ca6-9de0-cacfcdb55962
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_\": \"2a0a45d3-2f45-4ca6-9de0-cacfcdb55962\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"3ab1a439-da04-402c-8243-e0dab12c3c4c\", \"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\": \"00f9c6224d7846a9bf4277b5292d845d3e8bf209cfcede926f71ed38971a66bf\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"588e3d5b-9e0a-42f6-ae15-dd732059febf\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 588e3d5b-9e0a-42f6-ae15-dd732059febf
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_\": \"588e3d5b-9e0a-42f6-ae15-dd732059febf\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"2a0a45d3-2f45-4ca6-9de0-cacfcdb55962\", \"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\": \"51bd54b78d4a131982ac697f265bd236305bb88e5b91de7a66f56344fa9b329b\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"90e02018-b933-4490-bf7b-245972cd193b\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 90e02018-b933-4490-bf7b-245972cd193b
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_\": \"90e02018-b933-4490-bf7b-245972cd193b\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"588e3d5b-9e0a-42f6-ae15-dd732059febf\", \"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\": \"501ac0af5cf3fca21abb78d37240ca73b7fa554a3c4bc9c24916ffa9d0ac1517\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"975d703b-6d2d-4f4b-a278-96fe97ac39b0\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 975d703b-6d2d-4f4b-a278-96fe97ac39b0
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_\": \"975d703b-6d2d-4f4b-a278-96fe97ac39b0\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"90e02018-b933-4490-bf7b-245972cd193b\", \"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\": \"3a20c154e8ad57e811641d5612ed46760fd3d8d6574a63703f01ea9b602d2504\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7648fdfd-33c0-40d8-9c99-b62e5bdc54b6\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 7648fdfd-33c0-40d8-9c99-b62e5bdc54b6
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_\": \"7648fdfd-33c0-40d8-9c99-b62e5bdc54b6\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"975d703b-6d2d-4f4b-a278-96fe97ac39b0\", \"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\": \"b8057e4b7be08dd4d3a10fda825995c8057e5a7b985ad09914254d2603703a6f\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"bb3976f3-795f-4430-a8c7-4efa73b9afd9\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: bb3976f3-795f-4430-a8c7-4efa73b9afd9
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_\": \"bb3976f3-795f-4430-a8c7-4efa73b9afd9\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7648fdfd-33c0-40d8-9c99-b62e5bdc54b6\", \"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\": \"8c41185656516c8572c43273bd9ba58c5a6fc69a38b8d9cfe00e20246fc8f605\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7e648d2f-3a85-430c-82ad-5e9d1a7ded16\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 7e648d2f-3a85-430c-82ad-5e9d1a7ded16
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_\": \"7e648d2f-3a85-430c-82ad-5e9d1a7ded16\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"bb3976f3-795f-4430-a8c7-4efa73b9afd9\", \"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\": \"e98b60f7f279f9020fd39670b53cf9eb83e7406177820b0c481d5bd0c79fb61b\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7bff103d-7df0-4355-806f-9d92315ce88f\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 7bff103d-7df0-4355-806f-9d92315ce88f
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_\": \"7bff103d-7df0-4355-806f-9d92315ce88f\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7e648d2f-3a85-430c-82ad-5e9d1a7ded16\", \"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\": \"80462b3ea1f80f69830fbd7333a1a3c9ef6ea5be5cf4fdb6d47ed859a17a7056\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"e998f655-948f-4a3a-aa5d-06baadc4d875\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: e998f655-948f-4a3a-aa5d-06baadc4d875
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_\": \"e998f655-948f-4a3a-aa5d-06baadc4d875\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7bff103d-7df0-4355-806f-9d92315ce88f\", \"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\": \"21567382f756c93dbda5bdec1d279ba718c7187198a5f96fb95d06648388ed38\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"759f3132-e099-44c5-a1bc-4cb0d5ed692e\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 759f3132-e099-44c5-a1bc-4cb0d5ed692e
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_\": \"759f3132-e099-44c5-a1bc-4cb0d5ed692e\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"e998f655-948f-4a3a-aa5d-06baadc4d875\", \"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\": \"062795fd9f6d5890342e622787bbf73e6bee9606d5007ee77cbfe8fe1a222766\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f04db181-3eca-4692-a79c-2f7738219ea0\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: f04db181-3eca-4692-a79c-2f7738219ea0
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_\": \"f04db181-3eca-4692-a79c-2f7738219ea0\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"759f3132-e099-44c5-a1bc-4cb0d5ed692e\", \"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\": \"1297e2001926f6db9812c77c5bc33a20d353d820b746be3c76ded3ae9075eadb\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f6b15b0e-12af-45b6-b06a-8b7504f647a3\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: f6b15b0e-12af-45b6-b06a-8b7504f647a3
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_\": \"f6b15b0e-12af-45b6-b06a-8b7504f647a3\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f04db181-3eca-4692-a79c-2f7738219ea0\", \"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\": \"2f15b4fa2755b3c7615507f503d185658e87b421786cef4883870a0279f83cc9\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"5a30c666-46e0-4783-9245-192971f1cde1\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 5a30c666-46e0-4783-9245-192971f1cde1
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_\": \"5a30c666-46e0-4783-9245-192971f1cde1\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f6b15b0e-12af-45b6-b06a-8b7504f647a3\", \"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\": \"3105369373818b7df24251ccb34cd061c32fc3fa6720907cb11ace484f2c67a1\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"d311ca04-9f62-4b79-b3f9-e70efbab007b\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: d311ca04-9f62-4b79-b3f9-e70efbab007b
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_\": \"d311ca04-9f62-4b79-b3f9-e70efbab007b\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"5a30c666-46e0-4783-9245-192971f1cde1\", \"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\": \"cf64f60e27f38f2979a353d029153f5c7d994c23549bae796a8bc1a2d97edb5b\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"654a7a2c-a673-4305-b431-d2b64213b9e6\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 654a7a2c-a673-4305-b431-d2b64213b9e6
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_\": \"654a7a2c-a673-4305-b431-d2b64213b9e6\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"d311ca04-9f62-4b79-b3f9-e70efbab007b\", \"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\": \"07b412493e505cc2ed60527a4dc44afe9f8f632e86588d9b4baed0ee9a746258\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"a30a7344-0b3c-4ea7-828e-7999ea0480ff\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: a30a7344-0b3c-4ea7-828e-7999ea0480ff
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_\": \"a30a7344-0b3c-4ea7-828e-7999ea0480ff\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"654a7a2c-a673-4305-b431-d2b64213b9e6\", \"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\": \"0702989d9cf90f50b8800df153193d2ef80fee951b87f6ab3db6f5d76961d4b2\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"12351208-b28e-4ac7-b332-ef0b64533741\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 12351208-b28e-4ac7-b332-ef0b64533741
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_\": \"12351208-b28e-4ac7-b332-ef0b64533741\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"a30a7344-0b3c-4ea7-828e-7999ea0480ff\", \"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\": \"67c39b29a6a1abcbdf0ccad449885463b12648b0098cbd290ad575a64c98185e\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"142b9225-fb7e-455b-8511-24f53ac59b7e\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 142b9225-fb7e-455b-8511-24f53ac59b7e
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_\": \"142b9225-fb7e-455b-8511-24f53ac59b7e\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"12351208-b28e-4ac7-b332-ef0b64533741\", \"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\": \"4032a72794f271f77434e5a2493cf41f969c40c36ee9a150c199b2aac47760a2\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"fe58b4d0-cd36-45ff-be66-850bf7bb24fb\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: fe58b4d0-cd36-45ff-be66-850bf7bb24fb
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_\": \"fe58b4d0-cd36-45ff-be66-850bf7bb24fb\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"142b9225-fb7e-455b-8511-24f53ac59b7e\", \"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\": \"d5f1c134bbf66837895600107d00643e9163fa0f784ef1f537beda53c2425d4f\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"2a2ab504-464e-4f9d-95a1-bde4dd212db9\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 2a2ab504-464e-4f9d-95a1-bde4dd212db9
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_\": \"2a2ab504-464e-4f9d-95a1-bde4dd212db9\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"fe58b4d0-cd36-45ff-be66-850bf7bb24fb\", \"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\": \"035a3ad415f45b998b3f5560eab8eac6560c06f62d3d5479735f3b1dc21abd96\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"1c6288a9-1e50-4e42-a20a-6b4d8e5c9560\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 1c6288a9-1e50-4e42-a20a-6b4d8e5c9560
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_\": \"1c6288a9-1e50-4e42-a20a-6b4d8e5c9560\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"2a2ab504-464e-4f9d-95a1-bde4dd212db9\", \"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\": \"94051f70345f186a997cf74e64145f8940fabb6231674735409c612df5799cf5\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"35763c02-b468-4b3e-9d56-c7b0fb7ddd40\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 35763c02-b468-4b3e-9d56-c7b0fb7ddd40
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_\": \"35763c02-b468-4b3e-9d56-c7b0fb7ddd40\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"1c6288a9-1e50-4e42-a20a-6b4d8e5c9560\", \"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\": \"0fdfe21097dba3d474e21bbaa2cd26524f4ea008096223f5dacb08a5477495fe\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4a92c58a-169f-4ea9-9a90-81399c82e552\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 4a92c58a-169f-4ea9-9a90-81399c82e552
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_\": \"4a92c58a-169f-4ea9-9a90-81399c82e552\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"35763c02-b468-4b3e-9d56-c7b0fb7ddd40\", \"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\": \"b482a0ca564cf2a04449b7a0fdc74f9a99cadd04578c3be4d2bf4edd05615dc1\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"3f6b0aa3-f124-4e5f-8bf3-cca3b09efc7b\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 3f6b0aa3-f124-4e5f-8bf3-cca3b09efc7b
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_\": \"3f6b0aa3-f124-4e5f-8bf3-cca3b09efc7b\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4a92c58a-169f-4ea9-9a90-81399c82e552\", \"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\": \"b2f8234ee0eb319024915a56afaababb95f78e1e781a7c1c975661e50b939a87\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"aa2c2533-38f9-424f-83c4-7bd41d735d9f\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: aa2c2533-38f9-424f-83c4-7bd41d735d9f
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_\": \"aa2c2533-38f9-424f-83c4-7bd41d735d9f\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"3f6b0aa3-f124-4e5f-8bf3-cca3b09efc7b\", \"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\": \"3beb31456f7f10f34953065271e5d635c4cb3f73cb3975213378802b3a0ccd90\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"55c12b71-14a1-4230-afb5-f4253ad3ba1a\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 55c12b71-14a1-4230-afb5-f4253ad3ba1a
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_\": \"55c12b71-14a1-4230-afb5-f4253ad3ba1a\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"aa2c2533-38f9-424f-83c4-7bd41d735d9f\", \"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\": \"e87c99a1f490fcf5ae721292305633cdd7c7a860d4ce048e07da25b97b1d5b5e\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f0a88234-53c2-4849-9553-32f78d0375f7\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: f0a88234-53c2-4849-9553-32f78d0375f7
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_\": \"f0a88234-53c2-4849-9553-32f78d0375f7\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"55c12b71-14a1-4230-afb5-f4253ad3ba1a\", \"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\": \"949225cd7d8f60234dff3742738554d8a2ab0f6025307cfecad70213b108415e\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b8d80c9e-8efd-47ac-8509-0c445b16b267\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: b8d80c9e-8efd-47ac-8509-0c445b16b267
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_\": \"b8d80c9e-8efd-47ac-8509-0c445b16b267\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f0a88234-53c2-4849-9553-32f78d0375f7\", \"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\": \"d91818355339fa63fc5a81c9d06c6ce5d990b9ed469bc0b83403befaa4687e55\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f18182f0-ad4b-43da-9658-05b021f514ae\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: f18182f0-ad4b-43da-9658-05b021f514ae
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_\": \"f18182f0-ad4b-43da-9658-05b021f514ae\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"b8d80c9e-8efd-47ac-8509-0c445b16b267\", \"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\": \"97f5af8ec4534df0cb17831b021f294d3dc2c983f6e9490432201c53b44b595c\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7f1e140b-3289-424a-bef7-630810626a92\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 7f1e140b-3289-424a-bef7-630810626a92
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_\": \"7f1e140b-3289-424a-bef7-630810626a92\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f18182f0-ad4b-43da-9658-05b021f514ae\", \"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\": \"ba92c8e76ae0b4a4ea453013dad79f1e5ccf48464aaeb7f6f24b079e36c2edfc\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7b7a8129-ebd5-4bec-bb80-e381ec21c8c6\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 7b7a8129-ebd5-4bec-bb80-e381ec21c8c6
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_\": \"7b7a8129-ebd5-4bec-bb80-e381ec21c8c6\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7f1e140b-3289-424a-bef7-630810626a92\", \"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\": \"a75ef8b8b79344029fe265371bfc95be904837d86a62382a4c4a493f0e49b0f8\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"03bc1cd2-df24-496f-800d-071007b7e37e\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 03bc1cd2-df24-496f-800d-071007b7e37e
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_\": \"03bc1cd2-df24-496f-800d-071007b7e37e\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7b7a8129-ebd5-4bec-bb80-e381ec21c8c6\", \"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\": \"296342d307877065c1d0a0bc774f5b47b07b211eadc24e6eae4934ab267a9d74\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"ad51bb71-b2f2-4d95-99a3-0cc86175fddf\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: ad51bb71-b2f2-4d95-99a3-0cc86175fddf
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_\": \"ad51bb71-b2f2-4d95-99a3-0cc86175fddf\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"03bc1cd2-df24-496f-800d-071007b7e37e\", \"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\": \"fc245240bace8b990ae72da5752ba473236ee002b68dfca0df2cfe8a71f996d2\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"d56038f2-d9ef-4d2a-8d9b-5592570bfdb7\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: d56038f2-d9ef-4d2a-8d9b-5592570bfdb7
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_\": \"d56038f2-d9ef-4d2a-8d9b-5592570bfdb7\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ad51bb71-b2f2-4d95-99a3-0cc86175fddf\", \"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\": \"93d5cb410c05fc2ed5bbe4c1034d4d9050018eb29ae396541c424473525b1ae9\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4e27aa4b-6ea4-4b23-80cf-103287c62b72\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 4e27aa4b-6ea4-4b23-80cf-103287c62b72
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_\": \"4e27aa4b-6ea4-4b23-80cf-103287c62b72\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"d56038f2-d9ef-4d2a-8d9b-5592570bfdb7\", \"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\": \"55b99f8cfb47e7113dbb3b921843a9eaed7b57409317724ce57c2a8924a1680f\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b7892a84-a4de-4d5a-aba6-63bccf87757b\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: b7892a84-a4de-4d5a-aba6-63bccf87757b
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_\": \"b7892a84-a4de-4d5a-aba6-63bccf87757b\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4e27aa4b-6ea4-4b23-80cf-103287c62b72\", \"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\": \"a5a4c722182aaf4660913def8bbd075a81a17a306e4daed96b7f5dfb044a95a4\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"5c6ceb26-62f5-4e03-9447-4f6701acefec\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 5c6ceb26-62f5-4e03-9447-4f6701acefec
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_\": \"5c6ceb26-62f5-4e03-9447-4f6701acefec\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"b7892a84-a4de-4d5a-aba6-63bccf87757b\", \"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\": \"0ea2002f199cee741a2160c2dfc7dcc0b89d55be03bfcf7b5f0b1df878e6f9dc\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"939598f8-feca-466a-80b3-7cb6e64e0163\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 939598f8-feca-466a-80b3-7cb6e64e0163
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_\": \"939598f8-feca-466a-80b3-7cb6e64e0163\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"5c6ceb26-62f5-4e03-9447-4f6701acefec\", \"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\": \"8f0b117d2221a29653165fa936d90d29774b025844fc2bd9a8717b91d56acdf5\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"068b65bc-6955-4dba-bbaa-469a049b9a6f\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 068b65bc-6955-4dba-bbaa-469a049b9a6f
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_\": \"068b65bc-6955-4dba-bbaa-469a049b9a6f\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"939598f8-feca-466a-80b3-7cb6e64e0163\", \"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\": \"6b1ffb30edf83ac643757dc2ceb50b0751a2b97a7dd99b611583beb4062ad009\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"d32c96d8-283e-4d8f-b8a4-a9feba51ce68\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: d32c96d8-283e-4d8f-b8a4-a9feba51ce68
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_\": \"d32c96d8-283e-4d8f-b8a4-a9feba51ce68\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"068b65bc-6955-4dba-bbaa-469a049b9a6f\", \"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\": \"450c62be3d3ea611c68c3bc9e72b08c14aebc5db4dac1ab9ae163892b7f493b3\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7fe4cd83-879a-4187-b9ed-089dea947619\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 7fe4cd83-879a-4187-b9ed-089dea947619
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_\": \"7fe4cd83-879a-4187-b9ed-089dea947619\", \"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\": \"99e2a7ce-e4b6-45ef-b28e-50b87a57779c\", \"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\": \"660de8d98c1ff3119943c9886daca4850fedcc37b81b494ed3a3eb27f7f4ba48\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"d32c96d8-283e-4d8f-b8a4-a9feba51ce68\", \"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\": \"a2a55263a23e56ebe31101c92c5c0fa719aa954c8ef69c895984daa7109f3343\", \"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": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "ref_doc_id": "99e2a7ce-e4b6-45ef-b28e-50b87a57779c", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 00297e7b-e521-4d1b-9bda-1957d0adfd21
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_\": \"00297e7b-e521-4d1b-9bda-1957d0adfd21\", \"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\": \"17b1b5b7-ad6d-45ef-9291-5c677bf8a092\", \"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\": \"d9cedaceedb772db16d4de6d0966b9609ad9ea13fe095ad66a98dd8adaf2a5e3\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"00f6869e-60ff-4e5b-871f-4f470a7e0a6f\", \"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": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "ref_doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 00f6869e-60ff-4e5b-871f-4f470a7e0a6f
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_\": \"00f6869e-60ff-4e5b-871f-4f470a7e0a6f\", \"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\": \"17b1b5b7-ad6d-45ef-9291-5c677bf8a092\", \"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\": \"d9cedaceedb772db16d4de6d0966b9609ad9ea13fe095ad66a98dd8adaf2a5e3\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"00297e7b-e521-4d1b-9bda-1957d0adfd21\", \"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\": \"cec18714b97655f44bf6736f1713f19680063e68d7e64943039e02e426e9fcd8\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"9c452a4b-a10d-4fcb-b6f1-4872160b7ace\", \"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": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "ref_doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 9c452a4b-a10d-4fcb-b6f1-4872160b7ace
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_\": \"9c452a4b-a10d-4fcb-b6f1-4872160b7ace\", \"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\": \"17b1b5b7-ad6d-45ef-9291-5c677bf8a092\", \"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\": \"d9cedaceedb772db16d4de6d0966b9609ad9ea13fe095ad66a98dd8adaf2a5e3\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"00f6869e-60ff-4e5b-871f-4f470a7e0a6f\", \"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\": \"49a26104442c442d2bd784ab9f8f453f51207fffe18da3296154f05cfdfb5b4f\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f01a2503-b9d1-40f1-8683-2135ba253532\", \"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": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "ref_doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: f01a2503-b9d1-40f1-8683-2135ba253532
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_\": \"f01a2503-b9d1-40f1-8683-2135ba253532\", \"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\": \"17b1b5b7-ad6d-45ef-9291-5c677bf8a092\", \"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\": \"d9cedaceedb772db16d4de6d0966b9609ad9ea13fe095ad66a98dd8adaf2a5e3\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"9c452a4b-a10d-4fcb-b6f1-4872160b7ace\", \"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\": \"fe18844165a6711207d221059f3ad1b162dbe20330001be6ac073093146d8f3b\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4411bb46-a01d-4411-8958-7605ca2edb1a\", \"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": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "ref_doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 4411bb46-a01d-4411-8958-7605ca2edb1a
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_\": \"4411bb46-a01d-4411-8958-7605ca2edb1a\", \"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\": \"17b1b5b7-ad6d-45ef-9291-5c677bf8a092\", \"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\": \"d9cedaceedb772db16d4de6d0966b9609ad9ea13fe095ad66a98dd8adaf2a5e3\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f01a2503-b9d1-40f1-8683-2135ba253532\", \"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\": \"c934b44bd90c7b0f4763b7d83d85baab3961ce71aeecddd7de0a4d08604161bc\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"062d4c9c-61fe-46dd-9a8e-2c7af4618d6e\", \"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": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "ref_doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: 062d4c9c-61fe-46dd-9a8e-2c7af4618d6e
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_\": \"062d4c9c-61fe-46dd-9a8e-2c7af4618d6e\", \"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\": \"17b1b5b7-ad6d-45ef-9291-5c677bf8a092\", \"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\": \"d9cedaceedb772db16d4de6d0966b9609ad9ea13fe095ad66a98dd8adaf2a5e3\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4411bb46-a01d-4411-8958-7605ca2edb1a\", \"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\": \"652122d15b7bf53689ce290c7549024a17dd2bcf8c9aa66874aab92ba1e3b606\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b74e8ffc-3e08-4c4e-8a7b-b2485c568ec4\", \"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": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "ref_doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "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 17:45:51
topic: persistent://default/default/308e7593-7e45-4080-bc68-ad4f88ce5b4b
id: b74e8ffc-3e08-4c4e-8a7b-b2485c568ec4
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_\": \"b74e8ffc-3e08-4c4e-8a7b-b2485c568ec4\", \"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\": \"17b1b5b7-ad6d-45ef-9291-5c677bf8a092\", \"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\": \"d9cedaceedb772db16d4de6d0966b9609ad9ea13fe095ad66a98dd8adaf2a5e3\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"062d4c9c-61fe-46dd-9a8e-2c7af4618d6e\", \"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\": \"c1f5fae0f60c235c4fdc99cfd7a95f74a5b918480c7c4f5a938ca69b416804e4\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"0fa8fc55-bdcf-4000-af95-5567bf238769\", \"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": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "ref_doc_id": "17b1b5b7-ad6d-45ef-9291-5c677bf8a092", "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"}


