# embeddings_queue

created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 65e465c1-efb0-4c2f-b781-3ae4430da7bc
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"65e465c1-efb0-4c2f-b781-3ae4430da7bc\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"5c192ac5-99b1-4205-9423-1a8ebd204be8\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"f6e7091e81b5a59b20c9696c764977af760dd2c306fb9e22bb8a57b7fc8fc86c\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 0, \"end_char_idx\": 2917, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "# Assistants API Overview (Python SDK)\n\nThe new [Assistants API](https://platform.openai.com/docs/assistants/overview) is a stateful evolution of our [Chat Completions API](https://platform.openai.com/docs/guides/text-generation/chat-completions-api) meant to simplify the creation of assistant-like experiences, and enable developer access to powerful tools like Code Interpreter and Retrieval.\n\n![Assistants API Diagram](../images/assistants_overview_diagram.png)\n\n## Chat Completions API vs Assistants API\n\nThe primitives of the **Chat Completions API** are `Messages`, on which you perform a `Completion` with a `Model` (`gpt-3.5-turbo`, `gpt-4`, etc). It is lightweight and powerful, but inherently stateless, which means you have to manage conversation state, tool definitions, retrieval documents, and code execution manually.\n\nThe primitives of the **Assistants API** are\n\n- `Assistants`, which encapsulate a base model, instructions, tools, and (context) documents,\n- `Threads`, which represent the state of a conversation, and\n- `Runs`, which power the execution of an `Assistant` on a `Thread`, including textual responses and multi-step tool use.\n\nWe'll take a look at how these can be used to create powerful, stateful experiences.\n\n\n## Setup\n\n### Python SDK\n\n> **Note**\n> We've updated our [Python SDK](https://github.com/openai/openai-python) to add support for the Assistants API, so you'll need to update it to the latest version (`1.2.3` at time of writing).\n\n\n\n```python\n!pip install --upgrade openai\n```\n\nAnd make sure it's up to date by running:\n\n\n\n```python\n!pip show openai | grep Version\n```\n\n    Version: 1.2.3\n\n\n### Pretty Printing Helper\n\n\n\n```python\nimport json\n\ndef show_json(obj):\n    display(json.loads(obj.model_dump_json()))\n```\n\n## Complete Example with Assistants API\n\n\n### Assistants\n\n\nThe easiest way to get started with the Assistants API is through the [Assistants Playground](https://platform.openai.com/playground).\n\n\n![Assistants Playground](../images/assistants_overview_assistants_playground.png)\n\n\nLet's begin by creating an assistant! We'll create a Math Tutor just like in our [docs](https://platform.openai.com/docs/assistants/overview).\n\n\n![Creating New Assistant](../images/assistants_overview_new_assistant.png)\n\n\nYou can view Assistants you've created in the [Assistants Dashboard](https://platform.openai.com/assistants).\n\n\n![Assistants Dashboard](../images/assistants_overview_assistants_dashboard.png)\n\n\nYou can also create Assistants directly through the Assistants API, like so:\n\n\n\n```python\nfrom openai import OpenAI\nimport os\n\nclient = OpenAI(api_key=os.environ.get(\"OPENAI_API_KEY\", \"<your OpenAI API key if not set as env var>\"))\n\n\nassistant = client.beta.assistants.create(\n    name=\"Math Tutor\",\n    instructions=\"You are a personal math tutor. Answer questions briefly, in a sentence or less.\",\n    model=\"gpt-4-1106-preview\",\n)\nshow_json(assistant)\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 5c192ac5-99b1-4205-9423-1a8ebd204be8
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"5c192ac5-99b1-4205-9423-1a8ebd204be8\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"65e465c1-efb0-4c2f-b781-3ae4430da7bc\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"79bc04079513f5cb47b87ea7fa72ab3cef954057fa4cff4a6dc0964a513be4dc\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"bc8fe423-47a6-45b3-96ee-423ffbfb5b05\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"2e7ad6749b0ddfa89326afbd53e65833a2dcf1359479427e4b756a7456881300\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 1480, \"end_char_idx\": 4128, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "```python\n!pip install --upgrade openai\n```\n\nAnd make sure it's up to date by running:\n\n\n\n```python\n!pip show openai | grep Version\n```\n\n    Version: 1.2.3\n\n\n### Pretty Printing Helper\n\n\n\n```python\nimport json\n\ndef show_json(obj):\n    display(json.loads(obj.model_dump_json()))\n```\n\n## Complete Example with Assistants API\n\n\n### Assistants\n\n\nThe easiest way to get started with the Assistants API is through the [Assistants Playground](https://platform.openai.com/playground).\n\n\n![Assistants Playground](../images/assistants_overview_assistants_playground.png)\n\n\nLet's begin by creating an assistant! We'll create a Math Tutor just like in our [docs](https://platform.openai.com/docs/assistants/overview).\n\n\n![Creating New Assistant](../images/assistants_overview_new_assistant.png)\n\n\nYou can view Assistants you've created in the [Assistants Dashboard](https://platform.openai.com/assistants).\n\n\n![Assistants Dashboard](../images/assistants_overview_assistants_dashboard.png)\n\n\nYou can also create Assistants directly through the Assistants API, like so:\n\n\n\n```python\nfrom openai import OpenAI\nimport os\n\nclient = OpenAI(api_key=os.environ.get(\"OPENAI_API_KEY\", \"<your OpenAI API key if not set as env var>\"))\n\n\nassistant = client.beta.assistants.create(\n    name=\"Math Tutor\",\n    instructions=\"You are a personal math tutor. Answer questions briefly, in a sentence or less.\",\n    model=\"gpt-4-1106-preview\",\n)\nshow_json(assistant)\n```\n\n\n    {'id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n     'created_at': 1699828331,\n     'description': None,\n     'file_ids': [],\n     'instructions': 'You are a personal math tutor. Answer questions briefly, in a sentence or less.',\n     'metadata': {},\n     'model': 'gpt-4-1106-preview',\n     'name': 'Math Tutor',\n     'object': 'assistant',\n     'tools': []}\n\n\nRegardless of whether you create your Assistant through the Dashboard or with the API, you'll want to keep track of the Assistant ID. This is how you'll refer to your Assistant throughout Threads and Runs.\n\n\nNext, we'll create a new Thread and add a Message to it. This will hold the state of our conversation, so we don't have re-send the entire message history each time.\n\n\n### Threads\n\n\nCreate a new thread:\n\n\n\n```python\nthread = client.beta.threads.create()\nshow_json(thread)\n```\n\n\n    {'id': 'thread_bw42vPoQtYBMQE84WubNcJXG',\n     'created_at': 1699828331,\n     'metadata': {},\n     'object': 'thread'}\n\n\nThen add the Message to the thread:\n\n\n\n```python\nmessage = client.beta.threads.messages.create(\n    thread_id=thread.id,\n    role=\"user\",\n    content=\"I need to solve the equation `3x + 11 = 14`. Can you help me?\",\n)\nshow_json(message)\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: bc8fe423-47a6-45b3-96ee-423ffbfb5b05
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"bc8fe423-47a6-45b3-96ee-423ffbfb5b05\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"5c192ac5-99b1-4205-9423-1a8ebd204be8\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2d7d295f598543ee639ad5a2cec689dba8bac2134d3838ecf8729ea691390ded\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"a78af501-792f-4234-941f-048a0b0d713b\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"9e58a03dd29c0ffaba2cd1091e32a500edcf38e807728e79c5de02cd4915e3ed\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 2693, \"end_char_idx\": 5688, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "assistant = client.beta.assistants.create(\n    name=\"Math Tutor\",\n    instructions=\"You are a personal math tutor. Answer questions briefly, in a sentence or less.\",\n    model=\"gpt-4-1106-preview\",\n)\nshow_json(assistant)\n```\n\n\n    {'id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n     'created_at': 1699828331,\n     'description': None,\n     'file_ids': [],\n     'instructions': 'You are a personal math tutor. Answer questions briefly, in a sentence or less.',\n     'metadata': {},\n     'model': 'gpt-4-1106-preview',\n     'name': 'Math Tutor',\n     'object': 'assistant',\n     'tools': []}\n\n\nRegardless of whether you create your Assistant through the Dashboard or with the API, you'll want to keep track of the Assistant ID. This is how you'll refer to your Assistant throughout Threads and Runs.\n\n\nNext, we'll create a new Thread and add a Message to it. This will hold the state of our conversation, so we don't have re-send the entire message history each time.\n\n\n### Threads\n\n\nCreate a new thread:\n\n\n\n```python\nthread = client.beta.threads.create()\nshow_json(thread)\n```\n\n\n    {'id': 'thread_bw42vPoQtYBMQE84WubNcJXG',\n     'created_at': 1699828331,\n     'metadata': {},\n     'object': 'thread'}\n\n\nThen add the Message to the thread:\n\n\n\n```python\nmessage = client.beta.threads.messages.create(\n    thread_id=thread.id,\n    role=\"user\",\n    content=\"I need to solve the equation `3x + 11 = 14`. Can you help me?\",\n)\nshow_json(message)\n```\n\n\n    {'id': 'msg_IBiZDAWHhWPewxzN0EfTYNew',\n     'assistant_id': None,\n     'content': [{'text': {'annotations': [],\n        'value': 'I need to solve the equation `3x + 11 = 14`. Can you help me?'},\n       'type': 'text'}],\n     'created_at': 1699828332,\n     'file_ids': [],\n     'metadata': {},\n     'object': 'thread.message',\n     'role': 'user',\n     'run_id': None,\n     'thread_id': 'thread_bw42vPoQtYBMQE84WubNcJXG'}\n\n\n> **Note**\n> Even though you're no longer sending the entire history each time, you will still be charged for the tokens of the entire conversation history with each Run.\n\n\n### Runs\n\nNotice how the Thread we created is **not** associated with the Assistant we created earlier! Threads exist independently from Assistants, which may be different from what you'd expect if you've used ChatGPT (where a thread is tied to a model/GPT).\n\nTo get a completion from an Assistant for a given Thread, we must create a Run. Creating a Run will indicate to an Assistant it should look at the messages in the Thread and take action: either by adding a single response, or using tools.\n\n> **Note**\n> Runs are a key difference between the Assistants API and Chat Completions API. While in Chat Completions the model will only ever respond with a single message, in the Assistants API a Run may result in an Assistant using one or multiple tools, and potentially adding multiple messages to the Thread.\n\nTo get our Assistant to respond to the user, let's create the Run. As mentioned earlier, you must specify _both_ the Assistant and the Thread."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: a78af501-792f-4234-941f-048a0b0d713b
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"a78af501-792f-4234-941f-048a0b0d713b\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"bc8fe423-47a6-45b3-96ee-423ffbfb5b05\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8687f084fbf35942240c244e87dd3e34c4d0e882589b01c9257a9efbb21ed39a\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"74c0bc07-3126-468b-b9a2-d509c6ab8c2c\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"f11504b0b00ebeb5f7a032d5c05d76c3acc2cb130151a595de24886a9b54f81a\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 4135, \"end_char_idx\": 6443, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "{'id': 'msg_IBiZDAWHhWPewxzN0EfTYNew',\n     'assistant_id': None,\n     'content': [{'text': {'annotations': [],\n        'value': 'I need to solve the equation `3x + 11 = 14`. Can you help me?'},\n       'type': 'text'}],\n     'created_at': 1699828332,\n     'file_ids': [],\n     'metadata': {},\n     'object': 'thread.message',\n     'role': 'user',\n     'run_id': None,\n     'thread_id': 'thread_bw42vPoQtYBMQE84WubNcJXG'}\n\n\n> **Note**\n> Even though you're no longer sending the entire history each time, you will still be charged for the tokens of the entire conversation history with each Run.\n\n\n### Runs\n\nNotice how the Thread we created is **not** associated with the Assistant we created earlier! Threads exist independently from Assistants, which may be different from what you'd expect if you've used ChatGPT (where a thread is tied to a model/GPT).\n\nTo get a completion from an Assistant for a given Thread, we must create a Run. Creating a Run will indicate to an Assistant it should look at the messages in the Thread and take action: either by adding a single response, or using tools.\n\n> **Note**\n> Runs are a key difference between the Assistants API and Chat Completions API. While in Chat Completions the model will only ever respond with a single message, in the Assistants API a Run may result in an Assistant using one or multiple tools, and potentially adding multiple messages to the Thread.\n\nTo get our Assistant to respond to the user, let's create the Run. As mentioned earlier, you must specify _both_ the Assistant and the Thread.\n\n\n\n```python\nrun = client.beta.threads.runs.create(\n    thread_id=thread.id,\n    assistant_id=assistant.id,\n)\nshow_json(run)\n```\n\n\n    {'id': 'run_LA08RjouV3RemQ78UZXuyzv6',\n     'assistant_id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n     'cancelled_at': None,\n     'completed_at': None,\n     'created_at': 1699828332,\n     'expires_at': 1699828932,\n     'failed_at': None,\n     'file_ids': [],\n     'instructions': 'You are a personal math tutor. Answer questions briefly, in a sentence or less.',\n     'last_error': None,\n     'metadata': {},\n     'model': 'gpt-4-1106-preview',\n     'object': 'thread.run',\n     'required_action': None,\n     'started_at': None,\n     'status': 'queued',\n     'thread_id': 'thread_bw42vPoQtYBMQE84WubNcJXG',\n     'tools': []}"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 74c0bc07-3126-468b-b9a2-d509c6ab8c2c
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"74c0bc07-3126-468b-b9a2-d509c6ab8c2c\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"a78af501-792f-4234-941f-048a0b0d713b\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"1e414d4c64666909100f0a9c177b179045ee45bf51e1dabd0c2500622234cd2d\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"15fefc87-b18c-4d78-86e5-de4b11bde268\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"833165d48d78f712073369f6807c4c944a14ff831e889f35dc4857a97ee4a1df\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 5692, \"end_char_idx\": 8421, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "```python\nrun = client.beta.threads.runs.create(\n    thread_id=thread.id,\n    assistant_id=assistant.id,\n)\nshow_json(run)\n```\n\n\n    {'id': 'run_LA08RjouV3RemQ78UZXuyzv6',\n     'assistant_id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n     'cancelled_at': None,\n     'completed_at': None,\n     'created_at': 1699828332,\n     'expires_at': 1699828932,\n     'failed_at': None,\n     'file_ids': [],\n     'instructions': 'You are a personal math tutor. Answer questions briefly, in a sentence or less.',\n     'last_error': None,\n     'metadata': {},\n     'model': 'gpt-4-1106-preview',\n     'object': 'thread.run',\n     'required_action': None,\n     'started_at': None,\n     'status': 'queued',\n     'thread_id': 'thread_bw42vPoQtYBMQE84WubNcJXG',\n     'tools': []}\n\n\nUnlike creating a completion in the Chat Completions API, **creating a Run is an asynchronous operation**. It will return immediately with the Run's metadata, which includes a `status` that will initially be set to `queued`. The `status` will be updated as the Assistant performs operations (like using tools and adding messages).\n\nTo know when the Assistant has completed processing, we can poll the Run in a loop. (Support for streaming is coming soon!) While here we are only checking for a `queued` or `in_progress` status, in practice a Run may undergo a [variety of status changes](https://platform.openai.com/docs/api-reference/runs/object#runs/object-status) which you can choose to surface to the user. (These are called Steps, and will be covered later.)\n\n\n\n```python\nimport time\n\ndef wait_on_run(run, thread):\n    while run.status == \"queued\" or run.status == \"in_progress\":\n        run = client.beta.threads.runs.retrieve(\n            thread_id=thread.id,\n            run_id=run.id,\n        )\n        time.sleep(0.5)\n    return run\n```\n\n\n```python\nrun = wait_on_run(run, thread)\nshow_json(run)\n```\n\n\n    {'id': 'run_LA08RjouV3RemQ78UZXuyzv6',\n     'assistant_id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n     'cancelled_at': None,\n     'completed_at': 1699828333,\n     'created_at': 1699828332,\n     'expires_at': None,\n     'failed_at': None,\n     'file_ids': [],\n     'instructions': 'You are a personal math tutor. Answer questions briefly, in a sentence or less.',\n     'last_error': None,\n     'metadata': {},\n     'model': 'gpt-4-1106-preview',\n     'object': 'thread.run',\n     'required_action': None,\n     'started_at': 1699828332,\n     'status': 'completed',\n     'thread_id': 'thread_bw42vPoQtYBMQE84WubNcJXG',\n     'tools': []}\n\n\n### Messages\n\n\nNow that the Run has completed, we can list the Messages in the Thread to see what got added by the Assistant.\n\n\n\n```python\nmessages = client.beta.threads.messages.list(thread_id=thread.id)\nshow_json(messages)\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 15fefc87-b18c-4d78-86e5-de4b11bde268
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"15fefc87-b18c-4d78-86e5-de4b11bde268\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"74c0bc07-3126-468b-b9a2-d509c6ab8c2c\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"350c8c6e4cb3f66f04ace069045510fa8839ad7a4318554d3e941c7aef0fa4af\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"273d8c78-2a32-49b7-b4f5-402fe1f2c303\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"8af1f3a49a34301bc738ffce998ecef902e4944b80d66c40cadc6169f09cc287\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 7214, \"end_char_idx\": 9556, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "```python\nimport time\n\ndef wait_on_run(run, thread):\n    while run.status == \"queued\" or run.status == \"in_progress\":\n        run = client.beta.threads.runs.retrieve(\n            thread_id=thread.id,\n            run_id=run.id,\n        )\n        time.sleep(0.5)\n    return run\n```\n\n\n```python\nrun = wait_on_run(run, thread)\nshow_json(run)\n```\n\n\n    {'id': 'run_LA08RjouV3RemQ78UZXuyzv6',\n     'assistant_id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n     'cancelled_at': None,\n     'completed_at': 1699828333,\n     'created_at': 1699828332,\n     'expires_at': None,\n     'failed_at': None,\n     'file_ids': [],\n     'instructions': 'You are a personal math tutor. Answer questions briefly, in a sentence or less.',\n     'last_error': None,\n     'metadata': {},\n     'model': 'gpt-4-1106-preview',\n     'object': 'thread.run',\n     'required_action': None,\n     'started_at': 1699828332,\n     'status': 'completed',\n     'thread_id': 'thread_bw42vPoQtYBMQE84WubNcJXG',\n     'tools': []}\n\n\n### Messages\n\n\nNow that the Run has completed, we can list the Messages in the Thread to see what got added by the Assistant.\n\n\n\n```python\nmessages = client.beta.threads.messages.list(thread_id=thread.id)\nshow_json(messages)\n```\n\n\n    {'data': [{'id': 'msg_S0ZtKIWjyWtbIW9JNUocPdUS',\n       'assistant_id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n       'content': [{'text': {'annotations': [],\n          'value': 'Yes. Subtract 11 from both sides to get `3x = 3`, then divide by 3 to find `x = 1`.'},\n         'type': 'text'}],\n       'created_at': 1699828333,\n       'file_ids': [],\n       'metadata': {},\n       'object': 'thread.message',\n       'role': 'assistant',\n       'run_id': 'run_LA08RjouV3RemQ78UZXuyzv6',\n       'thread_id': 'thread_bw42vPoQtYBMQE84WubNcJXG'},\n      {'id': 'msg_IBiZDAWHhWPewxzN0EfTYNew',\n       'assistant_id': None,\n       'content': [{'text': {'annotations': [],\n          'value': 'I need to solve the equation `3x + 11 = 14`. Can you help me?'},\n         'type': 'text'}],\n       'created_at': 1699828332,\n       'file_ids': [],\n       'metadata': {},\n       'object': 'thread.message',\n       'role': 'user',\n       'run_id': None,\n       'thread_id': 'thread_bw42vPoQtYBMQE84WubNcJXG'}],\n     'object': 'list',\n     'first_id': 'msg_S0ZtKIWjyWtbIW9JNUocPdUS',\n     'last_id': 'msg_IBiZDAWHhWPewxzN0EfTYNew',\n     'has_more': False}"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 273d8c78-2a32-49b7-b4f5-402fe1f2c303
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"273d8c78-2a32-49b7-b4f5-402fe1f2c303\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"15fefc87-b18c-4d78-86e5-de4b11bde268\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"efc56df99a91e2ea88f1b6d41579e83a7ce8cbfc3fd8fd9d255f0137f4a076fd\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"356fb06d-4217-4ad6-8275-30ae62ed05c2\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"158e8b1347dc08c8e963b05e2e2b68a609bab9ccab5965026eb40f09db5f1209\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 8428, \"end_char_idx\": 10437, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "{'data': [{'id': 'msg_S0ZtKIWjyWtbIW9JNUocPdUS',\n       'assistant_id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n       'content': [{'text': {'annotations': [],\n          'value': 'Yes. Subtract 11 from both sides to get `3x = 3`, then divide by 3 to find `x = 1`.'},\n         'type': 'text'}],\n       'created_at': 1699828333,\n       'file_ids': [],\n       'metadata': {},\n       'object': 'thread.message',\n       'role': 'assistant',\n       'run_id': 'run_LA08RjouV3RemQ78UZXuyzv6',\n       'thread_id': 'thread_bw42vPoQtYBMQE84WubNcJXG'},\n      {'id': 'msg_IBiZDAWHhWPewxzN0EfTYNew',\n       'assistant_id': None,\n       'content': [{'text': {'annotations': [],\n          'value': 'I need to solve the equation `3x + 11 = 14`. Can you help me?'},\n         'type': 'text'}],\n       'created_at': 1699828332,\n       'file_ids': [],\n       'metadata': {},\n       'object': 'thread.message',\n       'role': 'user',\n       'run_id': None,\n       'thread_id': 'thread_bw42vPoQtYBMQE84WubNcJXG'}],\n     'object': 'list',\n     'first_id': 'msg_S0ZtKIWjyWtbIW9JNUocPdUS',\n     'last_id': 'msg_IBiZDAWHhWPewxzN0EfTYNew',\n     'has_more': False}\n\n\nAs you can see, Messages are ordered in reverse-chronological order \u2013 this was done so the most recent results are always on the first `page` (since results can be paginated). Do keep a look out for this, since this is the opposite order to messages in the Chat Completions API.\n\n\nLet's ask our Assistant to explain the result a bit further!\n\n\n\n```python\n# Create a message to append to our thread\nmessage = client.beta.threads.messages.create(\n    thread_id=thread.id, role=\"user\", content=\"Could you explain this to me?\"\n)\n\n# Execute our run\nrun = client.beta.threads.runs.create(\n    thread_id=thread.id,\n    assistant_id=assistant.id,\n)\n\n# Wait for completion\nwait_on_run(run, thread)\n\n# Retrieve all the messages added after our last user message\nmessages = client.beta.threads.messages.list(\n    thread_id=thread.id, order=\"asc\", after=message.id\n)\nshow_json(messages)\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 356fb06d-4217-4ad6-8275-30ae62ed05c2
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"356fb06d-4217-4ad6-8275-30ae62ed05c2\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"273d8c78-2a32-49b7-b4f5-402fe1f2c303\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8c0f129d8773aa47760c59fa0a9325cb38fa12b847fc04e2dbd7ab5ac7f5e51b\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f8a836dd-e7d0-4e9a-b133-0a769b487328\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"9262b7845c2df47a716738c1be0d3055dff60a29d2ea3f5a2ca64c3b141e7cad\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 9559, \"end_char_idx\": 11916, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "As you can see, Messages are ordered in reverse-chronological order \u2013 this was done so the most recent results are always on the first `page` (since results can be paginated). Do keep a look out for this, since this is the opposite order to messages in the Chat Completions API.\n\n\nLet's ask our Assistant to explain the result a bit further!\n\n\n\n```python\n# Create a message to append to our thread\nmessage = client.beta.threads.messages.create(\n    thread_id=thread.id, role=\"user\", content=\"Could you explain this to me?\"\n)\n\n# Execute our run\nrun = client.beta.threads.runs.create(\n    thread_id=thread.id,\n    assistant_id=assistant.id,\n)\n\n# Wait for completion\nwait_on_run(run, thread)\n\n# Retrieve all the messages added after our last user message\nmessages = client.beta.threads.messages.list(\n    thread_id=thread.id, order=\"asc\", after=message.id\n)\nshow_json(messages)\n```\n\n\n    {'data': [{'id': 'msg_9MAeOrGriHcImeQnAzvYyJbs',\n       'assistant_id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n       'content': [{'text': {'annotations': [],\n          'value': 'Certainly. To solve for x in the equation `3x + 11 = 14`:\\n\\n1. Subtract 11 from both sides: `3x + 11 - 11 = 14 - 11` simplifies to `3x = 3`.\\n2. Divide both sides by 3: `3x / 3 = 3 / 3` simplifies to `x = 1`.\\n\\nSo, the solution is `x = 1`.'},\n         'type': 'text'}],\n       'created_at': 1699828335,\n       'file_ids': [],\n       'metadata': {},\n       'object': 'thread.message',\n       'role': 'assistant',\n       'run_id': 'run_IFHfsubkJv7RSUbDZpNVs4PG',\n       'thread_id': 'thread_bw42vPoQtYBMQE84WubNcJXG'}],\n     'object': 'list',\n     'first_id': 'msg_9MAeOrGriHcImeQnAzvYyJbs',\n     'last_id': 'msg_9MAeOrGriHcImeQnAzvYyJbs',\n     'has_more': False}\n\n\nThis may feel like a lot of steps to get a response back, especially for this simple example. However, you'll soon see how we can add very powerful functionality to our Assistant without changing much code at all!\n\n\n### Example\n\n\nLet's take a look at how we could potentially put all of this together. Below is all the code you need to use an Assistant you've created.\n\nSince we've already created our Math Assistant, I've saved its ID in `MATH_ASSISTANT_ID`. I then defined two functions:\n\n- `submit_message`: create a Message on a Thread, then start (and return) a new Run\n- `get_response`: returns the list of Messages in a Thread"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: f8a836dd-e7d0-4e9a-b133-0a769b487328
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f8a836dd-e7d0-4e9a-b133-0a769b487328\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"356fb06d-4217-4ad6-8275-30ae62ed05c2\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"7ea5605056be2a436ae62a9f27d9767ff9343b17ebcacc58bdce1e525f524eba\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"8423c2bc-99a2-4490-8fed-6192a1e3dd54\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"541caf0c4881fb0165fc2719bfb0e8acab66a7bd2b907e17703dc87e129ed116\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 11283, \"end_char_idx\": 14083, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "This may feel like a lot of steps to get a response back, especially for this simple example. However, you'll soon see how we can add very powerful functionality to our Assistant without changing much code at all!\n\n\n### Example\n\n\nLet's take a look at how we could potentially put all of this together. Below is all the code you need to use an Assistant you've created.\n\nSince we've already created our Math Assistant, I've saved its ID in `MATH_ASSISTANT_ID`. I then defined two functions:\n\n- `submit_message`: create a Message on a Thread, then start (and return) a new Run\n- `get_response`: returns the list of Messages in a Thread\n\n\n\n```python\nfrom openai import OpenAI\n\nMATH_ASSISTANT_ID = assistant.id  # or a hard-coded ID like \"asst-...\"\n\nclient = OpenAI(api_key=os.environ.get(\"OPENAI_API_KEY\", \"<your OpenAI API key if not set as env var>\"))\n\ndef submit_message(assistant_id, thread, user_message):\n    client.beta.threads.messages.create(\n        thread_id=thread.id, role=\"user\", content=user_message\n    )\n    return client.beta.threads.runs.create(\n        thread_id=thread.id,\n        assistant_id=assistant_id,\n    )\n\n\ndef get_response(thread):\n    return client.beta.threads.messages.list(thread_id=thread.id, order=\"asc\")\n```\n\nI've also defined a `create_thread_and_run` function that I can re-use (which is actually almost identical to the [`client.beta.threads.create_and_run`](https://platform.openai.com/docs/api-reference/runs/createThreadAndRun) compound function in our API ;) ). Finally, we can submit our mock user requests each to a new Thread.\n\nNotice how all of these API calls are asynchronous operations; this means we actually get async behavior in our code without the use of async libraries! (e.g. `asyncio`)\n\n\n\n```python\ndef create_thread_and_run(user_input):\n    thread = client.beta.threads.create()\n    run = submit_message(MATH_ASSISTANT_ID, thread, user_input)\n    return thread, run\n\n\n# Emulating concurrent user requests\nthread1, run1 = create_thread_and_run(\n    \"I need to solve the equation `3x + 11 = 14`. Can you help me?\"\n)\nthread2, run2 = create_thread_and_run(\"Could you explain linear algebra to me?\")\nthread3, run3 = create_thread_and_run(\"I don't like math. What can I do?\")\n\n# Now all Runs are executing...\n```\n\nOnce all Runs are going, we can wait on each and get the responses.\n\n\n\n```python\nimport time\n\n# Pretty printing helper\ndef pretty_print(messages):\n    print(\"# Messages\")\n    for m in messages:\n        print(f\"{m.role}: {m.content[0].text.value}\")\n    print()\n\n\n# Waiting in a loop\ndef wait_on_run(run, thread):\n    while run.status == \"queued\" or run.status == \"in_progress\":\n        run = client.beta.threads.runs.retrieve(\n            thread_id=thread.id,\n            run_id=run.id,\n        )\n        time.sleep(0.5)\n    return run"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 8423c2bc-99a2-4490-8fed-6192a1e3dd54
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"8423c2bc-99a2-4490-8fed-6192a1e3dd54\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f8a836dd-e7d0-4e9a-b133-0a769b487328\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"79e2a6f35cb51fd0f293dc9c1a94a3dcc50ffb3199808cacee071ac991a797d8\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"48fd5e41-1bdb-41b8-ae48-ce974946c82b\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"507e175905c4c0166ec8d8fa9a55444e464244427ed3d3e45325b4d8f7927200\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 13029, \"end_char_idx\": 16193, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "```python\ndef create_thread_and_run(user_input):\n    thread = client.beta.threads.create()\n    run = submit_message(MATH_ASSISTANT_ID, thread, user_input)\n    return thread, run\n\n\n# Emulating concurrent user requests\nthread1, run1 = create_thread_and_run(\n    \"I need to solve the equation `3x + 11 = 14`. Can you help me?\"\n)\nthread2, run2 = create_thread_and_run(\"Could you explain linear algebra to me?\")\nthread3, run3 = create_thread_and_run(\"I don't like math. What can I do?\")\n\n# Now all Runs are executing...\n```\n\nOnce all Runs are going, we can wait on each and get the responses.\n\n\n\n```python\nimport time\n\n# Pretty printing helper\ndef pretty_print(messages):\n    print(\"# Messages\")\n    for m in messages:\n        print(f\"{m.role}: {m.content[0].text.value}\")\n    print()\n\n\n# Waiting in a loop\ndef wait_on_run(run, thread):\n    while run.status == \"queued\" or run.status == \"in_progress\":\n        run = client.beta.threads.runs.retrieve(\n            thread_id=thread.id,\n            run_id=run.id,\n        )\n        time.sleep(0.5)\n    return run\n\n\n# Wait for Run 1\nrun1 = wait_on_run(run1, thread1)\npretty_print(get_response(thread1))\n\n# Wait for Run 2\nrun2 = wait_on_run(run2, thread2)\npretty_print(get_response(thread2))\n\n# Wait for Run 3\nrun3 = wait_on_run(run3, thread3)\npretty_print(get_response(thread3))\n\n# Thank our assistant on Thread 3 :)\nrun4 = submit_message(MATH_ASSISTANT_ID, thread3, \"Thank you!\")\nrun4 = wait_on_run(run4, thread3)\npretty_print(get_response(thread3))\n```\n\n    # Messages\n    user: I need to solve the equation `3x + 11 = 14`. Can you help me?\n    assistant: Yes, subtract 11 from both sides to get `3x = 3`, then divide both sides by 3 to find `x = 1`.\n    \n    # Messages\n    user: Could you explain linear algebra to me?\n    assistant: Linear algebra is the branch of mathematics that deals with vector spaces, linear equations, and matrices, focusing on the properties and operations that can be applied to vectors and linear transformations.\n    \n    # Messages\n    user: I don't like math. What can I do?\n    assistant: Try finding aspects of math that relate to your interests or daily life, and consider a tutor or interactive resources to make learning more enjoyable.\n    \n    # Messages\n    user: I don't like math. What can I do?\n    assistant: Try finding aspects of math that relate to your interests or daily life, and consider a tutor or interactive resources to make learning more enjoyable.\n    user: Thank you!\n    assistant: You're welcome! If you have any more questions, feel free to ask.\n    \n\n\nEt voil\u00e0!\n\nYou may have noticed that this code is not actually specific to our math Assistant at all... this code will work for any new Assistant you create simply by changing the Assistant ID! That is the power of the Assistants API.\n\n\n## Tools\n\nA key feature of the Assistants API is the ability to equip our Assistants with Tools, like Code Interpreter, Retrieval, and custom Functions. Let's take a look at each.\n\n### Code Interpreter\n\nLet's equip our Math Tutor with the [Code Interpreter](https://platform.openai.com/docs/assistants/tools/code-interpreter) tool, which we can do from the Dashboard..."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 48fd5e41-1bdb-41b8-ae48-ce974946c82b
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"48fd5e41-1bdb-41b8-ae48-ce974946c82b\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"8423c2bc-99a2-4490-8fed-6192a1e3dd54\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"3cd8db29f825631cd1b5d7fd63d0dc9b113d54fb8b0ceb531acd983d11fea928\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"e84ac6b7-fd00-4284-ba8f-783ccddb47e3\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"2810bf5ba0c1bd0af8e0417b678bb1782a379df96fd27220f392b9dd4c25e18d\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 15587, \"end_char_idx\": 18122, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "Et voil\u00e0!\n\nYou may have noticed that this code is not actually specific to our math Assistant at all... this code will work for any new Assistant you create simply by changing the Assistant ID! That is the power of the Assistants API.\n\n\n## Tools\n\nA key feature of the Assistants API is the ability to equip our Assistants with Tools, like Code Interpreter, Retrieval, and custom Functions. Let's take a look at each.\n\n### Code Interpreter\n\nLet's equip our Math Tutor with the [Code Interpreter](https://platform.openai.com/docs/assistants/tools/code-interpreter) tool, which we can do from the Dashboard...\n\n\n![Enabling code interpreter](../images/assistants_overview_enable_code_interpreter.png)\n\n\n...or the API, using the Assistant ID.\n\n\n\n```python\nassistant = client.beta.assistants.update(\n    MATH_ASSISTANT_ID,\n    tools=[{\"type\": \"code_interpreter\"}],\n)\nshow_json(assistant)\n```\n\n\n    {'id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n     'created_at': 1699828331,\n     'description': None,\n     'file_ids': [],\n     'instructions': 'You are a personal math tutor. Answer questions briefly, in a sentence or less.',\n     'metadata': {},\n     'model': 'gpt-4-1106-preview',\n     'name': 'Math Tutor',\n     'object': 'assistant',\n     'tools': [{'type': 'code_interpreter'}]}\n\n\nNow, let's ask the Assistant to use its new tool.\n\n\n\n```python\nthread, run = create_thread_and_run(\n    \"Generate the first 20 fibbonaci numbers with code.\"\n)\nrun = wait_on_run(run, thread)\npretty_print(get_response(thread))\n```\n\n    # Messages\n    user: Generate the first 20 fibbonaci numbers with code.\n    assistant: The first 20 Fibonacci numbers are: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, and 4181.\n    \n\n\nAnd that's it! The Assistant used Code Interpreter in the background, and gave us a final response.\n\nFor some use cases this may be enough \u2013\u00a0however, if we want more details on what precisely an Assistant is doing we can take a look at a Run's Steps.\n\n### Steps\n\n\nA Run is composed of one or more Steps. Like a Run, each Step has a `status` that you can query. This is useful for surfacing the progress of a Step to a user (e.g. a spinner while the Assistant is writing code or performing retrieval).\n\n\n\n```python\nrun_steps = client.beta.threads.runs.steps.list(\n    thread_id=thread.id, run_id=run.id, order=\"asc\"\n)\n```\n\nLet's take a look at each Step's `step_details`.\n\n\n\n```python\nfor step in run_steps.data:\n    step_details = step.step_details\n    print(json.dumps(show_json(step_details), indent=4))\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: e84ac6b7-fd00-4284-ba8f-783ccddb47e3
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"e84ac6b7-fd00-4284-ba8f-783ccddb47e3\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"48fd5e41-1bdb-41b8-ae48-ce974946c82b\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"23fb0b319772f39599d3162986e07462995e1bf25701e0888206ade95b0ae5f4\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c79d47b5-39cc-4289-8d67-5afc714e05ca\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"c589620c30040dec080c74333c4a541a0f878080e5c249d2fc0382f711dea259\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 16861, \"end_char_idx\": 19460, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "Now, let's ask the Assistant to use its new tool.\n\n\n\n```python\nthread, run = create_thread_and_run(\n    \"Generate the first 20 fibbonaci numbers with code.\"\n)\nrun = wait_on_run(run, thread)\npretty_print(get_response(thread))\n```\n\n    # Messages\n    user: Generate the first 20 fibbonaci numbers with code.\n    assistant: The first 20 Fibonacci numbers are: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, and 4181.\n    \n\n\nAnd that's it! The Assistant used Code Interpreter in the background, and gave us a final response.\n\nFor some use cases this may be enough \u2013\u00a0however, if we want more details on what precisely an Assistant is doing we can take a look at a Run's Steps.\n\n### Steps\n\n\nA Run is composed of one or more Steps. Like a Run, each Step has a `status` that you can query. This is useful for surfacing the progress of a Step to a user (e.g. a spinner while the Assistant is writing code or performing retrieval).\n\n\n\n```python\nrun_steps = client.beta.threads.runs.steps.list(\n    thread_id=thread.id, run_id=run.id, order=\"asc\"\n)\n```\n\nLet's take a look at each Step's `step_details`.\n\n\n\n```python\nfor step in run_steps.data:\n    step_details = step.step_details\n    print(json.dumps(show_json(step_details), indent=4))\n```\n\n\n    {'tool_calls': [{'id': 'call_WMNqd63PtX8vZzTwaA6eWpBg',\n       'code_interpreter': {'input': '# Python function to generate the first 20 Fibonacci numbers\\ndef fibonacci(n):\\n    fib_sequence = [0, 1]\\n    while len(fib_sequence) < n:\\n        fib_sequence.append(fib_sequence[-1] + fib_sequence[-2])\\n    return fib_sequence\\n\\n# Generate the first 20 Fibonacci numbers\\nfirst_20_fibonacci = fibonacci(20)\\nfirst_20_fibonacci',\n        'outputs': [{'logs': '[0,\\n 1,\\n 1,\\n 2,\\n 3,\\n 5,\\n 8,\\n 13,\\n 21,\\n 34,\\n 55,\\n 89,\\n 144,\\n 233,\\n 377,\\n 610,\\n 987,\\n 1597,\\n 2584,\\n 4181]',\n          'type': 'logs'}]},\n       'type': 'code_interpreter'}],\n     'type': 'tool_calls'}\n\n\n    null\n\n\n\n    {'message_creation': {'message_id': 'msg_z593lE5bvcD6BngeDFHDxzwm'},\n     'type': 'message_creation'}\n\n\n    null\n\n\nWe can see the `step_details` for two Steps:\n\n1. `tool_calls` (plural, since it could be more than one in a single Step)\n2. `message_creation`\n\nThe first Step is a `tool_calls`, specifically using the `code_interpreter` which contains:\n\n- `input`, which was the Python code generated before the tool was called, and\n- `output`, which was the result of running the Code Interpreter.\n\nThe second Step is a `message_creation`, which contains the `message` that was added to the Thread to communicate the results to the user."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: c79d47b5-39cc-4289-8d67-5afc714e05ca
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"c79d47b5-39cc-4289-8d67-5afc714e05ca\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"e84ac6b7-fd00-4284-ba8f-783ccddb47e3\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"cd3b3d697f8f5ff1e671ce63f93e787af1e0bf61c07eb7f64b857f379a5af437\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f6a26fd6-c9e7-4d34-a8e5-23873932b6bc\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"a20d0558bba64f77eaedd7089f31ec68e2642e1b9efa904aa2656339115bb86e\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 18812, \"end_char_idx\": 22081, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "null\n\n\n\n    {'message_creation': {'message_id': 'msg_z593lE5bvcD6BngeDFHDxzwm'},\n     'type': 'message_creation'}\n\n\n    null\n\n\nWe can see the `step_details` for two Steps:\n\n1. `tool_calls` (plural, since it could be more than one in a single Step)\n2. `message_creation`\n\nThe first Step is a `tool_calls`, specifically using the `code_interpreter` which contains:\n\n- `input`, which was the Python code generated before the tool was called, and\n- `output`, which was the result of running the Code Interpreter.\n\nThe second Step is a `message_creation`, which contains the `message` that was added to the Thread to communicate the results to the user.\n\n\n### Retrieval\n\nAnother powerful tool in the Assistants API is [Retrieval](https://platform.openai.com/docs/assistants/tools/knowledge-retrieval): the ability to upload files that the Assistant will use as a knowledge base when answering questions. This can also be enabled from the Dashboard or the API, where we can upload files we want to be used.\n\n\n![Enabling retrieval](../images/assistants_overview_enable_retrieval.png)\n\n\n\n```python\n# Upload the file\nfile = client.files.create(\n    file=open(\n        \"data/language_models_are_unsupervised_multitask_learners.pdf\",\n        \"rb\",\n    ),\n    purpose=\"assistants\",\n)\n# Update Assistant\nassistant = client.beta.assistants.update(\n    MATH_ASSISTANT_ID,\n    tools=[{\"type\": \"code_interpreter\"}, {\"type\": \"retrieval\"}],\n    file_ids=[file.id],\n)\nshow_json(assistant)\n```\n\n\n    {'id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n     'created_at': 1699828331,\n     'description': None,\n     'file_ids': ['file-MdXcQI8OdPp76wukWI4dpLwW'],\n     'instructions': 'You are a personal math tutor. Answer questions briefly, in a sentence or less.',\n     'metadata': {},\n     'model': 'gpt-4-1106-preview',\n     'name': 'Math Tutor',\n     'object': 'assistant',\n     'tools': [{'type': 'code_interpreter'}, {'type': 'retrieval'}]}\n\n\n\n```python\nthread, run = create_thread_and_run(\n    \"What are some cool math concepts behind this ML paper pdf? Explain in two sentences.\"\n)\nrun = wait_on_run(run, thread)\npretty_print(get_response(thread))\n```\n\n    # Messages\n    user: What are some cool math concepts behind this ML paper pdf? Explain in two sentences.\n    assistant: I am unable to find specific sections referring to \"cool math concepts\" directly in the paper using the available tools. I will now read the beginning of the paper to identify any mathematical concepts that are fundamental to the paper.\n    assistant: The paper discusses leveraging large language models as a framework for unsupervised multitask learning, where tasks are implicitly defined by the context within sequences of text. It explores the zero-shot learning capabilities of such models by showing that when a language model is trained on a vast dataset, it begins to generalize and perform tasks without explicit supervision, achieving competitive results across various natural language processing tasks using a probabilistic framework based on sequential modeling and conditional probabilities.\n    \n\n\n> **Note**\n> There are more intricacies in Retrieval, like [Annotations](https://platform.openai.com/docs/assistants/how-it-works/managing-threads-and-messages), which may be covered in another cookbook."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: f6a26fd6-c9e7-4d34-a8e5-23873932b6bc
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f6a26fd6-c9e7-4d34-a8e5-23873932b6bc\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"c79d47b5-39cc-4289-8d67-5afc714e05ca\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"d7de947916510e99dc696ca6d6ff3463cee5d3a9780fa1d0313f4e3b6865ee2c\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4c8caffe-f9b2-4a8a-a8d1-fc0920cac53a\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"5ddbdf30fed006677bb110c3e1f3563b26a262fedbbf562207c274e3453cac74\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 20728, \"end_char_idx\": 23989, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "```python\nthread, run = create_thread_and_run(\n    \"What are some cool math concepts behind this ML paper pdf? Explain in two sentences.\"\n)\nrun = wait_on_run(run, thread)\npretty_print(get_response(thread))\n```\n\n    # Messages\n    user: What are some cool math concepts behind this ML paper pdf? Explain in two sentences.\n    assistant: I am unable to find specific sections referring to \"cool math concepts\" directly in the paper using the available tools. I will now read the beginning of the paper to identify any mathematical concepts that are fundamental to the paper.\n    assistant: The paper discusses leveraging large language models as a framework for unsupervised multitask learning, where tasks are implicitly defined by the context within sequences of text. It explores the zero-shot learning capabilities of such models by showing that when a language model is trained on a vast dataset, it begins to generalize and perform tasks without explicit supervision, achieving competitive results across various natural language processing tasks using a probabilistic framework based on sequential modeling and conditional probabilities.\n    \n\n\n> **Note**\n> There are more intricacies in Retrieval, like [Annotations](https://platform.openai.com/docs/assistants/how-it-works/managing-threads-and-messages), which may be covered in another cookbook.\n\n\n### Functions\n\nAs a final powerful tool for your Assistant, you can specify custom [Functions](https://platform.openai.com/docs/assistants/tools/function-calling) (much like the [Function Calling](https://platform.openai.com/docs/guides/function-calling) in the Chat Completions API). During a Run, the Assistant can then indicate it wants to call one or more functions you specified. You are then responsible for calling the Function, and providing the output back to the Assistant.\n\nLet's take a look at an example by defining a `display_quiz()` Function for our Math Tutor.\n\nThis function will take a `title` and an array of `question`s, display the quiz, and get input from the user for each:\n\n- `title`\n- `questions`\n  - `question_text`\n  - `question_type`: [`MULTIPLE_CHOICE`, `FREE_RESPONSE`]\n  - `choices`: [\"choice 1\", \"choice 2\", ...]\n\nUnfortunately I don't know how to get user input within a Python Notebook, so I'll be mocking out responses with `get_mock_response...`. This is where you'd get the user's actual input.\n\n\n\n```python\ndef get_mock_response_from_user_multiple_choice():\n    return \"a\"\n\n\ndef get_mock_response_from_user_free_response():\n    return \"I don't know.\"\n\n\ndef display_quiz(title, questions):\n    print(\"Quiz:\", title)\n    print()\n    responses = []\n\n    for q in questions:\n        print(q[\"question_text\"])\n        response = \"\"\n\n        # If multiple choice, print options\n        if q[\"question_type\"] == \"MULTIPLE_CHOICE\":\n            for i, choice in enumerate(q[\"choices\"]):\n                print(f\"{i}. {choice}\")\n            response = get_mock_response_from_user_multiple_choice()\n\n        # Otherwise, just get response\n        elif q[\"question_type\"] == \"FREE_RESPONSE\":\n            response = get_mock_response_from_user_free_response()\n\n        responses.append(response)\n        print()\n\n    return responses\n```\n\nHere's what a sample quiz would look like:"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 4c8caffe-f9b2-4a8a-a8d1-fc0920cac53a
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"4c8caffe-f9b2-4a8a-a8d1-fc0920cac53a\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f6a26fd6-c9e7-4d34-a8e5-23873932b6bc\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"fa589c941a041bae5c19958cd99516ab99923069d4a49647e1a4ca3826436ede\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"e2c61d1e-a09e-484f-806e-b179f72fc4a5\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"0b5a13fde9142aa46916cad94d6337478d4c43af3c28de91d026f0facb565e97\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 23119, \"end_char_idx\": 26354, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "```python\ndef get_mock_response_from_user_multiple_choice():\n    return \"a\"\n\n\ndef get_mock_response_from_user_free_response():\n    return \"I don't know.\"\n\n\ndef display_quiz(title, questions):\n    print(\"Quiz:\", title)\n    print()\n    responses = []\n\n    for q in questions:\n        print(q[\"question_text\"])\n        response = \"\"\n\n        # If multiple choice, print options\n        if q[\"question_type\"] == \"MULTIPLE_CHOICE\":\n            for i, choice in enumerate(q[\"choices\"]):\n                print(f\"{i}. {choice}\")\n            response = get_mock_response_from_user_multiple_choice()\n\n        # Otherwise, just get response\n        elif q[\"question_type\"] == \"FREE_RESPONSE\":\n            response = get_mock_response_from_user_free_response()\n\n        responses.append(response)\n        print()\n\n    return responses\n```\n\nHere's what a sample quiz would look like:\n\n\n\n```python\nresponses = display_quiz(\n    \"Sample Quiz\",\n    [\n        {\"question_text\": \"What is your name?\", \"question_type\": \"FREE_RESPONSE\"},\n        {\n            \"question_text\": \"What is your favorite color?\",\n            \"question_type\": \"MULTIPLE_CHOICE\",\n            \"choices\": [\"Red\", \"Blue\", \"Green\", \"Yellow\"],\n        },\n    ],\n)\nprint(\"Responses:\", responses)\n```\n\n    Quiz: Sample Quiz\n    \n    What is your name?\n    \n    What is your favorite color?\n    0. Red\n    1. Blue\n    2. Green\n    3. Yellow\n    \n    Responses: [\"I don't know.\", 'a']\n\n\nNow, let's define the interface of this function in JSON format, so our Assistant can call it:\n\n\n\n```python\nfunction_json = {\n    \"name\": \"display_quiz\",\n    \"description\": \"Displays a quiz to the student, and returns the student's response. A single quiz can have multiple questions.\",\n    \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"title\": {\"type\": \"string\"},\n            \"questions\": {\n                \"type\": \"array\",\n                \"description\": \"An array of questions, each with a title and potentially options (if multiple choice).\",\n                \"items\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                        \"question_text\": {\"type\": \"string\"},\n                        \"question_type\": {\n                            \"type\": \"string\",\n                            \"enum\": [\"MULTIPLE_CHOICE\", \"FREE_RESPONSE\"],\n                        },\n                        \"choices\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}},\n                    },\n                    \"required\": [\"question_text\"],\n                },\n            },\n        },\n        \"required\": [\"title\", \"questions\"],\n    },\n}\n```\n\nOnce again, let's update our Assistant either through the Dashboard or the API.\n\n\n![Enabling custom function](../images/assistants_overview_enable_function.png)\n\n> **Note**\n> Pasting the function JSON into the Dashboard was a bit finicky due to indentation, etc. I just asked ChatGPT to format my function the same as one of the examples on the Dashboard :).\n\n\n\n```python\nassistant = client.beta.assistants.update(\n    MATH_ASSISTANT_ID,\n    tools=[\n        {\"type\": \"code_interpreter\"},\n        {\"type\": \"retrieval\"},\n        {\"type\": \"function\", \"function\": function_json},\n    ],\n)\nshow_json(assistant)\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: e2c61d1e-a09e-484f-806e-b179f72fc4a5
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"e2c61d1e-a09e-484f-806e-b179f72fc4a5\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4c8caffe-f9b2-4a8a-a8d1-fc0920cac53a\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"4c35a3f5016e943214ba4502afca86e8dcc86d1fad72d6562c2ee55a8a0a1952\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"2ef55dae-1401-4754-80d5-ba1629487822\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"c8d9d2a704246f6613bdc8cb87ae43b22125cdf2ce06c982bcaa6e8a986f9187\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 24554, \"end_char_idx\": 27669, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "Now, let's define the interface of this function in JSON format, so our Assistant can call it:\n\n\n\n```python\nfunction_json = {\n    \"name\": \"display_quiz\",\n    \"description\": \"Displays a quiz to the student, and returns the student's response. A single quiz can have multiple questions.\",\n    \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"title\": {\"type\": \"string\"},\n            \"questions\": {\n                \"type\": \"array\",\n                \"description\": \"An array of questions, each with a title and potentially options (if multiple choice).\",\n                \"items\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                        \"question_text\": {\"type\": \"string\"},\n                        \"question_type\": {\n                            \"type\": \"string\",\n                            \"enum\": [\"MULTIPLE_CHOICE\", \"FREE_RESPONSE\"],\n                        },\n                        \"choices\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}},\n                    },\n                    \"required\": [\"question_text\"],\n                },\n            },\n        },\n        \"required\": [\"title\", \"questions\"],\n    },\n}\n```\n\nOnce again, let's update our Assistant either through the Dashboard or the API.\n\n\n![Enabling custom function](../images/assistants_overview_enable_function.png)\n\n> **Note**\n> Pasting the function JSON into the Dashboard was a bit finicky due to indentation, etc. I just asked ChatGPT to format my function the same as one of the examples on the Dashboard :).\n\n\n\n```python\nassistant = client.beta.assistants.update(\n    MATH_ASSISTANT_ID,\n    tools=[\n        {\"type\": \"code_interpreter\"},\n        {\"type\": \"retrieval\"},\n        {\"type\": \"function\", \"function\": function_json},\n    ],\n)\nshow_json(assistant)\n```\n\n\n    {'id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n     'created_at': 1699828331,\n     'description': None,\n     'file_ids': ['file-MdXcQI8OdPp76wukWI4dpLwW'],\n     'instructions': 'You are a personal math tutor. Answer questions briefly, in a sentence or less.',\n     'metadata': {},\n     'model': 'gpt-4-1106-preview',\n     'name': 'Math Tutor',\n     'object': 'assistant',\n     'tools': [{'type': 'code_interpreter'},\n      {'type': 'retrieval'},\n      {'function': {'name': 'display_quiz',\n        'parameters': {'type': 'object',\n         'properties': {'title': {'type': 'string'},\n          'questions': {'type': 'array',\n           'description': 'An array of questions, each with a title and potentially options (if multiple choice).',\n           'items': {'type': 'object',\n            'properties': {'question_text': {'type': 'string'},\n             'question_type': {'type': 'string',\n              'enum': ['MULTIPLE_CHOICE', 'FREE_RESPONSE']},\n             'choices': {'type': 'array', 'items': {'type': 'string'}}},\n            'required': ['question_text']}}},\n         'required': ['title', 'questions']},\n        'description': \"Displays a quiz to the student, and returns the student's response. A single quiz can have multiple questions.\"},\n       'type': 'function'}]}\n\n\nAnd now, we ask for a quiz."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 2ef55dae-1401-4754-80d5-ba1629487822
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"2ef55dae-1401-4754-80d5-ba1629487822\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"e2c61d1e-a09e-484f-806e-b179f72fc4a5\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"6cd51fc0692c108e773755ccc4471c5c3cc8d355815657393088023f61d82ffb\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"ed02d7b8-2632-4e11-9248-04650c880de5\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"370f8ee88404904a36ac88f5639395635a9545b98b28aa0723f32acd1940d241\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 26361, \"end_char_idx\": 28037, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "{'id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n     'created_at': 1699828331,\n     'description': None,\n     'file_ids': ['file-MdXcQI8OdPp76wukWI4dpLwW'],\n     'instructions': 'You are a personal math tutor. Answer questions briefly, in a sentence or less.',\n     'metadata': {},\n     'model': 'gpt-4-1106-preview',\n     'name': 'Math Tutor',\n     'object': 'assistant',\n     'tools': [{'type': 'code_interpreter'},\n      {'type': 'retrieval'},\n      {'function': {'name': 'display_quiz',\n        'parameters': {'type': 'object',\n         'properties': {'title': {'type': 'string'},\n          'questions': {'type': 'array',\n           'description': 'An array of questions, each with a title and potentially options (if multiple choice).',\n           'items': {'type': 'object',\n            'properties': {'question_text': {'type': 'string'},\n             'question_type': {'type': 'string',\n              'enum': ['MULTIPLE_CHOICE', 'FREE_RESPONSE']},\n             'choices': {'type': 'array', 'items': {'type': 'string'}}},\n            'required': ['question_text']}}},\n         'required': ['title', 'questions']},\n        'description': \"Displays a quiz to the student, and returns the student's response. A single quiz can have multiple questions.\"},\n       'type': 'function'}]}\n\n\nAnd now, we ask for a quiz.\n\n\n\n```python\nthread, run = create_thread_and_run(\n    \"Make a quiz with 2 questions: One open ended, one multiple choice. Then, give me feedback for the responses.\"\n)\nrun = wait_on_run(run, thread)\nrun.status\n```\n\n\n\n\n    'requires_action'\n\n\n\nNow, however, when we check the Run's `status` we see `requires_action`! Let's take a closer.\n\n\n\n```python\nshow_json(run)\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: ed02d7b8-2632-4e11-9248-04650c880de5
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"ed02d7b8-2632-4e11-9248-04650c880de5\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"2ef55dae-1401-4754-80d5-ba1629487822\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"d87c9914f826e7ee68f09b3542df1546271af9fbab0c54a0bb66f6b501c4629b\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"a14c55df-e98d-44f8-8b54-ab515e30b9c5\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"7ee548e2857cda2d1206d9f36951766c9d210335d7f661014a9ebf32479fef86\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 27642, \"end_char_idx\": 30294, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "And now, we ask for a quiz.\n\n\n\n```python\nthread, run = create_thread_and_run(\n    \"Make a quiz with 2 questions: One open ended, one multiple choice. Then, give me feedback for the responses.\"\n)\nrun = wait_on_run(run, thread)\nrun.status\n```\n\n\n\n\n    'requires_action'\n\n\n\nNow, however, when we check the Run's `status` we see `requires_action`! Let's take a closer.\n\n\n\n```python\nshow_json(run)\n```\n\n\n    {'id': 'run_98PGE3qGtHoaWaCLoytyRUBf',\n     'assistant_id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n     'cancelled_at': None,\n     'completed_at': None,\n     'created_at': 1699828370,\n     'expires_at': 1699828970,\n     'failed_at': None,\n     'file_ids': ['file-MdXcQI8OdPp76wukWI4dpLwW'],\n     'instructions': 'You are a personal math tutor. Answer questions briefly, in a sentence or less.',\n     'last_error': None,\n     'metadata': {},\n     'model': 'gpt-4-1106-preview',\n     'object': 'thread.run',\n     'required_action': {'submit_tool_outputs': {'tool_calls': [{'id': 'call_Zf650sWT1wW4Uwbf5YeDS0VG',\n         'function': {'arguments': '{\\n  \"title\": \"Mathematics Quiz\",\\n  \"questions\": [\\n    {\\n      \"question_text\": \"Explain why the square root of a negative number is not a real number.\",\\n      \"question_type\": \"FREE_RESPONSE\"\\n    },\\n    {\\n      \"question_text\": \"What is the value of an angle in a regular pentagon?\",\\n      \"choices\": [\\n        \"72 degrees\",\\n        \"90 degrees\",\\n        \"108 degrees\",\\n        \"120 degrees\"\\n      ],\\n      \"question_type\": \"MULTIPLE_CHOICE\"\\n    }\\n  ]\\n}',\n          'name': 'display_quiz'},\n         'type': 'function'}]},\n      'type': 'submit_tool_outputs'},\n     'started_at': 1699828370,\n     'status': 'requires_action',\n     'thread_id': 'thread_bICTESFvWoRdj0O0SzsosLCS',\n     'tools': [{'type': 'code_interpreter'},\n      {'type': 'retrieval'},\n      {'function': {'name': 'display_quiz',\n        'parameters': {'type': 'object',\n         'properties': {'title': {'type': 'string'},\n          'questions': {'type': 'array',\n           'description': 'An array of questions, each with a title and potentially options (if multiple choice).',\n           'items': {'type': 'object',\n            'properties': {'question_text': {'type': 'string'},\n             'question_type': {'type': 'string',\n              'enum': ['MULTIPLE_CHOICE', 'FREE_RESPONSE']},\n             'choices': {'type': 'array', 'items': {'type': 'string'}}},\n            'required': ['question_text']}}},\n         'required': ['title', 'questions']},\n        'description': \"Displays a quiz to the student, and returns the student's response. A single quiz can have multiple questions.\"},\n       'type': 'function'}]}"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: a14c55df-e98d-44f8-8b54-ab515e30b9c5
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"a14c55df-e98d-44f8-8b54-ab515e30b9c5\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ed02d7b8-2632-4e11-9248-04650c880de5\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"6eddf04fd3bec8fce94127f9b5fa17d9481181962eb59545c1100fc374f68072\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"1bd59454-275d-48c6-8d9b-1b5f0a11bd90\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"c098098af2e6df9c3d19857f011cf496687b60f770264cd7b5981608b75b0fcf\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 30297, \"end_char_idx\": 32481, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "The `required_action` field indicates a Tool is waiting for us to run it and submit its output back to the Assistant. Specifically, the `display_quiz` function! Let's start by parsing the `name` and `arguments`.\n\n> **Note**\n> While in this case we know there is only one Tool call, in practice the Assistant may choose to call multiple tools.\n\n\n\n```python\n# Extract single tool call\ntool_call = run.required_action.submit_tool_outputs.tool_calls[0]\nname = tool_call.function.name\narguments = json.loads(tool_call.function.arguments)\n\nprint(\"Function Name:\", name)\nprint(\"Function Arguments:\")\narguments\n```\n\n    Function Name: display_quiz\n    Function Arguments:\n\n\n\n\n\n    {'title': 'Mathematics Quiz',\n     'questions': [{'question_text': 'Explain why the square root of a negative number is not a real number.',\n       'question_type': 'FREE_RESPONSE'},\n      {'question_text': 'What is the value of an angle in a regular pentagon?',\n       'choices': ['72 degrees', '90 degrees', '108 degrees', '120 degrees'],\n       'question_type': 'MULTIPLE_CHOICE'}]}\n\n\n\nNow let's actually call our `display_quiz` function with the arguments provided by the Assistant:\n\n\n\n```python\nresponses = display_quiz(arguments[\"title\"], arguments[\"questions\"])\nprint(\"Responses:\", responses)\n```\n\n    Quiz: Mathematics Quiz\n    \n    Explain why the square root of a negative number is not a real number.\n    \n    What is the value of an angle in a regular pentagon?\n    0. 72 degrees\n    1. 90 degrees\n    2. 108 degrees\n    3. 120 degrees\n    \n    Responses: [\"I don't know.\", 'a']\n\n\nGreat! (Remember these responses are the one's we mocked earlier. In reality, we'd be getting input from the back from this function call.)\n\nNow that we have our responses, let's submit them back to the Assistant. We'll need the `tool_call` ID, found in the `tool_call` we parsed out earlier. We'll also need to encode our `list`of responses into a `str`.\n\n\n\n```python\nrun = client.beta.threads.runs.submit_tool_outputs(\n    thread_id=thread.id,\n    run_id=run.id,\n    tool_outputs=[\n        {\n            \"tool_call_id\": tool_call.id,\n            \"output\": json.dumps(responses),\n        }\n    ],\n)\nshow_json(run)\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 1bd59454-275d-48c6-8d9b-1b5f0a11bd90
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"1bd59454-275d-48c6-8d9b-1b5f0a11bd90\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"a14c55df-e98d-44f8-8b54-ab515e30b9c5\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"55ddcc2e47f7688569ab3bc6e01f84236f36452ef63a67b52777281628c7b56f\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"9186a64e-f546-4da8-b96d-304cc5b02c50\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"2a8564f417fb71aace47221f9af9c71a1d5d467ae9de197bd30084ba335b5c9b\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 30970, \"end_char_idx\": 34040, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "{'title': 'Mathematics Quiz',\n     'questions': [{'question_text': 'Explain why the square root of a negative number is not a real number.',\n       'question_type': 'FREE_RESPONSE'},\n      {'question_text': 'What is the value of an angle in a regular pentagon?',\n       'choices': ['72 degrees', '90 degrees', '108 degrees', '120 degrees'],\n       'question_type': 'MULTIPLE_CHOICE'}]}\n\n\n\nNow let's actually call our `display_quiz` function with the arguments provided by the Assistant:\n\n\n\n```python\nresponses = display_quiz(arguments[\"title\"], arguments[\"questions\"])\nprint(\"Responses:\", responses)\n```\n\n    Quiz: Mathematics Quiz\n    \n    Explain why the square root of a negative number is not a real number.\n    \n    What is the value of an angle in a regular pentagon?\n    0. 72 degrees\n    1. 90 degrees\n    2. 108 degrees\n    3. 120 degrees\n    \n    Responses: [\"I don't know.\", 'a']\n\n\nGreat! (Remember these responses are the one's we mocked earlier. In reality, we'd be getting input from the back from this function call.)\n\nNow that we have our responses, let's submit them back to the Assistant. We'll need the `tool_call` ID, found in the `tool_call` we parsed out earlier. We'll also need to encode our `list`of responses into a `str`.\n\n\n\n```python\nrun = client.beta.threads.runs.submit_tool_outputs(\n    thread_id=thread.id,\n    run_id=run.id,\n    tool_outputs=[\n        {\n            \"tool_call_id\": tool_call.id,\n            \"output\": json.dumps(responses),\n        }\n    ],\n)\nshow_json(run)\n```\n\n\n    {'id': 'run_98PGE3qGtHoaWaCLoytyRUBf',\n     'assistant_id': 'asst_9HAjl9y41ufsViNcThW1EXUS',\n     'cancelled_at': None,\n     'completed_at': None,\n     'created_at': 1699828370,\n     'expires_at': 1699828970,\n     'failed_at': None,\n     'file_ids': ['file-MdXcQI8OdPp76wukWI4dpLwW'],\n     'instructions': 'You are a personal math tutor. Answer questions briefly, in a sentence or less.',\n     'last_error': None,\n     'metadata': {},\n     'model': 'gpt-4-1106-preview',\n     'object': 'thread.run',\n     'required_action': None,\n     'started_at': 1699828370,\n     'status': 'queued',\n     'thread_id': 'thread_bICTESFvWoRdj0O0SzsosLCS',\n     'tools': [{'type': 'code_interpreter'},\n      {'type': 'retrieval'},\n      {'function': {'name': 'display_quiz',\n        'parameters': {'type': 'object',\n         'properties': {'title': {'type': 'string'},\n          'questions': {'type': 'array',\n           'description': 'An array of questions, each with a title and potentially options (if multiple choice).',\n           'items': {'type': 'object',\n            'properties': {'question_text': {'type': 'string'},\n             'question_type': {'type': 'string',\n              'enum': ['MULTIPLE_CHOICE', 'FREE_RESPONSE']},\n             'choices': {'type': 'array', 'items': {'type': 'string'}}},\n            'required': ['question_text']}}},\n         'required': ['title', 'questions']},\n        'description': \"Displays a quiz to the student, and returns the student's response. A single quiz can have multiple questions.\"},\n       'type': 'function'}]}"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 9186a64e-f546-4da8-b96d-304cc5b02c50
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb", "title": "Assistants API Overview (Python SDK)", "tokens": 9318, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"9186a64e-f546-4da8-b96d-304cc5b02c50\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"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\": \"f33d277e-c887-48bf-98db-3c02874144fd\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"25196582ecca1a5525badb6fba4d240193b570af0cf05090a29a71b5dfc22b98\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"1bd59454-275d-48c6-8d9b-1b5f0a11bd90\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Assistants_API_overview_python.ipynb\", \"title\": \"Assistants API Overview (Python SDK)\", \"tokens\": 9318, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8d974407c62f5ec8433f1cd2793e0759d22785778758af4f561e564d0ea5f724\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 34043, \"end_char_idx\": 36387, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f33d277e-c887-48bf-98db-3c02874144fd", "doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "ref_doc_id": "f33d277e-c887-48bf-98db-3c02874144fd", "chroma:document": "We can now wait for the Run to complete once again, and check our Thread!\n\n\n\n```python\nrun = wait_on_run(run, thread)\npretty_print(get_response(thread))\n```\n\n    # Messages\n    user: Make a quiz with 2 questions: One open ended, one multiple choice. Then, give me feedback for the responses.\n    assistant: Thank you for attempting the quiz.\n    \n    For the first question, it's important to know that the square root of a negative number is not a real number because real numbers consist of all the numbers on the number line, and that includes all positive numbers, zero, and negative numbers. However, the square root of a negative number is not on this number line; instead, it is what we call an imaginary number. When we want to take the square root of a negative number, we typically use the imaginary unit \\(i\\), where \\(i\\) is defined as \\(\\sqrt{-1}\\).\n    \n    For the second question, the correct answer is \"108 degrees.\" In a regular pentagon, which is a five-sided polygon with equal sides and angles, each interior angle is \\(108\\) degrees. This is because the sum of the interior angles of a pentagon is \\(540\\) degrees, and when divided by \\(5\\) (the number of angles), it gives \\(108\\) degrees per angle. The choice you selected, \"72 degrees,\" actually refers to the external angle of a regular pentagon, not the internal angle.\n    \n\n\nWoohoo \ud83c\udf89\n\n\n## Conclusion\n\nWe covered a lot of ground in this notebook, give yourself a high-five! Hopefully you should now have a strong foundation to build powerful, stateful experiences with tools like Code Interpreter, Retrieval, and Functions!\n\nThere's a few sections we didn't cover for the sake of brevity, so here's a few resources to explore further:\n\n- [Annotations](https://platform.openai.com/docs/assistants/how-it-works/managing-threads-and-messages): parsing file citations\n- [Files](https://platform.openai.com/docs/api-reference/assistants/file-object): Thread scoped vs Assistant scoped\n- [Parallel Function Calls](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling): calling multiple tools in a single Step\n- Multi-Assistant Thread Runs: single Thread with Messages from multiple Assistants\n- Streaming: coming soon!\n\nNow go off and build something ama[zing](https://www.youtube.com/watch?v=xvFZjo5PgG0&pp=ygUQcmljayByb2xsIG5vIGFkcw%3D%3D)!"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 4af1d853-c08c-43de-ae66-5504e479832e
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb", "title": "Multimodal RAG with CLIP Embeddings and GPT-4 Vision", "tokens": 2176, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"4af1d853-c08c-43de-ae66-5504e479832e\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"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\": \"3f19a745-dbe8-45a7-a422-685d437ebb2c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"b3543bca4cc5dc3a9c45cff88256635f96e56b47cdca9cfdfa6b0f2f33d5e7cc\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"ccac5b17-5294-4bc3-b749-864f1c407ba1\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"d28629c8f0ef1c8c0d397c8dea2723cc8c7ff5737f4c18aef09a5fccc70ad13e\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 0, \"end_char_idx\": 2651, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "doc_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "ref_doc_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "chroma:document": "# Multimodal RAG with CLIP Embeddings and GPT-4 Vision\n\n\nMultimodal RAG integrates additional modalities into traditional text-based RAG, enhancing LLMs' question-answering by providing extra context and grounding textual data for improved understanding.\n\nAdopting the approach from the [clothing matchmaker cookbook](https://cookbook.openai.com/examples/how_to_combine_gpt4v_with_rag_outfit_assistant), we directly embed images for similarity search, bypassing the lossy process of text captioning, to boost retrieval accuracy.\n\nUsing CLIP-based embeddings further allows fine-tuning with specific data or updating with unseen images.\n\nThis technique is showcased through searching an enterprise knowledge base with user-provided tech images to deliver pertinent information.\n\n# Installations\n\nFirst let's install the relevant packages.\n\n\n```python\n#installations\n%pip install clip\n%pip install torch\n%pip install pillow\n%pip install faiss-cpu\n%pip install numpy\n%pip install git+https://github.com/openai/CLIP.git\n%pip install openai\n```\n\nThen let's import all the needed packages.\n\n\n\n```python\n# model imports\nimport faiss\nimport json\nimport torch\nfrom openai import OpenAI\nimport torch.nn as nn\nfrom torch.utils.data import DataLoader\nimport clip\nclient = OpenAI()\n\n# helper imports\nfrom tqdm import tqdm\nimport json\nimport os\nimport numpy as np\nimport pickle\nfrom typing import List, Union, Tuple\n\n# visualisation imports\nfrom PIL import Image\nimport matplotlib.pyplot as plt\nimport base64\n```\n\nNow let's load the CLIP model.\n\n\n```python\n#load model on device. The device you are running inference/training on is either a CPU or GPU if you have.\ndevice = \"cpu\"\nmodel, preprocess = clip.load(\"ViT-B/32\",device=device)\n```\n\n\nWe will now:\n1.   Create the image embedding database\n2.   Set up a query to the vision model\n3.   Perform the semantic search\n4.   Pass a user query to the image\n\n\n\n# Create image embedding database\n\nNext we will create our image embeddings knowledge base from a directory of images. This will be the knowledge base of technology that we search through to provide information to the user for an image they upload.\n\nWe pass in the directory in which we store our images (as JPEGs) and loop through each to create our embeddings.\n\nWe also have a description.json. This has an entry for every single image in our knowledge base. It has two keys: 'image_path' and 'description'. It maps each image to a useful description of this image to aid in answering the user question.\n\nFirst let's write a function to get all the image paths in a given directory. We will then get all the jpeg's from a directory called 'image_database'"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: ccac5b17-5294-4bc3-b749-864f1c407ba1
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb", "title": "Multimodal RAG with CLIP Embeddings and GPT-4 Vision", "tokens": 2176, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"ccac5b17-5294-4bc3-b749-864f1c407ba1\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"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\": \"3f19a745-dbe8-45a7-a422-685d437ebb2c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"b3543bca4cc5dc3a9c45cff88256635f96e56b47cdca9cfdfa6b0f2f33d5e7cc\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4af1d853-c08c-43de-ae66-5504e479832e\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e5b438987c97c0dc300c86b5215050a621a121760dd14b1753dff91aa11b9f2b\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"8b9c5dec-c880-4aa8-8775-8b6191c1c756\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"df9406da5b60ee611b5e904582a3d3c7a8aa91d63fa509c8a49cfd04a0db5441\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 1087, \"end_char_idx\": 4390, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "doc_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "ref_doc_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "chroma:document": "```python\n# model imports\nimport faiss\nimport json\nimport torch\nfrom openai import OpenAI\nimport torch.nn as nn\nfrom torch.utils.data import DataLoader\nimport clip\nclient = OpenAI()\n\n# helper imports\nfrom tqdm import tqdm\nimport json\nimport os\nimport numpy as np\nimport pickle\nfrom typing import List, Union, Tuple\n\n# visualisation imports\nfrom PIL import Image\nimport matplotlib.pyplot as plt\nimport base64\n```\n\nNow let's load the CLIP model.\n\n\n```python\n#load model on device. The device you are running inference/training on is either a CPU or GPU if you have.\ndevice = \"cpu\"\nmodel, preprocess = clip.load(\"ViT-B/32\",device=device)\n```\n\n\nWe will now:\n1.   Create the image embedding database\n2.   Set up a query to the vision model\n3.   Perform the semantic search\n4.   Pass a user query to the image\n\n\n\n# Create image embedding database\n\nNext we will create our image embeddings knowledge base from a directory of images. This will be the knowledge base of technology that we search through to provide information to the user for an image they upload.\n\nWe pass in the directory in which we store our images (as JPEGs) and loop through each to create our embeddings.\n\nWe also have a description.json. This has an entry for every single image in our knowledge base. It has two keys: 'image_path' and 'description'. It maps each image to a useful description of this image to aid in answering the user question.\n\nFirst let's write a function to get all the image paths in a given directory. We will then get all the jpeg's from a directory called 'image_database'\n\n\n```python\ndef get_image_paths(directory: str, number: int = None) -> List[str]:\n    image_paths = []\n    count = 0\n    for filename in os.listdir(directory):\n        if filename.endswith('.jpeg'):\n            image_paths.append(os.path.join(directory, filename))\n            if number is not None and count == number:\n                return [image_paths[-1]]\n            count += 1\n    return image_paths\ndirec = 'image_database/'\nimage_paths = get_image_paths(direc)\n\n```\n\nNext we will write a function to get the image embeddings from the CLIP model given a series of paths.\n\nWe first preprocess the image using the preprocess function we got earlier. This performs a few things to ensure the input to the CLIP model is of the right format and dimensionality including resizing, normalization, colour channel adjustment etc.\n\nWe then stack these preprocessed images together so we can pass them into the model at once rather than in a loop. And finally return the model output which is an array of embeddings.\n\n\n```python\ndef get_features_from_image_path(image_paths):\n  images = [preprocess(Image.open(image_path).convert(\"RGB\")) for image_path in image_paths]\n  image_input = torch.tensor(np.stack(images))\n  with torch.no_grad():\n    image_features = model.encode_image(image_input).float()\n  return image_features\nimage_features = get_features_from_image_path(image_paths)\n\n```\n\nWe can now create our vector database.\n\n\n```python\nindex = faiss.IndexFlatIP(image_features.shape[1])\nindex.add(image_features)\n\n```\n\nAnd also ingest our json for image-description mapping and create a list of jsons. We also create a helper function to search through this list for a given image we want, so we can obtain the description of that image"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 8b9c5dec-c880-4aa8-8775-8b6191c1c756
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb", "title": "Multimodal RAG with CLIP Embeddings and GPT-4 Vision", "tokens": 2176, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"8b9c5dec-c880-4aa8-8775-8b6191c1c756\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"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\": \"3f19a745-dbe8-45a7-a422-685d437ebb2c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"b3543bca4cc5dc3a9c45cff88256635f96e56b47cdca9cfdfa6b0f2f33d5e7cc\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ccac5b17-5294-4bc3-b749-864f1c407ba1\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"1e193681596d47fa73315b27570b46ad0aeb2daa425fa9c492e132198559ef8f\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"344d8726-9764-47e7-819e-8937fbceab54\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"150a95265ed3de04c6a2404ad2962375163fd558b4958201bc802d6ed6713ccc\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 2654, \"end_char_idx\": 5348, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "doc_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "ref_doc_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "chroma:document": "```python\ndef get_image_paths(directory: str, number: int = None) -> List[str]:\n    image_paths = []\n    count = 0\n    for filename in os.listdir(directory):\n        if filename.endswith('.jpeg'):\n            image_paths.append(os.path.join(directory, filename))\n            if number is not None and count == number:\n                return [image_paths[-1]]\n            count += 1\n    return image_paths\ndirec = 'image_database/'\nimage_paths = get_image_paths(direc)\n\n```\n\nNext we will write a function to get the image embeddings from the CLIP model given a series of paths.\n\nWe first preprocess the image using the preprocess function we got earlier. This performs a few things to ensure the input to the CLIP model is of the right format and dimensionality including resizing, normalization, colour channel adjustment etc.\n\nWe then stack these preprocessed images together so we can pass them into the model at once rather than in a loop. And finally return the model output which is an array of embeddings.\n\n\n```python\ndef get_features_from_image_path(image_paths):\n  images = [preprocess(Image.open(image_path).convert(\"RGB\")) for image_path in image_paths]\n  image_input = torch.tensor(np.stack(images))\n  with torch.no_grad():\n    image_features = model.encode_image(image_input).float()\n  return image_features\nimage_features = get_features_from_image_path(image_paths)\n\n```\n\nWe can now create our vector database.\n\n\n```python\nindex = faiss.IndexFlatIP(image_features.shape[1])\nindex.add(image_features)\n\n```\n\nAnd also ingest our json for image-description mapping and create a list of jsons. We also create a helper function to search through this list for a given image we want, so we can obtain the description of that image\n\n\n```python\ndata = []\nimage_path = 'train1.jpeg'\nwith open('description.json', 'r') as file:\n    for line in file:\n        data.append(json.loads(line))\ndef find_entry(data, key, value):\n    for entry in data:\n        if entry.get(key) == value:\n            return entry\n    return None\n```\n\nLet us display an example image, this will be the user uploaded image. This is a piece of tech that was unveiled at the 2024 CES. It is the DELTA Pro Ultra Whole House Battery Generator.\n\n\n```python\nim = Image.open(image_path)\nplt.imshow(im)\nplt.show()\n```\n\n![Delta Pro](../images/train1.jpeg)\n\n# Querying the vision model\n\nNow let's have a look at what GPT-4 Vision (which wouldn't have seen this technology before) will label it as.\n\n\n\nFirst we will need to write a function to encode our image in base64 as this is the format we will pass into the vision model. Then we will create a generic image_query function to allow us to query the LLM with an image input."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 344d8726-9764-47e7-819e-8937fbceab54
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb", "title": "Multimodal RAG with CLIP Embeddings and GPT-4 Vision", "tokens": 2176, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"344d8726-9764-47e7-819e-8937fbceab54\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"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\": \"3f19a745-dbe8-45a7-a422-685d437ebb2c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"b3543bca4cc5dc3a9c45cff88256635f96e56b47cdca9cfdfa6b0f2f33d5e7cc\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"8b9c5dec-c880-4aa8-8775-8b6191c1c756\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"1b4493a1434efb914eb3a1a02f552fb15ac9dc65a67449eb66c821305a4cbb77\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"69da2898-3dca-45e0-9fb9-2eabff032826\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"100df2a64d14e9d8acc948172ca42df4e10a6639250ac3f880dec1bd2c15c032\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 3668, \"end_char_idx\": 7007, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "doc_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "ref_doc_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "chroma:document": "```python\ndef get_features_from_image_path(image_paths):\n  images = [preprocess(Image.open(image_path).convert(\"RGB\")) for image_path in image_paths]\n  image_input = torch.tensor(np.stack(images))\n  with torch.no_grad():\n    image_features = model.encode_image(image_input).float()\n  return image_features\nimage_features = get_features_from_image_path(image_paths)\n\n```\n\nWe can now create our vector database.\n\n\n```python\nindex = faiss.IndexFlatIP(image_features.shape[1])\nindex.add(image_features)\n\n```\n\nAnd also ingest our json for image-description mapping and create a list of jsons. We also create a helper function to search through this list for a given image we want, so we can obtain the description of that image\n\n\n```python\ndata = []\nimage_path = 'train1.jpeg'\nwith open('description.json', 'r') as file:\n    for line in file:\n        data.append(json.loads(line))\ndef find_entry(data, key, value):\n    for entry in data:\n        if entry.get(key) == value:\n            return entry\n    return None\n```\n\nLet us display an example image, this will be the user uploaded image. This is a piece of tech that was unveiled at the 2024 CES. It is the DELTA Pro Ultra Whole House Battery Generator.\n\n\n```python\nim = Image.open(image_path)\nplt.imshow(im)\nplt.show()\n```\n\n![Delta Pro](../images/train1.jpeg)\n\n# Querying the vision model\n\nNow let's have a look at what GPT-4 Vision (which wouldn't have seen this technology before) will label it as.\n\n\n\nFirst we will need to write a function to encode our image in base64 as this is the format we will pass into the vision model. Then we will create a generic image_query function to allow us to query the LLM with an image input.\n\n\n```python\ndef encode_image(image_path):\n    with open(image_path, 'rb') as image_file:\n        encoded_image = base64.b64encode(image_file.read())\n        return encoded_image.decode('utf-8')\n\ndef image_query(query, image_path):\n    response = client.chat.completions.create(\n        model='gpt-4-vision-preview',\n        messages=[\n            {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                \"type\": \"text\",\n                \"text\": query,\n                },\n                {\n                \"type\": \"image_url\",\n                \"image_url\": {\n                    \"url\": f\"data:image/jpeg;base64,{encode_image(image_path)}\",\n                },\n                }\n            ],\n            }\n        ],\n        max_tokens=300,\n    )\n    # Extract relevant features from the response\n    return response.choices[0].message.content\nimage_query('Write a short label of what is show in this image?', image_path)\n```\n\n\n\n\n    'Autonomous Delivery Robot'\n\n\n\nAs we can see, it tries its best from the information it's been trained on but it makes a mistake due to it not having seen anything similar in its training data. This is because it is an ambiguous image making it difficult to extrapolate and deduce.\n\n# Performing semantic search\n\nNow let's perform similarity search to find the two most similar images in our knowledge base. We do this by getting the embeddings of a user inputted image_path, retrieving the indexes and distances of the similar iamges in our database. Distance will be our proxy metric for similarity and a smaller distance means more similar. We then sort based on distance in descending order."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 69da2898-3dca-45e0-9fb9-2eabff032826
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb", "title": "Multimodal RAG with CLIP Embeddings and GPT-4 Vision", "tokens": 2176, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"69da2898-3dca-45e0-9fb9-2eabff032826\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"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\": \"3f19a745-dbe8-45a7-a422-685d437ebb2c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"b3543bca4cc5dc3a9c45cff88256635f96e56b47cdca9cfdfa6b0f2f33d5e7cc\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"344d8726-9764-47e7-819e-8937fbceab54\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"5f18632c7989875e34d7006e972d63d8d4174442540f821feaf0f378bc67fa46\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c9071d21-6c1a-4651-959e-1c8bb366090c\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"33c1a918809db5d71f4d35398935deca9e416e03cf21e4b98bb757e7b0795d95\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 5121, \"end_char_idx\": 8620, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "doc_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "ref_doc_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "chroma:document": "First we will need to write a function to encode our image in base64 as this is the format we will pass into the vision model. Then we will create a generic image_query function to allow us to query the LLM with an image input.\n\n\n```python\ndef encode_image(image_path):\n    with open(image_path, 'rb') as image_file:\n        encoded_image = base64.b64encode(image_file.read())\n        return encoded_image.decode('utf-8')\n\ndef image_query(query, image_path):\n    response = client.chat.completions.create(\n        model='gpt-4-vision-preview',\n        messages=[\n            {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                \"type\": \"text\",\n                \"text\": query,\n                },\n                {\n                \"type\": \"image_url\",\n                \"image_url\": {\n                    \"url\": f\"data:image/jpeg;base64,{encode_image(image_path)}\",\n                },\n                }\n            ],\n            }\n        ],\n        max_tokens=300,\n    )\n    # Extract relevant features from the response\n    return response.choices[0].message.content\nimage_query('Write a short label of what is show in this image?', image_path)\n```\n\n\n\n\n    'Autonomous Delivery Robot'\n\n\n\nAs we can see, it tries its best from the information it's been trained on but it makes a mistake due to it not having seen anything similar in its training data. This is because it is an ambiguous image making it difficult to extrapolate and deduce.\n\n# Performing semantic search\n\nNow let's perform similarity search to find the two most similar images in our knowledge base. We do this by getting the embeddings of a user inputted image_path, retrieving the indexes and distances of the similar iamges in our database. Distance will be our proxy metric for similarity and a smaller distance means more similar. We then sort based on distance in descending order.\n\n\n```python\nimage_search_embedding = get_features_from_image_path([image_path])\ndistances, indices = index.search(image_search_embedding.reshape(1, -1), 2) #2 signifies the number of topmost similar images to bring back\ndistances = distances[0]\nindices = indices[0]\nindices_distances = list(zip(indices, distances))\nindices_distances.sort(key=lambda x: x[1], reverse=True)\n```\n\nWe require the indices as we will use this to serach through our image_directory and selecting the image at the location of the index to feed into the vision model for RAG.\n\nAnd let's see what it brought back (we display these in order of similarity):\n\n\n```python\n#display similar images\nfor idx, distance in indices_distances:\n    print(idx)\n    path = get_image_paths(direc, idx)[0]\n    im = Image.open(path)\n    plt.imshow(im)\n    plt.show()\n```\n\n![Delta Pro2](../images/train2.jpeg)\n\n![Delta Pro3](../images/train17.jpeg)\n\nWe can see here it brought back two images which contain the DELTA Pro Ultra Whole House Battery Generator. In one of the images it also has some background which could be distracting but manages to find the right image.\n\n# User querying the most similar image\n\nNow for our most similar image, we want to pass it and the description of it to gpt-v with a user query so they can inquire about the technology that they may have bought. This is where the power of the vision model comes in, where you can ask general queries for which the model hasn't been explicitly trained on to the model and it responds with high accuracy.\n\nIn our example below, we will inquire as to the capacity of the item in question."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: c9071d21-6c1a-4651-959e-1c8bb366090c
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb", "title": "Multimodal RAG with CLIP Embeddings and GPT-4 Vision", "tokens": 2176, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"c9071d21-6c1a-4651-959e-1c8bb366090c\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"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\": \"3f19a745-dbe8-45a7-a422-685d437ebb2c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"b3543bca4cc5dc3a9c45cff88256635f96e56b47cdca9cfdfa6b0f2f33d5e7cc\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"69da2898-3dca-45e0-9fb9-2eabff032826\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/custom_image_embedding_search.ipynb\", \"title\": \"Multimodal RAG with CLIP Embeddings and GPT-4 Vision\", \"tokens\": 2176, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"fafa27fcb899d6fbb21954f5edfbaf7e7946f1baa3034872a3fd8f97477c3112\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 7010, \"end_char_idx\": 9951, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "doc_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "ref_doc_id": "3f19a745-dbe8-45a7-a422-685d437ebb2c", "chroma:document": "```python\nimage_search_embedding = get_features_from_image_path([image_path])\ndistances, indices = index.search(image_search_embedding.reshape(1, -1), 2) #2 signifies the number of topmost similar images to bring back\ndistances = distances[0]\nindices = indices[0]\nindices_distances = list(zip(indices, distances))\nindices_distances.sort(key=lambda x: x[1], reverse=True)\n```\n\nWe require the indices as we will use this to serach through our image_directory and selecting the image at the location of the index to feed into the vision model for RAG.\n\nAnd let's see what it brought back (we display these in order of similarity):\n\n\n```python\n#display similar images\nfor idx, distance in indices_distances:\n    print(idx)\n    path = get_image_paths(direc, idx)[0]\n    im = Image.open(path)\n    plt.imshow(im)\n    plt.show()\n```\n\n![Delta Pro2](../images/train2.jpeg)\n\n![Delta Pro3](../images/train17.jpeg)\n\nWe can see here it brought back two images which contain the DELTA Pro Ultra Whole House Battery Generator. In one of the images it also has some background which could be distracting but manages to find the right image.\n\n# User querying the most similar image\n\nNow for our most similar image, we want to pass it and the description of it to gpt-v with a user query so they can inquire about the technology that they may have bought. This is where the power of the vision model comes in, where you can ask general queries for which the model hasn't been explicitly trained on to the model and it responds with high accuracy.\n\nIn our example below, we will inquire as to the capacity of the item in question.\n\n\n```python\nsimilar_path = get_image_paths(direc, indices_distances[0][0])[0]\nelement = find_entry(data, 'image_path', similar_path)\n\nuser_query = 'What is the capacity of this item?'\nprompt = f\"\"\"\nBelow is a user query, I want you to answer the query using the description and image provided.\n\nuser query:\n{user_query}\n\ndescription:\n{element['description']}\n\"\"\"\nimage_query(prompt, similar_path)\n```\n\n\n\n\n    'The portable home battery DELTA Pro has a base capacity of 3.6kWh. This capacity can be expanded up to 25kWh with additional batteries. The image showcases the DELTA Pro, which has an impressive 3600W power capacity for AC output as well.'\n\n\n\nAnd we see it is able to answer the question. This was only possible by matching images directly and from there gathering the relevant description as context.\n\n# Conclusion\n\nIn this notebook, we have gone through how to use the CLIP model, an example of creating an image embedding database using the CLIP model, performing semantic search and finally providing a user query to answer the question.\n\nThe applications of this pattern of usage spread across many different application domains and this is easily improved to further enhance the technique. For example you may finetune CLIP, you may improve the retrieval process just like in RAG and you can prompt engineer GPT-V."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: d8c496f7-e2ea-41c6-8723-63e2339988e6
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"d8c496f7-e2ea-41c6-8723-63e2339988e6\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"045e71d7-1e5a-4b82-8828-7142e2d918e6\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"6dfb980ced0bdc8480693e2bd14274e0c27a8c263037566190e3b1bfa7b12d00\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "# Using GPT-4o mini to tag & caption images\n\nThis notebook explores how to leverage the vision capabilities of the GPT-4* models (for example `gpt-4o`, `gpt-4o-mini` or `gpt-4-turbo`) to tag & caption images. \n\nWe can leverage the multimodal capabilities of these models to provide input images along with additional context on what they represent, and prompt the model to output tags or image descriptions. The image descriptions can then be further refined with a language model (in this notebook, we'll use `gpt-4o-mini`) to generate captions. \n\nGenerating text content from images can be useful for multiple use cases, especially use cases involving search.  \nWe will illustrate a search use case in this notebook by using generated keywords and product captions to search for products - both from a text input and an image input.\n\nAs an example, we will use a dataset of Amazon furniture items, tag them with relevant keywords and generate short, descriptive captions.\n\n## Setup\n\n\n```python\n# Install dependencies if needed\n%pip install openai\n%pip install scikit-learn\n```\n\n\n```python\nfrom IPython.display import Image, display\nimport pandas as pd\nfrom sklearn.metrics.pairwise import cosine_similarity\nimport numpy as np\nfrom openai import OpenAI\n\n# Initializing OpenAI client - see https://platform.openai.com/docs/quickstart?context=python\nclient = OpenAI()\n```\n\n\n```python\n# Loading dataset\ndataset_path =  \"data/amazon_furniture_dataset.csv\"\ndf = pd.read_csv(dataset_path)\ndf.head()\n```\n\n\n\n\n<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>asin</th>\n      <th>url</th>\n      <th>title</th>\n      <th>brand</th>\n      <th>price</th>\n      <th>availability</th>\n      <th>categories</th>\n      <th>primary_image</th>\n      <th>images</th>\n      <th>upc</th>\n      <th>.</th>\n      <th>color</th>\n      <th>material</th>\n      <th>style</th>\n      <th>important_information</th>\n      <th>product_overview</th>\n      <th>about_item</th>\n      <th>description</th>\n      <th>specifications</th>\n      <th>uniq_id</th>\n      <th>scraped_at</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>B0CJHKVG6P</td>\n      <td>https://www.amazon.com/dp/B0CJHKVG6P</td>\n      <td>GOYMFK 1pc Free Standing Shoe Rack, Multi-laye.</td>\n      <td>GOYMFK</td>\n      <td>$24.99</td>\n      <td>Only 13 left in stock - order soon.</td>\n      <td>['Home &amp; Kitchen', 'Storage &amp; Organization', '.</td>\n      <td>https://m.media-amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 045e71d7-1e5a-4b82-8828-7142e2d918e6
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"045e71d7-1e5a-4b82-8828-7142e2d918e6\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"d8c496f7-e2ea-41c6-8723-63e2339988e6\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"bd13a6b7efae9b583728c9bf1d74a8af631ced768be1a187e58d5f77b951248c\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7987d42c-fcdd-4669-b7aa-752ba4f4d048\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"4c1f77a34804d664a733d1047a5c1da8edfed8a2349687b5627ee9b0a9447706\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>asin</th>\n      <th>url</th>\n      <th>title</th>\n      <th>brand</th>\n      <th>price</th>\n      <th>availability</th>\n      <th>categories</th>\n      <th>primary_image</th>\n      <th>images</th>\n      <th>upc</th>\n      <th>.</th>\n      <th>color</th>\n      <th>material</th>\n      <th>style</th>\n      <th>important_information</th>\n      <th>product_overview</th>\n      <th>about_item</th>\n      <th>description</th>\n      <th>specifications</th>\n      <th>uniq_id</th>\n      <th>scraped_at</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>B0CJHKVG6P</td>\n      <td>https://www.amazon.com/dp/B0CJHKVG6P</td>\n      <td>GOYMFK 1pc Free Standing Shoe Rack, Multi-laye.</td>\n      <td>GOYMFK</td>\n      <td>$24.99</td>\n      <td>Only 13 left in stock - order soon.</td>\n      <td>['Home &amp; Kitchen', 'Storage &amp; Organization', '.</td>\n      <td>https://m.media-amazon.com/images/I/416WaLx10j.</td>\n      <td>['https://m.media-amazon.com/images/I/416WaLx1.</td>\n      <td>NaN</td>\n      <td>.</td>\n      <td>White</td>\n      <td>Metal</td>\n      <td>Modern</td>\n      <td>[]</td>\n      <td>[{'Brand': ' GOYMFK '}, {'Color': ' White '}, .</td>\n      <td>['Multiple layers: Provides ample storage spac.</td>\n      <td>multiple shoes, coats, hats, and other items E.</td>\n      <td>['Brand: GOYMFK', 'Color: White', 'Material: M.</td>\n      <td>02593e81-5c09-5069-8516-b0b29f439ded</td>\n      <td>2024-02-02 15:15:08</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>B0B66QHB23</td>\n      <td>https://www.amazon.com/dp/B0B66QHB23</td>\n      <td>subrtex Leather ding Room, Dining Chairs Set o.</td>\n      <td>subrtex</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>['Home &amp; Kitchen', 'Furniture', 'Dining Room F.</td>\n      <td>https://m.media-amazon.com/images/I/31SejUEWY7.</td>\n      <td>['https://m."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 7987d42c-fcdd-4669-b7aa-752ba4f4d048
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"7987d42c-fcdd-4669-b7aa-752ba4f4d048\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"045e71d7-1e5a-4b82-8828-7142e2d918e6\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"cc0288d6d7202dafde0accbe82391932be9ba7a8afb44237f9b89762bdc2c714\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"6bc792fd-bb97-408c-8f3f-e3f65ee33e82\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"7f60dfcf585843fd2b85a2c30603ca8a71d70db1ba8fbddd13514b52089bf4df\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "Kitchen', 'Storage &amp; Organization', '.</td>\n      <td>https://m.media-amazon.com/images/I/416WaLx10j.</td>\n      <td>['https://m.media-amazon.com/images/I/416WaLx1.</td>\n      <td>NaN</td>\n      <td>.</td>\n      <td>White</td>\n      <td>Metal</td>\n      <td>Modern</td>\n      <td>[]</td>\n      <td>[{'Brand': ' GOYMFK '}, {'Color': ' White '}, .</td>\n      <td>['Multiple layers: Provides ample storage spac.</td>\n      <td>multiple shoes, coats, hats, and other items E.</td>\n      <td>['Brand: GOYMFK', 'Color: White', 'Material: M.</td>\n      <td>02593e81-5c09-5069-8516-b0b29f439ded</td>\n      <td>2024-02-02 15:15:08</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>B0B66QHB23</td>\n      <td>https://www.amazon.com/dp/B0B66QHB23</td>\n      <td>subrtex Leather ding Room, Dining Chairs Set o.</td>\n      <td>subrtex</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>['Home &amp; Kitchen', 'Furniture', 'Dining Room F.</td>\n      <td>https://m.media-amazon.com/images/I/31SejUEWY7.</td>\n      <td>['https://m.media-amazon.com/images/I/31SejUEW.</td>\n      <td>NaN</td>\n      <td>.</td>\n      <td>Black</td>\n      <td>Sponge</td>\n      <td>Black Rubber Wood</td>\n      <td>[]</td>\n      <td>NaN</td>\n      <td>['\u3010Easy Assembly\u3011: Set of 2 dining room chairs.</td>\n      <td>subrtex Dining chairs Set of 2</td>\n      <td>['Brand: subrtex', 'Color: Black', 'Product Di.</td>\n      <td>5938d217-b8c5-5d3e-b1cf-e28e340f292e</td>\n      <td>2024-02-02 15:15:09</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>B0BXRTWLYK</td>\n      <td>https://www.amazon.com/dp/B0BXRTWLYK</td>\n      <td>Plant Repotting Mat MUYETOL Waterproof Transpl.</td>\n      <td>MUYETOL</td>\n      <td>$5.98</td>\n      <td>In Stock</td>\n      <td>['Patio, Lawn &amp; Garden', 'Outdoor D\u00e9cor', 'Doo.</td>\n      <td>https://m.media-amazon.com/images/I/41RgefVq70.</td>\n      <td>['https://m.media-amazon.com/images/I/41RgefVq.</td>\n      <td>NaN</td>\n      <td>."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 6bc792fd-bb97-408c-8f3f-e3f65ee33e82
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"6bc792fd-bb97-408c-8f3f-e3f65ee33e82\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7987d42c-fcdd-4669-b7aa-752ba4f4d048\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"63d4c6b029b91a9e8268bb67988760bf4516977e2833eff8abc73af2703bbffc\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"58ce6e16-1eec-4f1a-8b2a-596eeb74a728\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"3a5c3a2f6162f4c42d51aafdf38d36e4ff0ab0c89ae26f0e9ffc9ceaf34faf87\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "com/images/I/31SejUEWY7.</td>\n      <td>['https://m.media-amazon.com/images/I/31SejUEW.</td>\n      <td>NaN</td>\n      <td>.</td>\n      <td>Black</td>\n      <td>Sponge</td>\n      <td>Black Rubber Wood</td>\n      <td>[]</td>\n      <td>NaN</td>\n      <td>['\u3010Easy Assembly\u3011: Set of 2 dining room chairs.</td>\n      <td>subrtex Dining chairs Set of 2</td>\n      <td>['Brand: subrtex', 'Color: Black', 'Product Di.</td>\n      <td>5938d217-b8c5-5d3e-b1cf-e28e340f292e</td>\n      <td>2024-02-02 15:15:09</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>B0BXRTWLYK</td>\n      <td>https://www.amazon.com/dp/B0BXRTWLYK</td>\n      <td>Plant Repotting Mat MUYETOL Waterproof Transpl.</td>\n      <td>MUYETOL</td>\n      <td>$5.98</td>\n      <td>In Stock</td>\n      <td>['Patio, Lawn &amp; Garden', 'Outdoor D\u00e9cor', 'Doo.</td>\n      <td>https://m.media-amazon.com/images/I/41RgefVq70.</td>\n      <td>['https://m.media-amazon.com/images/I/41RgefVq.</td>\n      <td>NaN</td>\n      <td>.</td>\n      <td>Green</td>\n      <td>Polyethylene</td>\n      <td>Modern</td>\n      <td>[]</td>\n      <td>[{'Brand': ' MUYETOL '}, {'Size': ' 26.8*26.8 .</td>\n      <td>['PLANT REPOTTING MAT SIZE: 26.8\" x 26.8\", squ.</td>\n      <td>NaN</td>\n      <td>['Brand: MUYETOL', 'Size: 26.8*26.8', 'Item We.</td>\n      <td>b2ede786-3f51-5a45-9a5b-bcf856958cd8</td>\n      <td>2024-02-02 15:15:09</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>B0C1MRB2M8</td>\n      <td>https://www.amazon.com/dp/B0C1MRB2M8</td>\n      <td>Pickleball Doormat, Welcome Doormat Absorbent .</td>\n      <td>VEWETOL</td>\n      <td>$13.99</td>\n      <td>Only 10 left in stock - order soon.</td>\n      <td>['Patio, Lawn &amp; Garden', 'Outdoor D\u00e9cor', 'Doo.</td>\n      <td>https://m.media-amazon.com/images/I/61vz1Igler.</td>\n      <td>['https://m.media-amazon.com/images/I/61vz1Igl."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 58ce6e16-1eec-4f1a-8b2a-596eeb74a728
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"58ce6e16-1eec-4f1a-8b2a-596eeb74a728\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"6bc792fd-bb97-408c-8f3f-e3f65ee33e82\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"d533c926cee854fbf7a36b72a9c78db258a16dd20859a58cf392b9adab439489\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"40731873-72b5-491d-ba32-6f05993af8b6\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"74c97883a7360fef58164778be34cb7fc9a930b1da80ef1b9dc2ff1315e51a5a\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "com/images/I/41RgefVq.</td>\n      <td>NaN</td>\n      <td>.</td>\n      <td>Green</td>\n      <td>Polyethylene</td>\n      <td>Modern</td>\n      <td>[]</td>\n      <td>[{'Brand': ' MUYETOL '}, {'Size': ' 26.8*26.8 .</td>\n      <td>['PLANT REPOTTING MAT SIZE: 26.8\" x 26.8\", squ.</td>\n      <td>NaN</td>\n      <td>['Brand: MUYETOL', 'Size: 26.8*26.8', 'Item We.</td>\n      <td>b2ede786-3f51-5a45-9a5b-bcf856958cd8</td>\n      <td>2024-02-02 15:15:09</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>B0C1MRB2M8</td>\n      <td>https://www.amazon.com/dp/B0C1MRB2M8</td>\n      <td>Pickleball Doormat, Welcome Doormat Absorbent .</td>\n      <td>VEWETOL</td>\n      <td>$13.99</td>\n      <td>Only 10 left in stock - order soon.</td>\n      <td>['Patio, Lawn &amp; Garden', 'Outdoor D\u00e9cor', 'Doo.</td>\n      <td>https://m.media-amazon.com/images/I/61vz1Igler.</td>\n      <td>['https://m.media-amazon.com/images/I/61vz1Igl.</td>\n      <td>NaN</td>\n      <td>.</td>\n      <td>A5589</td>\n      <td>Rubber</td>\n      <td>Modern</td>\n      <td>[]</td>\n      <td>[{'Brand': ' VEWETOL '}, {'Size': ' 16*24INCH .</td>\n      <td>['Specifications: 16x24 Inch ', \" High-Quality.</td>\n      <td>The decorative doormat features a subtle textu.</td>\n      <td>['Brand: VEWETOL', 'Size: 16*24INCH', 'Materia.</td>\n      <td>8fd9377b-cfa6-5f10-835c-6b8eca2816b5</td>\n      <td>2024-02-02 15:15:10</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>B0CG1N9QRC</td>\n      <td>https://www.amazon.com/dp/B0CG1N9QRC</td>\n      <td>JOIN IRON Foldable TV Trays for Eating Set of .</td>\n      <td>JOIN IRON Store</td>\n      <td>$89.99</td>\n      <td>Usually ships within 5 to 6 weeks</td>\n      <td>['Home &amp; Kitchen', 'Furniture', 'Game &amp; Recrea.</td>\n      <td>https://m.media-amazon.com/images/I/41p4d4VJnN.</td>\n      <td>['https://m."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 40731873-72b5-491d-ba32-6f05993af8b6
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"40731873-72b5-491d-ba32-6f05993af8b6\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"58ce6e16-1eec-4f1a-8b2a-596eeb74a728\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"edfb393c4af0f1dc019a2e63aae610b1ed7db5f0eb668ab248d7e6570a816b78\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"df7dbca6-a397-40e1-a7bd-e190bd41bd67\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"28fa1c9d5b6be5dce72abf1315c58a3a0712626db27a519c717015077f2ae9c7\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "</td>\n      <td>['https://m.media-amazon.com/images/I/61vz1Igl.</td>\n      <td>NaN</td>\n      <td>.</td>\n      <td>A5589</td>\n      <td>Rubber</td>\n      <td>Modern</td>\n      <td>[]</td>\n      <td>[{'Brand': ' VEWETOL '}, {'Size': ' 16*24INCH .</td>\n      <td>['Specifications: 16x24 Inch ', \" High-Quality.</td>\n      <td>The decorative doormat features a subtle textu.</td>\n      <td>['Brand: VEWETOL', 'Size: 16*24INCH', 'Materia.</td>\n      <td>8fd9377b-cfa6-5f10-835c-6b8eca2816b5</td>\n      <td>2024-02-02 15:15:10</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>B0CG1N9QRC</td>\n      <td>https://www.amazon.com/dp/B0CG1N9QRC</td>\n      <td>JOIN IRON Foldable TV Trays for Eating Set of .</td>\n      <td>JOIN IRON Store</td>\n      <td>$89.99</td>\n      <td>Usually ships within 5 to 6 weeks</td>\n      <td>['Home &amp; Kitchen', 'Furniture', 'Game &amp; Recrea.</td>\n      <td>https://m.media-amazon.com/images/I/41p4d4VJnN.</td>\n      <td>['https://m.media-amazon.com/images/I/41p4d4VJ.</td>\n      <td>NaN</td>\n      <td>.</td>\n      <td>Grey Set of 4</td>\n      <td>Iron</td>\n      <td>X Classic Style</td>\n      <td>[]</td>\n      <td>NaN</td>\n      <td>['Includes 4 Folding Tv Tray Tables And one Co.</td>\n      <td>Set of Four Folding Trays With Matching Storag.</td>\n      <td>['Brand: JOIN IRON', 'Shape: Rectangular', 'In.</td>\n      <td>bdc9aa30-9439-50dc-8e89-213ea211d66a</td>\n      <td>2024-02-02 15:15:11</td>\n    </tr>\n  </tbody>\n</table>\n<p>5 rows \u00d7 25 columns</p>\n</div>\n\n\n\n## Tag images\n\nIn this section, we'll use GPT-4o mini to generate relevant tags for our products.\n\nWe'll use a simple zero-shot approach to extract keywords, and deduplicate those keywords using embeddings to avoid having multiple keywords that are too similar.\n\nWe will use a combination of an image and the product title to avoid extracting keywords for other items that are depicted in the image - sometimes there are multiple items used in the scene and we want to focus on just the one we want to tag.\n\n### Extract keywords"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: df7dbca6-a397-40e1-a7bd-e190bd41bd67
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"df7dbca6-a397-40e1-a7bd-e190bd41bd67\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"40731873-72b5-491d-ba32-6f05993af8b6\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"1433adbee6696ebe5502e55710abd2489d213b573247ead8f28c001c05c82f30\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"6be1adbf-3888-46af-aa09-caabed530120\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"59c03e3a90d1823ab6f448bbe8f2796ef220a386a71ee6b593ca058d9c15cfd6\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "Kitchen', 'Furniture', 'Game &amp; Recrea.</td>\n      <td>https://m.media-amazon.com/images/I/41p4d4VJnN.</td>\n      <td>['https://m.media-amazon.com/images/I/41p4d4VJ.</td>\n      <td>NaN</td>\n      <td>.</td>\n      <td>Grey Set of 4</td>\n      <td>Iron</td>\n      <td>X Classic Style</td>\n      <td>[]</td>\n      <td>NaN</td>\n      <td>['Includes 4 Folding Tv Tray Tables And one Co.</td>\n      <td>Set of Four Folding Trays With Matching Storag.</td>\n      <td>['Brand: JOIN IRON', 'Shape: Rectangular', 'In.</td>\n      <td>bdc9aa30-9439-50dc-8e89-213ea211d66a</td>\n      <td>2024-02-02 15:15:11</td>\n    </tr>\n  </tbody>\n</table>\n<p>5 rows \u00d7 25 columns</p>\n</div>\n\n\n\n## Tag images\n\nIn this section, we'll use GPT-4o mini to generate relevant tags for our products.\n\nWe'll use a simple zero-shot approach to extract keywords, and deduplicate those keywords using embeddings to avoid having multiple keywords that are too similar.\n\nWe will use a combination of an image and the product title to avoid extracting keywords for other items that are depicted in the image - sometimes there are multiple items used in the scene and we want to focus on just the one we want to tag.\n\n### Extract keywords\n\n\n```python\nsystem_prompt = '''\n    You are an agent specialized in tagging images of furniture items, decorative items, or furnishings with relevant keywords that could be used to search for these items on a marketplace.\n    \n    You will be provided with an image and the title of the item that is depicted in the image, and your goal is to extract keywords for only the item specified. \n    \n    Keywords should be concise and in lower case. \n    \n    Keywords can describe things like:\n    - Item type e.g. 'sofa bed', 'chair', 'desk', 'plant'\n    - Item material e.g. 'wood', 'metal', 'fabric'\n    - Item style e.g. 'scandinavian', 'vintage', 'industrial'\n    - Item color e.g. 'red', 'blue', 'white'\n    \n    Only deduce material, style or color keywords when it is obvious that they make the item depicted in the image stand out.\n\n    Return keywords in the format of an array of strings, like this:\n    ['desk', 'industrial', 'metal']\n    \n'''\n\ndef analyze_image(img_url, title):\n    response = client.chat.completions.create(\n    model=\"gpt-4o-mini\",\n    messages=[\n        {\n            \"role\": \"system\",\n            \"content\": system_prompt\n        },\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"image_url\",\n                    \"image_url\": {\n                        \"url\": img_url,\n                    }\n                },\n            ],\n        },\n        {\n            \"role\": \"user\",\n            \"content\": title\n        }\n    ],\n        max_tokens=300,\n        top_p=0.1\n    )\n\n    return response.choices[0].message.content\n```\n\n#### Testing with a few examples\n\n\n```python\nexamples = df.iloc[:5]\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 6be1adbf-3888-46af-aa09-caabed530120
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"6be1adbf-3888-46af-aa09-caabed530120\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"df7dbca6-a397-40e1-a7bd-e190bd41bd67\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2acc0c90da4a8e021a83267c930c13b96991dbe41410f4f87c91444dc4f9a15b\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7f52027d-5fc4-40a3-85db-6503a78924d6\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"3fd45ea04c91920887abd5f07c6997cb68a6e99cfd3893d3672a82a7715b5ec6\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 7501, \"end_char_idx\": 10280, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "```python\nsystem_prompt = '''\n    You are an agent specialized in tagging images of furniture items, decorative items, or furnishings with relevant keywords that could be used to search for these items on a marketplace.\n    \n    You will be provided with an image and the title of the item that is depicted in the image, and your goal is to extract keywords for only the item specified. \n    \n    Keywords should be concise and in lower case. \n    \n    Keywords can describe things like:\n    - Item type e.g. 'sofa bed', 'chair', 'desk', 'plant'\n    - Item material e.g. 'wood', 'metal', 'fabric'\n    - Item style e.g. 'scandinavian', 'vintage', 'industrial'\n    - Item color e.g. 'red', 'blue', 'white'\n    \n    Only deduce material, style or color keywords when it is obvious that they make the item depicted in the image stand out.\n\n    Return keywords in the format of an array of strings, like this:\n    ['desk', 'industrial', 'metal']\n    \n'''\n\ndef analyze_image(img_url, title):\n    response = client.chat.completions.create(\n    model=\"gpt-4o-mini\",\n    messages=[\n        {\n            \"role\": \"system\",\n            \"content\": system_prompt\n        },\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"image_url\",\n                    \"image_url\": {\n                        \"url\": img_url,\n                    }\n                },\n            ],\n        },\n        {\n            \"role\": \"user\",\n            \"content\": title\n        }\n    ],\n        max_tokens=300,\n        top_p=0.1\n    )\n\n    return response.choices[0].message.content\n```\n\n#### Testing with a few examples\n\n\n```python\nexamples = df.iloc[:5]\n```\n\n\n```python\nfor index, ex in examples.iterrows():\n    url = ex['primary_image']\n    img = Image(url=url)\n    display(img)\n    result = analyze_image(url, ex['title'])\n    print(result)\n    print(\"\\n\\n\")\n```\n\n\n<img src=\"https://m.media-amazon.com/images/I/416WaLx10jL._SS522_.jpg\"/>\n\n\n    ['shoe rack', 'metal', 'white', 'multi-layer', 'hooks']\n    \n    \n    \n\n\n\n<img src=\"https://m.media-amazon.com/images/I/31SejUEWY7L._SS522_.jpg\"/>\n\n\n    ['dining chair', 'leather', 'black']\n    \n    \n    \n\n\n\n<img src=\"https://m.media-amazon.com/images/I/41RgefVq70L._SS522_.jpg\"/>\n\n\n    ['repotting mat', 'waterproof', 'portable', 'foldable', 'green']\n    \n    \n    \n\n\n\n<img src=\"https://m.media-amazon.com/images/I/61vz1IglerL._SS522_.jpg\"/>\n\n\n    ['doormat', 'absorbent', 'non-slip', 'coconut fiber', 'welcome', 'pickleball', 'outdoor']\n    \n    \n    \n\n\n\n<img src=\"https://m.media-amazon.com/images/I/41p4d4VJnNL._SS522_.jpg\"/>\n\n\n    ['tv tray', 'foldable', 'metal', 'grey']\n    \n    \n    \n\n\n### Looking up existing keywords\n\nUsing embeddings to avoid duplicates (synonyms) and/or match pre-defined keywords"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 7f52027d-5fc4-40a3-85db-6503a78924d6
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"7f52027d-5fc4-40a3-85db-6503a78924d6\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"6be1adbf-3888-46af-aa09-caabed530120\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"31112d2459eb7d5594f6137996a90bb6b8405b2ebba8ff68916c07dab351d823\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7c41df11-2363-4978-8729-d920172ef747\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"1ccfb98d98f53a345666959c9cf610be75bdcb0aeaaa5d5df82010651e96f15b\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 9146, \"end_char_idx\": 10872, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "```python\nexamples = df.iloc[:5]\n```\n\n\n```python\nfor index, ex in examples.iterrows():\n    url = ex['primary_image']\n    img = Image(url=url)\n    display(img)\n    result = analyze_image(url, ex['title'])\n    print(result)\n    print(\"\\n\\n\")\n```\n\n\n<img src=\"https://m.media-amazon.com/images/I/416WaLx10jL._SS522_.jpg\"/>\n\n\n    ['shoe rack', 'metal', 'white', 'multi-layer', 'hooks']\n    \n    \n    \n\n\n\n<img src=\"https://m.media-amazon.com/images/I/31SejUEWY7L._SS522_.jpg\"/>\n\n\n    ['dining chair', 'leather', 'black']\n    \n    \n    \n\n\n\n<img src=\"https://m.media-amazon.com/images/I/41RgefVq70L._SS522_.jpg\"/>\n\n\n    ['repotting mat', 'waterproof', 'portable', 'foldable', 'green']\n    \n    \n    \n\n\n\n<img src=\"https://m.media-amazon.com/images/I/61vz1IglerL._SS522_.jpg\"/>\n\n\n    ['doormat', 'absorbent', 'non-slip', 'coconut fiber', 'welcome', 'pickleball', 'outdoor']\n    \n    \n    \n\n\n\n<img src=\"https://m.media-amazon.com/images/I/41p4d4VJnNL._SS522_.jpg\"/>\n\n\n    ['tv tray', 'foldable', 'metal', 'grey']\n    \n    \n    \n\n\n### Looking up existing keywords\n\nUsing embeddings to avoid duplicates (synonyms) and/or match pre-defined keywords\n\n\n```python\n# Feel free to change the embedding model here\ndef get_embedding(value, model=\"text-embedding-3-large\"): \n    embeddings = client.embeddings.create(\n      model=model,\n      input=value,\n      encoding_format=\"float\"\n    )\n    return embeddings.data[0].embedding\n```\n\n#### Testing with example keywords\n\n\n```python\n# Existing keywords\nkeywords_list = ['industrial', 'metal', 'wood', 'vintage', 'bed']\n```\n\n\n```python\ndf_keywords = pd.DataFrame(keywords_list, columns=['keyword'])\ndf_keywords['embedding'] = df_keywords['keyword'].apply(lambda x: get_embedding(x))\ndf_keywords\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 7c41df11-2363-4978-8729-d920172ef747
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"7c41df11-2363-4978-8729-d920172ef747\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7f52027d-5fc4-40a3-85db-6503a78924d6\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"d79fea2cd67f2ac2e43b494f946467c6331b9d8f5c4331447c7711ab24b029d5\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7958aaf8-5661-4e79-a434-e2968cbb78f1\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"00353b2b9df603a3c213d0bcc20dcd65990ea3b8939474583c66a65c929ff324\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 9471, \"end_char_idx\": 11930, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "['shoe rack', 'metal', 'white', 'multi-layer', 'hooks']\n    \n    \n    \n\n\n\n<img src=\"https://m.media-amazon.com/images/I/31SejUEWY7L._SS522_.jpg\"/>\n\n\n    ['dining chair', 'leather', 'black']\n    \n    \n    \n\n\n\n<img src=\"https://m.media-amazon.com/images/I/41RgefVq70L._SS522_.jpg\"/>\n\n\n    ['repotting mat', 'waterproof', 'portable', 'foldable', 'green']\n    \n    \n    \n\n\n\n<img src=\"https://m.media-amazon.com/images/I/61vz1IglerL._SS522_.jpg\"/>\n\n\n    ['doormat', 'absorbent', 'non-slip', 'coconut fiber', 'welcome', 'pickleball', 'outdoor']\n    \n    \n    \n\n\n\n<img src=\"https://m.media-amazon.com/images/I/41p4d4VJnNL._SS522_.jpg\"/>\n\n\n    ['tv tray', 'foldable', 'metal', 'grey']\n    \n    \n    \n\n\n### Looking up existing keywords\n\nUsing embeddings to avoid duplicates (synonyms) and/or match pre-defined keywords\n\n\n```python\n# Feel free to change the embedding model here\ndef get_embedding(value, model=\"text-embedding-3-large\"): \n    embeddings = client.embeddings.create(\n      model=model,\n      input=value,\n      encoding_format=\"float\"\n    )\n    return embeddings.data[0].embedding\n```\n\n#### Testing with example keywords\n\n\n```python\n# Existing keywords\nkeywords_list = ['industrial', 'metal', 'wood', 'vintage', 'bed']\n```\n\n\n```python\ndf_keywords = pd.DataFrame(keywords_list, columns=['keyword'])\ndf_keywords['embedding'] = df_keywords['keyword'].apply(lambda x: get_embedding(x))\ndf_keywords\n```\n\n\n\n\n<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>keyword</th>\n      <th>embedding</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>industrial</td>\n      <td>[-0.026137426, 0.021297162, -0.007273361, -0.0...</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>metal</td>\n      <td>[-0.020492474, 0.0044436487, -0.0110632675, -0...</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>wood</td>\n      <td>[0.013840097, 0.029538965, 0.00064718135, -0.0...</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>vintage</td>\n      <td>[-0.052348174, 0.008181616, -0.015513194, 0.00...</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>bed</td>\n      <td>[-0.011677503, 0.023275835, 0.0026937425, -0.0...</td>\n    </tr>\n  </tbody>\n</table>\n</div>"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 7958aaf8-5661-4e79-a434-e2968cbb78f1
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"7958aaf8-5661-4e79-a434-e2968cbb78f1\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7c41df11-2363-4978-8729-d920172ef747\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2bfbfe8e4f81ca602f6be8c890a6855543aa0785719ad41e6d3bee2491e3865d\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"dd1eab25-06ba-4b47-806d-3bbba1a8f884\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"4e32495f6951dbde0efd538ceea9d98a2c436c2a71d80861482f724b1cb02d8d\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 11935, \"end_char_idx\": 13903, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "```python\ndef compare_keyword(keyword):\n    embedded_value = get_embedding(keyword)\n    df_keywords['similarity'] = df_keywords['embedding'].apply(lambda x: cosine_similarity(np.array(x).reshape(1,-1), np.array(embedded_value).reshape(1, -1)))\n    most_similar = df_keywords.sort_values('similarity', ascending=False).iloc[0]\n    return most_similar\n\ndef replace_keyword(keyword, threshold = 0.6):\n    most_similar = compare_keyword(keyword)\n    if most_similar['similarity'] > threshold:\n        print(f\"Replacing '{keyword}' with existing keyword: '{most_similar['keyword']}'\")\n        return most_similar['keyword']\n    return keyword\n```\n\n\n```python\n# Example keywords to compare to our list of existing keywords\nexample_keywords = ['bed frame', 'wooden', 'vintage', 'old school', 'desk', 'table', 'old', 'metal', 'metallic', 'woody']\nfinal_keywords = []\n\nfor k in example_keywords:\n    final_keywords.append(replace_keyword(k))\n    \nfinal_keywords = set(final_keywords)\nprint(f\"Final keywords: {final_keywords}\")\n```\n\n    Replacing 'bed frame' with existing keyword: 'bed'\n    Replacing 'wooden' with existing keyword: 'wood'\n    Replacing 'vintage' with existing keyword: 'vintage'\n    Replacing 'metal' with existing keyword: 'metal'\n    Replacing 'metallic' with existing keyword: 'metal'\n    Replacing 'woody' with existing keyword: 'wood'\n    Final keywords: {'vintage', 'desk', 'wood', 'table', 'old', 'bed', 'metal', 'old school'}\n\n\n## Generate captions\n\nIn this section, we'll use GPT-4o mini to generate an image description and then use a few-shot examples approach with GPT-4-turbo to generate captions from the images.\n\nIf few-shot examples are not enough for your use case, consider fine-tuning a model to get the generated captions to match the style & tone you are targeting. \n\n\n```python\n# Cleaning up dataset columns\nselected_columns = ['title', 'primary_image', 'style', 'material', 'color', 'url']\ndf = df[selected_columns].copy()\ndf.head()\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: dd1eab25-06ba-4b47-806d-3bbba1a8f884
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"dd1eab25-06ba-4b47-806d-3bbba1a8f884\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7958aaf8-5661-4e79-a434-e2968cbb78f1\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"ce8929a84566c2a56e6765ae1abe24b66d97d7f7dcc47eea9ab877e0804907c6\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"80165784-a990-4889-b4f4-cd4a637dbd2b\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"ab8f0be8c62138c2ba86e8e8230829e26ef08e354998f8c59879248fceb54507\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 12579, \"end_char_idx\": 15880, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "```python\n# Example keywords to compare to our list of existing keywords\nexample_keywords = ['bed frame', 'wooden', 'vintage', 'old school', 'desk', 'table', 'old', 'metal', 'metallic', 'woody']\nfinal_keywords = []\n\nfor k in example_keywords:\n    final_keywords.append(replace_keyword(k))\n    \nfinal_keywords = set(final_keywords)\nprint(f\"Final keywords: {final_keywords}\")\n```\n\n    Replacing 'bed frame' with existing keyword: 'bed'\n    Replacing 'wooden' with existing keyword: 'wood'\n    Replacing 'vintage' with existing keyword: 'vintage'\n    Replacing 'metal' with existing keyword: 'metal'\n    Replacing 'metallic' with existing keyword: 'metal'\n    Replacing 'woody' with existing keyword: 'wood'\n    Final keywords: {'vintage', 'desk', 'wood', 'table', 'old', 'bed', 'metal', 'old school'}\n\n\n## Generate captions\n\nIn this section, we'll use GPT-4o mini to generate an image description and then use a few-shot examples approach with GPT-4-turbo to generate captions from the images.\n\nIf few-shot examples are not enough for your use case, consider fine-tuning a model to get the generated captions to match the style & tone you are targeting. \n\n\n```python\n# Cleaning up dataset columns\nselected_columns = ['title', 'primary_image', 'style', 'material', 'color', 'url']\ndf = df[selected_columns].copy()\ndf.head()\n```\n\n\n\n\n<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>title</th>\n      <th>primary_image</th>\n      <th>style</th>\n      <th>material</th>\n      <th>color</th>\n      <th>url</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>GOYMFK 1pc Free Standing Shoe Rack, Multi-laye...</td>\n      <td>https://m.media-amazon.com/images/I/416WaLx10j...</td>\n      <td>Modern</td>\n      <td>Metal</td>\n      <td>White</td>\n      <td>https://www.amazon.com/dp/B0CJHKVG6P</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>subrtex Leather ding Room, Dining Chairs Set o...</td>\n      <td>https://m.media-amazon.com/images/I/31SejUEWY7...</td>\n      <td>Black Rubber Wood</td>\n      <td>Sponge</td>\n      <td>Black</td>\n      <td>https://www.amazon.com/dp/B0B66QHB23</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>Plant Repotting Mat MUYETOL Waterproof Transpl...</td>\n      <td>https://m.media-amazon.com/images/I/41RgefVq70...</td>\n      <td>Modern</td>\n      <td>Polyethylene</td>\n      <td>Green</td>\n      <td>https://www.amazon.com/dp/B0BXRTWLYK</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>Pickleball Doormat, Welcome Doormat Absorbent ...</td>\n      <td>https://m.media-amazon.com/images/I/61vz1Igler...</td>\n      <td>Modern</td>\n      <td>Rubber</td>\n      <td>A5589</td>\n      <td>https://www.amazon.com/dp/B0C1MRB2M8</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>JOIN IRON Foldable TV Trays for Eating Set of ...</td>\n      <td>https://m.media-amazon.com/images/I/41p4d4VJnN...</td>\n      <td>X Classic Style</td>\n      <td>Iron</td>\n      <td>Grey Set of 4</td>\n      <td>https://www.amazon.com/dp/B0CG1N9QRC</td>\n    </tr>\n  </tbody>\n</table>\n</div>"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 80165784-a990-4889-b4f4-cd4a637dbd2b
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"80165784-a990-4889-b4f4-cd4a637dbd2b\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"dd1eab25-06ba-4b47-806d-3bbba1a8f884\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"cc510171896f5f317f7d2dc28a109a6c4dec38f0a4b0ee780306a2532ec1ef1c\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b57c7436-8c49-46ec-9b18-0026782759af\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"db39761c53bdb25b65353af7eebfb56b3520d5a799d85a0078c52425ef93e58b\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 15884, \"end_char_idx\": 17150, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "### Describing images with GPT-4o mini\n\n\n```python\ndescribe_system_prompt = '''\n    You are a system generating descriptions for furniture items, decorative items, or furnishings on an e-commerce website.\n    Provided with an image and a title, you will describe the main item that you see in the image, giving details but staying concise.\n    You can describe unambiguously what the item is and its material, color, and style if clearly identifiable.\n    If there are multiple items depicted, refer to the title to understand which item you should describe.\n    '''\n\ndef describe_image(img_url, title):\n    response = client.chat.completions.create(\n    model=\"gpt-4o-mini\",\n    temperature=0.2,\n    messages=[\n        {\n            \"role\": \"system\",\n            \"content\": describe_system_prompt\n        },\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"image_url\",\n                    \"image_url\": {\n                        \"url\": img_url,\n                    }\n                },\n            ],\n        },\n        {\n            \"role\": \"user\",\n            \"content\": title\n        }\n    ],\n    max_tokens=300,\n    )\n\n    return response.choices[0].message.content\n```\n\n#### Testing on a few examples"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: b57c7436-8c49-46ec-9b18-0026782759af
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"b57c7436-8c49-46ec-9b18-0026782759af\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"80165784-a990-4889-b4f4-cd4a637dbd2b\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"18658ea2e53aefc937da48a535f50dd68f52f962ccfbe40955a66bed40d5870e\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"6a41e4a1-c7c4-4635-b024-ef02158920cb\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"3206b7aa7ccc883300621a716574f0560b608bc87142bba4797285ab640a381e\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 15884, \"end_char_idx\": 20204, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "### Describing images with GPT-4o mini\n\n\n```python\ndescribe_system_prompt = '''\n    You are a system generating descriptions for furniture items, decorative items, or furnishings on an e-commerce website.\n    Provided with an image and a title, you will describe the main item that you see in the image, giving details but staying concise.\n    You can describe unambiguously what the item is and its material, color, and style if clearly identifiable.\n    If there are multiple items depicted, refer to the title to understand which item you should describe.\n    '''\n\ndef describe_image(img_url, title):\n    response = client.chat.completions.create(\n    model=\"gpt-4o-mini\",\n    temperature=0.2,\n    messages=[\n        {\n            \"role\": \"system\",\n            \"content\": describe_system_prompt\n        },\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"image_url\",\n                    \"image_url\": {\n                        \"url\": img_url,\n                    }\n                },\n            ],\n        },\n        {\n            \"role\": \"user\",\n            \"content\": title\n        }\n    ],\n    max_tokens=300,\n    )\n\n    return response.choices[0].message.content\n```\n\n#### Testing on a few examples\n\n\n```python\nfor index, row in examples.iterrows():\n    print(f\"{row['title'][:50]}{'...' if len(row['title']) > 50 else ''} - {row['url']} :\\n\")\n    img_description = describe_image(row['primary_image'], row['title'])\n    print(f\"{img_description}\\n--------------------------\\n\")\n```\n\n    GOYMFK 1pc Free Standing Shoe Rack, Multi-layer Me... - https://www.amazon.com/dp/B0CJHKVG6P :\n    \n    The item is a free-standing shoe rack designed for versatile use in living rooms, bathrooms, or hallways. It features a multi-layer metal structure with a sleek white finish. The rack includes eight double hooks at the top for hanging accessories like hats, bags, or scarves. Below, there are multiple shelves that provide ample space for organizing shoes, making it both functional and stylish for entryway storage.\n    --------------------------\n    \n    subrtex Leather ding Room, Dining Chairs Set of 2,... - https://www.amazon.com/dp/B0B66QHB23 :\n    \n    The Subrtex Leather Dining Chairs come in a set of two, featuring a sleek black design. Each chair is upholstered in durable faux leather, offering a modern and stylish look. The high backrest is accentuated with subtle vertical stitching, while the sturdy wooden legs provide stability and support. These chairs are ideal for enhancing the aesthetic of any dining room.\n    --------------------------\n    \n    Plant Repotting Mat MUYETOL Waterproof Transplanti... - https://www.amazon.com/dp/B0BXRTWLYK :\n    \n    The Plant Repotting Mat is a portable and foldable gardening accessory, measuring 26.8\" x 26.8\". It features a vibrant green color with black edges, designed to be waterproof for easy cleanup during soil changes. The mat provides a spacious area for repotting plants and comes with tools for transplanting. Ideal for indoor gardening, it helps keep your workspace tidy while you care for your succulents and other plants.\n    --------------------------\n    \n    Pickleball Doormat, Welcome Doormat Absorbent Non-... - https://www.amazon.com/dp/B0C1MRB2M8 :\n    \n    The Pickleball Doormat features a natural coir material with a rectangular shape, measuring 16x24 inches. It showcases a playful design with the phrase \"It's a good day to play PICKLEBALL\" in bold black lettering, accompanied by graphic illustrations of pickleball paddles. The mat is designed to be absorbent and non-slip, making it suitable for entryways or bathrooms. Its light brown color adds a warm touch to any space.\n    --------------------------\n    \n    JOIN IRON Foldable TV Trays for Eating Set of 4 wi... - https://www.amazon.com/dp/B0CG1N9QRC :\n    \n    The JOIN IRON Foldable TV Trays set includes four sleek, grey snack tables designed for convenience and space-saving. Each tray features a sturdy, flat surface supported by a durable metal frame, allowing for easy folding and storage. The minimalist design makes them ideal for small spaces, perfect for enjoying meals or snacks while watching TV. The set also comes with a stand for organized storage when not in use.\n    --------------------------"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 6a41e4a1-c7c4-4635-b024-ef02158920cb
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"6a41e4a1-c7c4-4635-b024-ef02158920cb\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"b57c7436-8c49-46ec-9b18-0026782759af\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"192950bf3f9d4d2f337b5f0fe212bc56a7d6a81d4f2b1a14d0b836b2b20809da\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"8ff831dd-074d-40bf-af68-ba752926a6ee\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"149efdecaa0a6e636983084638984687b2a3357a614397e9110f6081cf0af020\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 20212, \"end_char_idx\": 23971, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "### Turning descriptions into captions\nUsing a few-shot examples approach to turn a long description into a short image caption\n\n\n```python\ncaption_system_prompt = '''\nYour goal is to generate short, descriptive captions for images of furniture items, decorative items, or furnishings based on an image description.\nYou will be provided with a description of an item image and you will output a caption that captures the most important information about the item.\nYour generated caption should be short (1 sentence), and include the most relevant information about the item.\nThe most important information could be: the type of the item, the style (if mentioned), the material if especially relevant and any distinctive features.\n'''\n\nfew_shot_examples = [\n    {\n        \"description\": \"This is a multi-layer metal shoe rack featuring a free-standing design. It has a clean, white finish that gives it a modern and versatile look, suitable for various home decors. The rack includes several horizontal shelves dedicated to organizing shoes, providing ample space for multiple pairs. Above the shoe storage area, there are 8 double hooks arranged in two rows, offering additional functionality for hanging items such as hats, scarves, or bags. The overall structure is sleek and space-saving, making it an ideal choice for placement in living rooms, bathrooms, hallways, or entryways where efficient use of space is essential.\",\n        \"caption\": \"White metal free-standing shoe rack\"\n    },\n    {\n        \"description\": \"The image shows a set of two dining chairs in black. These chairs are upholstered in a leather-like material, giving them a sleek and sophisticated appearance. The design features straight lines with a slight curve at the top of the high backrest, which adds a touch of elegance. The chairs have a simple, vertical stitching detail on the backrest, providing a subtle decorative element. The legs are also black, creating a uniform look that would complement a contemporary dining room setting. The chairs appear to be designed for comfort and style, suitable for both casual and formal dining environments.\",\n        \"caption\": \"Set of 2 modern black leather dining chairs\"\n    },\n    {\n        \"description\": \"This is a square plant repotting mat designed for indoor gardening tasks such as transplanting and changing soil for plants. It measures 26.8 inches by 26.8 inches and is made from a waterproof material, which appears to be a durable, easy-to-clean fabric in a vibrant green color. The edges of the mat are raised with integrated corner loops, likely to keep soil and water contained during gardening activities. The mat is foldable, enhancing its portability, and can be used as a protective surface for various gardening projects, including working with succulents. It's a practical accessory for garden enthusiasts and makes for a thoughtful gift for those who enjoy indoor plant care.\",\n        \"caption\": \"Waterproof square plant repotting mat\"\n    }\n]\n\nformatted_examples = [[{\n    \"role\": \"user\",\n    \"content\": ex['description']\n},\n{\n    \"role\": \"assistant\", \n    \"content\": ex['caption']\n}]\n    for ex in few_shot_examples\n]\n\nformatted_examples = [i for ex in formatted_examples for i in ex]\n```\n\n\n```python\ndef caption_image(description, model=\"gpt-4o-mini\"):\n    messages = formatted_examples\n    messages.insert(0, \n        {\n            \"role\": \"system\",\n            \"content\": caption_system_prompt\n        })\n    messages.append(\n        {\n            \"role\": \"user\",\n            \"content\": description\n        })\n    response = client.chat.completions.create(\n    model=model,\n    temperature=0.2,\n    messages=messages\n    )\n\n    return response.choices[0].message.content\n```\n\n#### Testing on a few examples"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 8ff831dd-074d-40bf-af68-ba752926a6ee
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"8ff831dd-074d-40bf-af68-ba752926a6ee\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"6a41e4a1-c7c4-4635-b024-ef02158920cb\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"5d35d7a7c8fd2f0b24ac8862eeab02d74178aab1618a373d2181cba8130f0536\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"8e06c5e8-8187-47c8-b4f9-237ffdc2e41d\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"16087b068e485932bc2ca4c49e815813d42f45abd758cc9ebe1c6aec1269e051\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 23453, \"end_char_idx\": 27003, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "```python\ndef caption_image(description, model=\"gpt-4o-mini\"):\n    messages = formatted_examples\n    messages.insert(0, \n        {\n            \"role\": \"system\",\n            \"content\": caption_system_prompt\n        })\n    messages.append(\n        {\n            \"role\": \"user\",\n            \"content\": description\n        })\n    response = client.chat.completions.create(\n    model=model,\n    temperature=0.2,\n    messages=messages\n    )\n\n    return response.choices[0].message.content\n```\n\n#### Testing on a few examples\n\n\n```python\nexamples = df.iloc[5:8]\n```\n\n\n```python\nfor index, row in examples.iterrows():\n    print(f\"{row['title'][:50]}{'...' if len(row['title']) > 50 else ''} - {row['url']} :\\n\")\n    img_description = describe_image(row['primary_image'], row['title'])\n    print(f\"{img_description}\\n--------------------------\\n\")\n    img_caption = caption_image(img_description)\n    print(f\"{img_caption}\\n--------------------------\\n\")\n```\n\n    LOVMOR 30'' Bathroom Vanity Sink Base Cabine, Stor... - https://www.amazon.com/dp/B0C9WYYFLB :\n    \n    The LOVMOR 30'' Bathroom Vanity Sink Base Cabinet features a classic design with a rich brown finish. It includes three drawers on the left side for ample storage, complemented by a spacious cabinet door on the right. The cabinet is constructed with detailed paneling, adding a touch of elegance, making it suitable for bathrooms, kitchens, laundry rooms, and more. Its versatile style allows it to blend seamlessly into various decor themes.\n    --------------------------\n    \n    Classic 30'' brown bathroom vanity sink base cabinet with storage drawers.\n    --------------------------\n    \n    Folews Bathroom Organizer Over The Toilet Storage,... - https://www.amazon.com/dp/B09NZY3R1T :\n    \n    The Folews Bathroom Organizer is a freestanding, 4-tier storage rack designed to fit over a toilet. It features a sleek black metal frame with adjustable shelves, allowing for customizable storage options. The shelves are made of wire, providing a modern look while ensuring durability. This organizer includes baskets for additional storage and is ideal for maximizing bathroom space by holding toiletries, towels, and other essentials. Its design is both functional and stylish, making it a great addition to any bathroom.\n    --------------------------\n    \n    Freestanding 4-tier black metal bathroom organizer with adjustable wire shelves and baskets.\n    --------------------------\n    \n    GOYMFK 1pc Free Standing Shoe Rack, Multi-layer Me... - https://www.amazon.com/dp/B0CJHKVG6P :\n    \n    The GOYMFK Free Standing Shoe Rack is a versatile storage solution designed for various spaces like living rooms, bathrooms, or hallways. It features a multi-layer metal construction with a sleek white finish. The rack includes eight double hooks at the top for hanging items such as hats, bags, or scarves. Below, there are multiple shelves for organizing shoes, accommodating various styles and sizes. Its modern design combines functionality with a clean aesthetic, making it a practical addition to any home.\n    --------------------------\n    \n    Versatile white metal free-standing shoe rack with hooks and multiple shelves.\n    --------------------------\n    \n\n\n## Image search\n\nIn this section, we will use generated keywords and captions to search items that match a given input, either text or image.\n\nWe will leverage our embeddings model to generate embeddings for the keywords and captions and compare them to either input text or the generated caption from an input image."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 8e06c5e8-8187-47c8-b4f9-237ffdc2e41d
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"8e06c5e8-8187-47c8-b4f9-237ffdc2e41d\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"8ff831dd-074d-40bf-af68-ba752926a6ee\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"58dbde861e9afbd6189f01770ae8fe14ef757234dfc8c1c68624ee4fb7582454\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b2848eb9-f83e-4ac9-bc96-51988c179f4c\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"48c6b31bc160182ee09b0a9c789fb8a8b5d868759af12f4abdab20c78eb386c8\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "## Image search\n\nIn this section, we will use generated keywords and captions to search items that match a given input, either text or image.\n\nWe will leverage our embeddings model to generate embeddings for the keywords and captions and compare them to either input text or the generated caption from an input image.\n\n\n```python\n# Df we'll use to compare keywords\ndf_keywords = pd.DataFrame(columns=['keyword', 'embedding'])\ndf['keywords'] = ''\ndf['img_description'] = ''\ndf['caption'] = ''\n```\n\n\n```python\n# Function to replace a keyword with an existing keyword if it's too similar\ndef get_keyword(keyword, df_keywords, threshold = 0.6):\n    embedded_value = get_embedding(keyword)\n    df_keywords['similarity'] = df_keywords['embedding'].apply(lambda x: cosine_similarity(np.array(x).reshape(1,-1), np.array(embedded_value).reshape(1, -1)))\n    sorted_keywords = df_keywords.copy().sort_values('similarity', ascending=False)\n    if len(sorted_keywords) > 0 :\n        most_similar = sorted_keywords.iloc[0]\n        if most_similar['similarity'] > threshold:\n            print(f\"Replacing '{keyword}' with existing keyword: '{most_similar['keyword']}'\")\n            return most_similar['keyword']\n    new_keyword = {\n        'keyword': keyword,\n        'embedding': embedded_value\n    }\n    df_keywords = pd.concat([df_keywords, pd.DataFrame([new_keyword])], ignore_index=True)\n    return keyword\n```\n\n### Preparing the dataset\n\n\n```python\nimport ast\n\ndef tag_and_caption(row):\n    keywords = analyze_image(row['primary_image'], row['title'])\n    try:\n        keywords = ast.literal_eval(keywords)\n        mapped_keywords = [get_keyword(k, df_keywords) for k in keywords]\n    except Exception as e:\n        print(f\"Error parsing keywords: {keywords}\")\n        mapped_keywords = []\n    img_description = describe_image(row['primary_image'], row['title'])\n    caption = caption_image(img_description)\n    return {\n        'keywords': mapped_keywords,\n        'img_description': img_description,\n        'caption': caption\n    }\n\n```\n\n\n```python\ndf.shape\n```\n\n\n\n\n    (312, 9)\n\n\n\nProcessing all 312 lines of the dataset will take a while.\nTo test out the idea, we will only run it on the first 50 lines: this takes ~20 mins. \nFeel free to skip this step and load the already processed dataset (see below).\n\n\n```python\n# Running on first 50 lines\nfor index, row in df[:50].iterrows():\n    print(f\"{index} - {row['title'][:50]}{'.' if len(row['title']) > 50 else ''}\")\n    updates = tag_and_caption(row)\n    df.loc[index, updates.keys()] = updates.values()\n```\n\n    0 - GOYMFK 1pc Free Standing Shoe Rack, Multi-layer Me.\n    1 - subrtex Leather ding Room, Dining Chairs Set of 2,\n    2 - Plant Repotting Mat MUYETOL Waterproof Transplanti.\n    3 - Pickleball Doormat, Welcome Doormat Absorbent Non-.\n    4 - JOIN IRON Foldable TV Trays for Eating Set of 4 wi.\n    5 - LOVMOR 30'' Bathroom Vanity Sink Base Cabine, Stor.\n    6 - Folews Bathroom Organizer Over The Toilet Storage,\n    7 - GOYMFK 1pc Free Standing Shoe Rack, Multi-layer Me.\n    8 - subrtex Leather ding Room,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: b2848eb9-f83e-4ac9-bc96-51988c179f4c
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"b2848eb9-f83e-4ac9-bc96-51988c179f4c\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"8e06c5e8-8187-47c8-b4f9-237ffdc2e41d\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"f7aefc63083622ae59ea3150f2a0f550a326260725db57b4d0fbe293b1f46dbd\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f94378f7-55ea-457e-aeff-c806bb6b30d0\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"c0b225f0750c9b6bd820b390704e862549f24e8462b7a269543c51c2ca887ea8\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "```python\ndf.shape\n```\n\n\n\n\n    (312, 9)\n\n\n\nProcessing all 312 lines of the dataset will take a while.\nTo test out the idea, we will only run it on the first 50 lines: this takes ~20 mins. \nFeel free to skip this step and load the already processed dataset (see below).\n\n\n```python\n# Running on first 50 lines\nfor index, row in df[:50].iterrows():\n    print(f\"{index} - {row['title'][:50]}{'.' if len(row['title']) > 50 else ''}\")\n    updates = tag_and_caption(row)\n    df.loc[index, updates.keys()] = updates.values()\n```\n\n    0 - GOYMFK 1pc Free Standing Shoe Rack, Multi-layer Me.\n    1 - subrtex Leather ding Room, Dining Chairs Set of 2,\n    2 - Plant Repotting Mat MUYETOL Waterproof Transplanti.\n    3 - Pickleball Doormat, Welcome Doormat Absorbent Non-.\n    4 - JOIN IRON Foldable TV Trays for Eating Set of 4 wi.\n    5 - LOVMOR 30'' Bathroom Vanity Sink Base Cabine, Stor.\n    6 - Folews Bathroom Organizer Over The Toilet Storage,\n    7 - GOYMFK 1pc Free Standing Shoe Rack, Multi-layer Me.\n    8 - subrtex Leather ding Room, Dining Chairs Set of 2,\n    9 - Plant Repotting Mat MUYETOL Waterproof Transplanti.\n    10 - Pickleball Doormat, Welcome Doormat Absorbent Non-.\n    11 - JOIN IRON Foldable TV Trays for Eating Set of 4 wi.\n    12 - LOVMOR 30'' Bathroom Vanity Sink Base Cabine, Stor.\n    13 - Folews Bathroom Organizer Over The Toilet Storage,\n    14 - Lerliuo Nightstand, Side Table, Industrial Bedside.\n    15 - Boss Office Products Any Task Mid-Back Task Chair .\n    16 - Kingston Brass BA1752BB Heritage 18-Inch Towel-Bar.\n    17 - Chief Mfg.Swing-Arm Wall Mount Hardware Mount Blac.\n    18 - DOMYDEVM Black End Table, Nightstand with Charging.\n    19 - LASCO 35-5019 Hallmack Style 24-Inch Towel Bar Acc.\n    20 - Table-Mate II PRO TV Tray Table - Folding Table wi.\n    21 - EGFheal White Dress Up Storage\n    22 - Caroline's Treasures PPD3013JMAT Enchanted Garden .\n    23 - Leick Home 70007-WTGD Mixed Metal and Wood Stepped.\n    24 - Caroline's Treasures CK3435MAT Bichon Frise Doorma.\n    25 - Wildkin Kids Canvas Sling Bookshelf with Storage f.\n    26 - Gbuzozie 38L Round Laundry Hamper Cute Mermaid Gir.\n    27 - Tiita Comfy Saucer Chair, Soft Faux Fur Oversized .\n    28 - Summer Desk Decor,Welcome Summer Wood Block Sign D.\n    29 - Homebeez 39.1\" Length Bedroom Storage Bench, End B.\n    30 - Flash Furniture Webb Commercial Grade 24\" Round Bl.\n    31 - Mellow 2 Inch Ventilated Memory Foam Mattress Topp."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: f94378f7-55ea-457e-aeff-c806bb6b30d0
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f94378f7-55ea-457e-aeff-c806bb6b30d0\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"b2848eb9-f83e-4ac9-bc96-51988c179f4c\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"17b1e1547bf60ba95e13f1086fe3f8dae4b26c5c46b1fef6a9a9e17c065b3305\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"abcfb315-ac36-4e3d-8a06-83b256ba86fa\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"5b6d284b05c0d2e50df9709603e6226ca22438cd7c92030934a481f44063e7d9\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "11 - JOIN IRON Foldable TV Trays for Eating Set of 4 wi.\n    12 - LOVMOR 30'' Bathroom Vanity Sink Base Cabine, Stor.\n    13 - Folews Bathroom Organizer Over The Toilet Storage,\n    14 - Lerliuo Nightstand, Side Table, Industrial Bedside.\n    15 - Boss Office Products Any Task Mid-Back Task Chair .\n    16 - Kingston Brass BA1752BB Heritage 18-Inch Towel-Bar.\n    17 - Chief Mfg.Swing-Arm Wall Mount Hardware Mount Blac.\n    18 - DOMYDEVM Black End Table, Nightstand with Charging.\n    19 - LASCO 35-5019 Hallmack Style 24-Inch Towel Bar Acc.\n    20 - Table-Mate II PRO TV Tray Table - Folding Table wi.\n    21 - EGFheal White Dress Up Storage\n    22 - Caroline's Treasures PPD3013JMAT Enchanted Garden .\n    23 - Leick Home 70007-WTGD Mixed Metal and Wood Stepped.\n    24 - Caroline's Treasures CK3435MAT Bichon Frise Doorma.\n    25 - Wildkin Kids Canvas Sling Bookshelf with Storage f.\n    26 - Gbuzozie 38L Round Laundry Hamper Cute Mermaid Gir.\n    27 - Tiita Comfy Saucer Chair, Soft Faux Fur Oversized .\n    28 - Summer Desk Decor,Welcome Summer Wood Block Sign D.\n    29 - Homebeez 39.1\" Length Bedroom Storage Bench, End B.\n    30 - Flash Furniture Webb Commercial Grade 24\" Round Bl.\n    31 - Mellow 2 Inch Ventilated Memory Foam Mattress Topp.\n    32 - CangLong Mid Century Modern Side Chair with Wood L.\n    33 - HomePop Metal Accent Table Triangle Base Round Mir.\n    34 - MAEPA RV Shoe Storage for Bedside - 8 Extra Large .\n    35 - NearMoon Hand Towel Holder/Towel Ring - Bathroom T.\n    36 - FLYJOE Narrow Side Table with PU Leather Magazine .\n    37 - HomePop Home Decor | K2380-YDQY-2 | Luxury Large F.\n    38 - Moroccan Leather Pouf Ottoman for Living Room - Ro.\n    39 - AnyDesign Christmas Welcome Doormat Decorative Xma.\n    40 - GXFC ZHAO Welcome Funny Door Mat Shoes and Bras Of.\n    41 - LEASYLIFE Black Metal Trash can,10L/2.6GAL,Open To.\n    42 - Solid Wood Wine Cabinet, bar Rack - Home Wood Furn.\n    43 - Black Leather Office Chair Mid Back Leather Desk C.\n    44 - Convenience Concepts Tucson Flip Top End Table wit.\n    45 - 3-Tier Kitchen Storage Cart with Handle, Multifunc.\n    46 - Mimoglad Office Chair, High Back Ergonomic Desk Ch.\n    47 - Let the Adventure Begin Door Mat 17\"x30\" Decorativ.\n    48 - 1 Pack Adjustable Height Center Support Leg for Be.\n    49 - Stylo Culture Traditional Cotton Patchwork Embroid.\n\n\n\n```python\ndf.head()\n```\n\n\n\n\n<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: abcfb315-ac36-4e3d-8a06-83b256ba86fa
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"abcfb315-ac36-4e3d-8a06-83b256ba86fa\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f94378f7-55ea-457e-aeff-c806bb6b30d0\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"11dffdd6384c80795efb91b4d169796f73b4e59f8c15fe6488627850bdfda630\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"eba9efe7-ced0-4bc0-ba04-2a9eaf8e64b0\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"b59159eeac6992e2950a632133b92117feeba7d135588254eb02637322d074d1\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "31 - Mellow 2 Inch Ventilated Memory Foam Mattress Topp.\n    32 - CangLong Mid Century Modern Side Chair with Wood L.\n    33 - HomePop Metal Accent Table Triangle Base Round Mir.\n    34 - MAEPA RV Shoe Storage for Bedside - 8 Extra Large .\n    35 - NearMoon Hand Towel Holder/Towel Ring - Bathroom T.\n    36 - FLYJOE Narrow Side Table with PU Leather Magazine .\n    37 - HomePop Home Decor | K2380-YDQY-2 | Luxury Large F.\n    38 - Moroccan Leather Pouf Ottoman for Living Room - Ro.\n    39 - AnyDesign Christmas Welcome Doormat Decorative Xma.\n    40 - GXFC ZHAO Welcome Funny Door Mat Shoes and Bras Of.\n    41 - LEASYLIFE Black Metal Trash can,10L/2.6GAL,Open To.\n    42 - Solid Wood Wine Cabinet, bar Rack - Home Wood Furn.\n    43 - Black Leather Office Chair Mid Back Leather Desk C.\n    44 - Convenience Concepts Tucson Flip Top End Table wit.\n    45 - 3-Tier Kitchen Storage Cart with Handle, Multifunc.\n    46 - Mimoglad Office Chair, High Back Ergonomic Desk Ch.\n    47 - Let the Adventure Begin Door Mat 17\"x30\" Decorativ.\n    48 - 1 Pack Adjustable Height Center Support Leg for Be.\n    49 - Stylo Culture Traditional Cotton Patchwork Embroid.\n\n\n\n```python\ndf.head()\n```\n\n\n\n\n<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>title</th>\n      <th>primary_image</th>\n      <th>style</th>\n      <th>material</th>\n      <th>color</th>\n      <th>url</th>\n      <th>keywords</th>\n      <th>img_description</th>\n      <th>caption</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>GOYMFK 1pc Free Standing Shoe Rack, Multi-laye.</td>\n      <td>https://m.media-amazon.com/images/I/416WaLx10j.</td>\n      <td>Modern</td>\n      <td>Metal</td>\n      <td>White</td>\n      <td>https://www.amazon.com/dp/B0CJHKVG6P</td>\n      <td>[shoe rack, metal, white, multi-layer, hooks]</td>\n      <td>The GOYMFK Free Standing Shoe Rack is a versat.</td>\n      <td>Sleek white multi-layer metal free-standing sh.</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>subrtex Leather ding Room, Dining Chairs Set o.</td>\n      <td>https://m.media-amazon.com/images/I/31SejUEWY7."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: eba9efe7-ced0-4bc0-ba04-2a9eaf8e64b0
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"eba9efe7-ced0-4bc0-ba04-2a9eaf8e64b0\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"abcfb315-ac36-4e3d-8a06-83b256ba86fa\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"1a4ec6997941bb6fe2ab4fb1d1ea715513c456306480d3f17ffc27b7c86cc79e\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"1c60c2b8-f180-4ea1-bc74-db8e1634f1c1\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"7d09a4b07eeb1646426980e88f1d01fa49c04d9b8bb39c23b5c9dbe0d369034e\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>title</th>\n      <th>primary_image</th>\n      <th>style</th>\n      <th>material</th>\n      <th>color</th>\n      <th>url</th>\n      <th>keywords</th>\n      <th>img_description</th>\n      <th>caption</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>GOYMFK 1pc Free Standing Shoe Rack, Multi-laye.</td>\n      <td>https://m.media-amazon.com/images/I/416WaLx10j.</td>\n      <td>Modern</td>\n      <td>Metal</td>\n      <td>White</td>\n      <td>https://www.amazon.com/dp/B0CJHKVG6P</td>\n      <td>[shoe rack, metal, white, multi-layer, hooks]</td>\n      <td>The GOYMFK Free Standing Shoe Rack is a versat.</td>\n      <td>Sleek white multi-layer metal free-standing sh.</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>subrtex Leather ding Room, Dining Chairs Set o.</td>\n      <td>https://m.media-amazon.com/images/I/31SejUEWY7.</td>\n      <td>Black Rubber Wood</td>\n      <td>Sponge</td>\n      <td>Black</td>\n      <td>https://www.amazon.com/dp/B0B66QHB23</td>\n      <td>[dining chair, leather, black]</td>\n      <td>The Subrtex Leather Dining Chairs come in a se.</td>\n      <td>Set of 2 modern black faux leather dining chai.</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>Plant Repotting Mat MUYETOL Waterproof Transpl.</td>\n      <td>https://m.media-amazon.com/images/I/41RgefVq70.</td>\n      <td>Modern</td>\n      <td>Polyethylene</td>\n      <td>Green</td>\n      <td>https://www.amazon.com/dp/B0BXRTWLYK</td>\n      <td>[repotting mat, waterproof, portable, foldable.</td>\n      <td>The Plant Repotting Mat is a portable and fold.</td>\n      <td>Vibrant green waterproof plant repotting mat</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>Pickleball Doormat, Welcome Doormat Absorbent .</td>\n      <td>https://m.media-amazon.com/images/I/61vz1Igler.</td>\n      <td>Modern</td>\n      <td>Rubber</td>\n      <td>A5589</td>\n      <td>https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 1c60c2b8-f180-4ea1-bc74-db8e1634f1c1
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"1c60c2b8-f180-4ea1-bc74-db8e1634f1c1\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"eba9efe7-ced0-4bc0-ba04-2a9eaf8e64b0\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"c09383b3be0ce737db6c22f82917598b8e2918ee3f922194902c4d926b45a2b5\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"24ea6991-92ab-4167-94f0-de32a78684e5\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"014a4dd705886fba849f80e7d59559488811cc54d3b5ea22c616706a25dd83b8\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "Dining Chairs Set o.</td>\n      <td>https://m.media-amazon.com/images/I/31SejUEWY7.</td>\n      <td>Black Rubber Wood</td>\n      <td>Sponge</td>\n      <td>Black</td>\n      <td>https://www.amazon.com/dp/B0B66QHB23</td>\n      <td>[dining chair, leather, black]</td>\n      <td>The Subrtex Leather Dining Chairs come in a se.</td>\n      <td>Set of 2 modern black faux leather dining chai.</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>Plant Repotting Mat MUYETOL Waterproof Transpl.</td>\n      <td>https://m.media-amazon.com/images/I/41RgefVq70.</td>\n      <td>Modern</td>\n      <td>Polyethylene</td>\n      <td>Green</td>\n      <td>https://www.amazon.com/dp/B0BXRTWLYK</td>\n      <td>[repotting mat, waterproof, portable, foldable.</td>\n      <td>The Plant Repotting Mat is a portable and fold.</td>\n      <td>Vibrant green waterproof plant repotting mat</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>Pickleball Doormat, Welcome Doormat Absorbent .</td>\n      <td>https://m.media-amazon.com/images/I/61vz1Igler.</td>\n      <td>Modern</td>\n      <td>Rubber</td>\n      <td>A5589</td>\n      <td>https://www.amazon.com/dp/B0C1MRB2M8</td>\n      <td>[doormat, absorbent, non-slip, coconut fiber, .</td>\n      <td>The Pickleball Doormat is a charming welcome m.</td>\n      <td>Coir welcome mat featuring a playful \"It's a g.</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>JOIN IRON Foldable TV Trays for Eating Set of .</td>\n      <td>https://m.media-amazon.com/images/I/41p4d4VJnN.</td>\n      <td>X Classic Style</td>\n      <td>Iron</td>\n      <td>Grey Set of 4</td>\n      <td>https://www.amazon.com/dp/B0CG1N9QRC</td>\n      <td>[tv tray, foldable, metal, grey]</td>\n      <td>The JOIN IRON Foldable TV Tray Set includes fo.</td>\n      <td>Set of 4 foldable grey TV trays with durable b.</td>\n    </tr>\n  </tbody>\n</table>\n</div>\n\n\n\n\n```python\ndata_path = \"data/items_tagged_and_captioned.csv\"\n```\n\n\n```python\n# Saving locally for later - optional: do not execute if you prefer to use the provided file\ndf.to_csv(data_path, index=False)\n```"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 24ea6991-92ab-4167-94f0-de32a78684e5
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"24ea6991-92ab-4167-94f0-de32a78684e5\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"1c60c2b8-f180-4ea1-bc74-db8e1634f1c1\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"f2f7b41cce6db054cef1a5653624860d6e5b598a792fed0b2aa40370eace8098\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"66a6b84d-d9a2-425a-bca9-074abd605b21\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"2fb8c9d17474f1e6191d5282584addebf1a65f30053a4879674fb7187b156035\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "Welcome Doormat Absorbent .</td>\n      <td>https://m.media-amazon.com/images/I/61vz1Igler.</td>\n      <td>Modern</td>\n      <td>Rubber</td>\n      <td>A5589</td>\n      <td>https://www.amazon.com/dp/B0C1MRB2M8</td>\n      <td>[doormat, absorbent, non-slip, coconut fiber, .</td>\n      <td>The Pickleball Doormat is a charming welcome m.</td>\n      <td>Coir welcome mat featuring a playful \"It's a g.</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>JOIN IRON Foldable TV Trays for Eating Set of .</td>\n      <td>https://m.media-amazon.com/images/I/41p4d4VJnN.</td>\n      <td>X Classic Style</td>\n      <td>Iron</td>\n      <td>Grey Set of 4</td>\n      <td>https://www.amazon.com/dp/B0CG1N9QRC</td>\n      <td>[tv tray, foldable, metal, grey]</td>\n      <td>The JOIN IRON Foldable TV Tray Set includes fo.</td>\n      <td>Set of 4 foldable grey TV trays with durable b.</td>\n    </tr>\n  </tbody>\n</table>\n</div>\n\n\n\n\n```python\ndata_path = \"data/items_tagged_and_captioned.csv\"\n```\n\n\n```python\n# Saving locally for later - optional: do not execute if you prefer to use the provided file\ndf.to_csv(data_path, index=False)\n```\n\n\n```python\n# Optional: load data from saved file if you haven't processed the whole dataset\ndf = pd.read_csv(data_path)\n```\n\n### Embedding captions and keywords\nWe can now use the generated captions and keywords to match relevant content to an input text query or caption. \nTo do this, we will embed a combination of keywords + captions.\nNote: creating the embeddings will take ~3 mins to run. Feel free to load the pre-processed dataset (see below).\n\n\n```python\ndf_search = df.copy()\n```\n\n\n```python\ndef embed_tags_caption(x):\n    if x['caption'] != '':\n        try:\n            keywords_string = \",\".join(k for k in x['keywords']) + '\\n'\n            content = keywords_string + x['caption']\n            embedding = get_embedding(content)\n            return embedding\n        except Exception as e:\n            print(f\"Error creating embedding for {x}: {e}\")\n```\n\n\n```python\ndf_search['embedding'] = df_search.apply(lambda x: embed_tags_caption(x), axis=1)\n```\n\n    Error creating embedding for title              Suptsifira Shoe storage box, 24 Packs Shoe Box.\n    primary_image      https://m.media-amazon.com/images/I/51enKGSxK8.\n    style                                                            NaN\n    material                                                   Porcelain\n    color                                                          White\n    url                             https://www.amazon.com/dp/B0BZ85JVBN\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 50, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Wellynap Computer Desk,31.5 inches Folding Tab.\n    primary_image      https://m.media-amazon.com/images/I/51pO-N48te."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 66a6b84d-d9a2-425a-bca9-074abd605b21
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"66a6b84d-d9a2-425a-bca9-074abd605b21\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"24ea6991-92ab-4167-94f0-de32a78684e5\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"787144395df29c803dfe55f1ed70faae58a93ca7260961557d6fe2e6f0517cb0\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7f0e82e0-3583-4101-9bd7-f859a799f5d0\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"99972be17c2f6140863e1ce8c554239bafd4bf59b6e1a6db2c69027661cf0c75\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "```python\n# Optional: load data from saved file if you haven't processed the whole dataset\ndf = pd.read_csv(data_path)\n```\n\n### Embedding captions and keywords\nWe can now use the generated captions and keywords to match relevant content to an input text query or caption. \nTo do this, we will embed a combination of keywords + captions.\nNote: creating the embeddings will take ~3 mins to run. Feel free to load the pre-processed dataset (see below).\n\n\n```python\ndf_search = df.copy()\n```\n\n\n```python\ndef embed_tags_caption(x):\n    if x['caption'] != '':\n        try:\n            keywords_string = \",\".join(k for k in x['keywords']) + '\\n'\n            content = keywords_string + x['caption']\n            embedding = get_embedding(content)\n            return embedding\n        except Exception as e:\n            print(f\"Error creating embedding for {x}: {e}\")\n```\n\n\n```python\ndf_search['embedding'] = df_search.apply(lambda x: embed_tags_caption(x), axis=1)\n```\n\n    Error creating embedding for title              Suptsifira Shoe storage box, 24 Packs Shoe Box.\n    primary_image      https://m.media-amazon.com/images/I/51enKGSxK8.\n    style                                                            NaN\n    material                                                   Porcelain\n    color                                                          White\n    url                             https://www.amazon.com/dp/B0BZ85JVBN\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 50, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Wellynap Computer Desk,31.5 inches Folding Tab.\n    primary_image      https://m.media-amazon.com/images/I/51pO-N48te.\n    style                                                         Modern\n    material                                                        Wood\n    color                                                   Teak & Black\n    url                             https://www.amazon.com/dp/B0CFL2G31X\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 51, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Smlttel Gold Clothing Rack With Shelves, Gold .\n    primary_image      https://m.media-amazon.com/images/I/41aRwocdfA.\n    style                                                         Modern\n    material                                                       Metal\n    color                                                         C gold\n    url                             https://www.amazon.com/dp/B0B93TC1Z8\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 52, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Franklin Sports NFL Storage Ottoman + Containe.\n    primary_image      https://m.media-amazon.com/images/I/31ptZB+wS-.\n    style              Team Licensed Storage Ottoman with Detachable Lid\n    material                                                      Fabric\n    color                                                     Team Color\n    url                             https://www.amazon.com/dp/B0787KRJ8S\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 53, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Honey-Can-Do 3-Tier Nesting Bamboo Shoe Rack S.\n    primary_image      https://m.media-amazon.com/images/I/51GnnjKaVs.\n    style                                                           Shoe\n    material                                                         NaN\n    color                                                            NaN\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 7f0e82e0-3583-4101-9bd7-f859a799f5d0
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"7f0e82e0-3583-4101-9bd7-f859a799f5d0\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"66a6b84d-d9a2-425a-bca9-074abd605b21\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"678bf1ed128dd7efeca77ff4f92c6a3c13f696d06c77dd2a539679cacd07fa11\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"3d47b03c-0f85-4b6c-8910-55e552b04ab0\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"7b6494f1f6869d1840617de35695889bdb5412a916d9902a584ce1f158758fab\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "media-amazon.com/images/I/51pO-N48te.\n    style                                                         Modern\n    material                                                        Wood\n    color                                                   Teak & Black\n    url                             https://www.amazon.com/dp/B0CFL2G31X\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 51, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Smlttel Gold Clothing Rack With Shelves, Gold .\n    primary_image      https://m.media-amazon.com/images/I/41aRwocdfA.\n    style                                                         Modern\n    material                                                       Metal\n    color                                                         C gold\n    url                             https://www.amazon.com/dp/B0B93TC1Z8\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 52, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Franklin Sports NFL Storage Ottoman + Containe.\n    primary_image      https://m.media-amazon.com/images/I/31ptZB+wS-.\n    style              Team Licensed Storage Ottoman with Detachable Lid\n    material                                                      Fabric\n    color                                                     Team Color\n    url                             https://www.amazon.com/dp/B0787KRJ8S\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 53, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Honey-Can-Do 3-Tier Nesting Bamboo Shoe Rack S.\n    primary_image      https://m.media-amazon.com/images/I/51GnnjKaVs.\n    style                                                           Shoe\n    material                                                         NaN\n    color                                                            NaN\n    url                             https://www.amazon.com/dp/B08WRLKR7T\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 54, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Furnistar 15.9 inch Modern Round Velvet Storag.\n    primary_image      https://m.media-amazon.com/images/I/31IBS5mzYS.\n    style                                                         Modern\n    material                                                        Wood\n    color                                                           Grey\n    url                             https://www.amazon.com/dp/B0C4NT8N8C\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 55, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              AMHANCIBLE C Shaped Side Table, End Tables Set.\n    primary_image      https://m.media-amazon.com/images/I/41qDAGoNCr.\n    style                                                   Straight Leg\n    material                                             Engineered Wood\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B0BT9SVN1V\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 56, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              LONGWIN Black Hanging Wall Round Mirror Decor .\n    primary_image      https://m.media-amazon.com/images/I/41kC6cU5HX.\n    style                                                         Modern\n    material                                                Glass, Metal\n    color                                                          Black\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 3d47b03c-0f85-4b6c-8910-55e552b04ab0
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"3d47b03c-0f85-4b6c-8910-55e552b04ab0\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7f0e82e0-3583-4101-9bd7-f859a799f5d0\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"008366e71efbeecde81e1ee751251c8ac6d2a1cf6680d2373457788e2f8c0537\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7b3af16f-0991-4ab1-8111-c7c07598a5f4\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"edb4b16439e9d3bcabd4b4bc78cee1a76f107648db077a2775fe2e8bbb1a71df\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "media-amazon.com/images/I/51GnnjKaVs.\n    style                                                           Shoe\n    material                                                         NaN\n    color                                                            NaN\n    url                             https://www.amazon.com/dp/B08WRLKR7T\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 54, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Furnistar 15.9 inch Modern Round Velvet Storag.\n    primary_image      https://m.media-amazon.com/images/I/31IBS5mzYS.\n    style                                                         Modern\n    material                                                        Wood\n    color                                                           Grey\n    url                             https://www.amazon.com/dp/B0C4NT8N8C\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 55, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              AMHANCIBLE C Shaped Side Table, End Tables Set.\n    primary_image      https://m.media-amazon.com/images/I/41qDAGoNCr.\n    style                                                   Straight Leg\n    material                                             Engineered Wood\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B0BT9SVN1V\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 56, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              LONGWIN Black Hanging Wall Round Mirror Decor .\n    primary_image      https://m.media-amazon.com/images/I/41kC6cU5HX.\n    style                                                         Modern\n    material                                                Glass, Metal\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B094F897P3\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 57, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Need Fold Wall Mounted Workbench Folding Wall .\n    primary_image      https://m.media-amazon.com/images/I/31SqvdFCut.\n    style                                                         Modern\n    material                                                       Metal\n    color               Teak Color Desktop & Warm White Folding Brackets\n    url                             https://www.amazon.com/dp/B00UV7B29A\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 58, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Big Joe Fuf XL Cover Only Machine Washable, Gr.\n    primary_image      https://m.media-amazon.com/images/I/21ysztDdCY.\n    style                                                          Plush\n    material                                                         NaN\n    color                                                           Grey\n    url                             https://www.amazon.com/dp/B08T7JP8ZN\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 59, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Plymor Rectangle 5mm Beveled Glass Mirror, 6 i.\n    primary_image      https://m.media-amazon.com/images/I/31wigA5chu.\n    style                                                            NaN\n    material                                                       Glass\n    color                                                         Silver\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 7b3af16f-0991-4ab1-8111-c7c07598a5f4
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"7b3af16f-0991-4ab1-8111-c7c07598a5f4\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"3d47b03c-0f85-4b6c-8910-55e552b04ab0\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8b6e919d618a55fba46ab0306e02b4bef489442f0dac012939772fdfc93a49e5\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"ad7e6548-8e60-4037-a9a7-4d725fe0e9db\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"ac6e3cf0084aeaa1fa0958445849c1f7b88dafc05316c238f6c82beb5b2dd3a9\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "primary_image      https://m.media-amazon.com/images/I/41kC6cU5HX.\n    style                                                         Modern\n    material                                                Glass, Metal\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B094F897P3\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 57, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Need Fold Wall Mounted Workbench Folding Wall .\n    primary_image      https://m.media-amazon.com/images/I/31SqvdFCut.\n    style                                                         Modern\n    material                                                       Metal\n    color               Teak Color Desktop & Warm White Folding Brackets\n    url                             https://www.amazon.com/dp/B00UV7B29A\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 58, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Big Joe Fuf XL Cover Only Machine Washable, Gr.\n    primary_image      https://m.media-amazon.com/images/I/21ysztDdCY.\n    style                                                          Plush\n    material                                                         NaN\n    color                                                           Grey\n    url                             https://www.amazon.com/dp/B08T7JP8ZN\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 59, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Plymor Rectangle 5mm Beveled Glass Mirror, 6 i.\n    primary_image      https://m.media-amazon.com/images/I/31wigA5chu.\n    style                                                            NaN\n    material                                                       Glass\n    color                                                         Silver\n    url                             https://www.amazon.com/dp/B09F3SGZ8Y\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 60, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              TIMCORR CD Case DVD Holder Storage: 144 Capaci.\n    primary_image      https://m.media-amazon.com/images/I/411Q2ETwel.\n    style                                                       Portable\n    material                           EVA + PVC + PP + Non-woven fabric\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B0B19ZGGXC\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 61, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Ginger Cayden Closed Towel Ring - 4905/SN - Sa.\n    primary_image      https://m.media-amazon.com/images/I/31LNv7QILd.\n    style                                                            NaN\n    material                                                       Brass\n    color                                                   Satin Nickel\n    url                             https://www.amazon.com/dp/B00U0ECLG2\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 62, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Brightify Black Bathroom Mirrors for Wall, 24 .\n    primary_image      https://m.media-amazon.com/images/I/510A0nIdGZ.\n    style                                                         Modern\n    material                                                    Aluminum\n    color                                                          Black\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: ad7e6548-8e60-4037-a9a7-4d725fe0e9db
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"ad7e6548-8e60-4037-a9a7-4d725fe0e9db\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"7b3af16f-0991-4ab1-8111-c7c07598a5f4\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"75309ad7caa8f8d9d91ba56512408f16751f01bf3389a3179c54a3bb8e2935ce\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"31c1874a-c4cb-4378-9e54-681ec6a2c721\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"dd0d0be6dfe672969a56f41f0fe9424944e9b35badc9924269ab0e94b7b6a3bd\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "media-amazon.com/images/I/31wigA5chu.\n    style                                                            NaN\n    material                                                       Glass\n    color                                                         Silver\n    url                             https://www.amazon.com/dp/B09F3SGZ8Y\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 60, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              TIMCORR CD Case DVD Holder Storage: 144 Capaci.\n    primary_image      https://m.media-amazon.com/images/I/411Q2ETwel.\n    style                                                       Portable\n    material                           EVA + PVC + PP + Non-woven fabric\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B0B19ZGGXC\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 61, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Ginger Cayden Closed Towel Ring - 4905/SN - Sa.\n    primary_image      https://m.media-amazon.com/images/I/31LNv7QILd.\n    style                                                            NaN\n    material                                                       Brass\n    color                                                   Satin Nickel\n    url                             https://www.amazon.com/dp/B00U0ECLG2\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 62, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Brightify Black Bathroom Mirrors for Wall, 24 .\n    primary_image      https://m.media-amazon.com/images/I/510A0nIdGZ.\n    style                                                         Modern\n    material                                                    Aluminum\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B0C2HNGCRX\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 63, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              SogesHome Wood Corner Cabinet Wall Corner Stor.\n    primary_image      https://m.media-amazon.com/images/I/41BTUFVwm+.\n    style                                                     Open Frame\n    material                                                         NaN\n    color                                                     White&teak\n    url                             https://www.amazon.com/dp/B0C3B4D4RH\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 64, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Toy Storage for Lego Play Mat Bag - Duplo Toy .\n    primary_image      https://m.media-amazon.com/images/I/51KKvmDCqB.\n    style                                                            NaN\n    material                                                       Nylon\n    color                                                         Orange\n    url                             https://www.amazon.com/dp/B0B4CL1M1M\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 65, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Flash Furniture Jefferson 2 Pk. Contemporary B.\n    primary_image      https://m.media-amazon.com/images/I/41GYYVLfGj.\n    style                                                   Contemporary\n    material                                                         NaN\n    color                                                          Brown\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 31c1874a-c4cb-4378-9e54-681ec6a2c721
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"31c1874a-c4cb-4378-9e54-681ec6a2c721\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ad7e6548-8e60-4037-a9a7-4d725fe0e9db\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"10a905c31c8d3414d8e052003faf749ecab6871634811bc420c975de6b4de72a\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f25275b0-1070-43ff-8ea9-bdf6c42f380e\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"3d04f02e242b2724298656e70648413be5e7a7968b48e59b9670d1b648089dff\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "primary_image      https://m.media-amazon.com/images/I/510A0nIdGZ.\n    style                                                         Modern\n    material                                                    Aluminum\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B0C2HNGCRX\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 63, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              SogesHome Wood Corner Cabinet Wall Corner Stor.\n    primary_image      https://m.media-amazon.com/images/I/41BTUFVwm+.\n    style                                                     Open Frame\n    material                                                         NaN\n    color                                                     White&teak\n    url                             https://www.amazon.com/dp/B0C3B4D4RH\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 64, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Toy Storage for Lego Play Mat Bag - Duplo Toy .\n    primary_image      https://m.media-amazon.com/images/I/51KKvmDCqB.\n    style                                                            NaN\n    material                                                       Nylon\n    color                                                         Orange\n    url                             https://www.amazon.com/dp/B0B4CL1M1M\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 65, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Flash Furniture Jefferson 2 Pk. Contemporary B.\n    primary_image      https://m.media-amazon.com/images/I/41GYYVLfGj.\n    style                                                   Contemporary\n    material                                                         NaN\n    color                                                          Brown\n    url                             https://www.amazon.com/dp/B00FEAN1SY\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 66, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Hong Art- Metal Mirror-Matt Black,Glass Panel .\n    primary_image      https://m.media-amazon.com/images/I/31XytAHobH.\n    style                                                        Classic\n    material                                                       Metal\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B08GSH4KVM\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 67, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Convenience Concepts American Heritage Round E.\n    primary_image      https://m.media-amazon.com/images/I/311rmB9BDW.\n    style                                                Round End Table\n    material           Solid + Manufactured Wood,Particle Board/Chipb.\n    color                                                           Pink\n    url                             https://www.amazon.com/dp/B01B65BYYI\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 68, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Flash Furniture Diamond Black Vinyl Luxurious .\n    primary_image      https://m.media-amazon.com/images/I/41LYsAMww6.\n    style                                                          Fixed\n    material                                                        Foam\n    color                                                    Black Vinyl\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: f25275b0-1070-43ff-8ea9-bdf6c42f380e
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f25275b0-1070-43ff-8ea9-bdf6c42f380e\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"31c1874a-c4cb-4378-9e54-681ec6a2c721\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"62cdea5cac563f8c8c115d8d33a19e4e90c0c7e9d6ea765a44ac5b33465d0225\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c2e17e97-e9f8-405c-b4d9-6e740a272d93\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"b0557dba5ff9dd05dba4b874925223fc1cc0e089974190dc5b91d15f45eeeb1f\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "Contemporary B.\n    primary_image      https://m.media-amazon.com/images/I/41GYYVLfGj.\n    style                                                   Contemporary\n    material                                                         NaN\n    color                                                          Brown\n    url                             https://www.amazon.com/dp/B00FEAN1SY\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 66, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Hong Art- Metal Mirror-Matt Black,Glass Panel .\n    primary_image      https://m.media-amazon.com/images/I/31XytAHobH.\n    style                                                        Classic\n    material                                                       Metal\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B08GSH4KVM\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 67, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Convenience Concepts American Heritage Round E.\n    primary_image      https://m.media-amazon.com/images/I/311rmB9BDW.\n    style                                                Round End Table\n    material           Solid + Manufactured Wood,Particle Board/Chipb.\n    color                                                           Pink\n    url                             https://www.amazon.com/dp/B01B65BYYI\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 68, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Flash Furniture Diamond Black Vinyl Luxurious .\n    primary_image      https://m.media-amazon.com/images/I/41LYsAMww6.\n    style                                                          Fixed\n    material                                                        Foam\n    color                                                    Black Vinyl\n    url                             https://www.amazon.com/dp/B000TMHWGO\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 69, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Gatco 1918, Modern Rectangle Waste Basket, Mat.\n    primary_image      https://m.media-amazon.com/images/I/31dnAVaEmv.\n    style                                                      Rectangle\n    material                                             Stainless Steel\n    color                                                    Matte Black\n    url                             https://www.amazon.com/dp/B07TXMJ5FQ\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 70, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Winrise Office Chair Ergonomic Desk Chair, Hig.\n    primary_image      https://m.media-amazon.com/images/I/41hCFaVIC+.\n    style                                                       Straight\n    material                                                      Sponge\n    color                                                        S-black\n    url                             https://www.amazon.com/dp/B0CGQZBCZP\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 71, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Adeco Euro Style Fabric Arm Bench Chair Footst.\n    primary_image      https://m.media-amazon.com/images/I/41hUc8c+DC.\n    style                                                         Modern\n    material                                             Engineered Wood\n    color                                                          Brown\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: c2e17e97-e9f8-405c-b4d9-6e740a272d93
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"c2e17e97-e9f8-405c-b4d9-6e740a272d93\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f25275b0-1070-43ff-8ea9-bdf6c42f380e\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"0cac5aca304a27dec54aa92d9909ca6993178ae4ec7526bb5f42472d3650731b\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"1499d61a-f849-4b7b-bd74-42d4e693c10c\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"04da954db1bca43bb0e36391d4b9bc4e8cfc3c08290b36f9e11dc15045501340\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "primary_image      https://m.media-amazon.com/images/I/41LYsAMww6.\n    style                                                          Fixed\n    material                                                        Foam\n    color                                                    Black Vinyl\n    url                             https://www.amazon.com/dp/B000TMHWGO\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 69, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Gatco 1918, Modern Rectangle Waste Basket, Mat.\n    primary_image      https://m.media-amazon.com/images/I/31dnAVaEmv.\n    style                                                      Rectangle\n    material                                             Stainless Steel\n    color                                                    Matte Black\n    url                             https://www.amazon.com/dp/B07TXMJ5FQ\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 70, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Winrise Office Chair Ergonomic Desk Chair, Hig.\n    primary_image      https://m.media-amazon.com/images/I/41hCFaVIC+.\n    style                                                       Straight\n    material                                                      Sponge\n    color                                                        S-black\n    url                             https://www.amazon.com/dp/B0CGQZBCZP\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 71, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Adeco Euro Style Fabric Arm Bench Chair Footst.\n    primary_image      https://m.media-amazon.com/images/I/41hUc8c+DC.\n    style                                                         Modern\n    material                                             Engineered Wood\n    color                                                          Brown\n    url                             https://www.amazon.com/dp/B017TNJR72\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 72, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Motiv 0202/PC Sine 18-In Towel Bar, Polished C.\n    primary_image      https://m.media-amazon.com/images/I/31a6GfenW0.\n    style                                                            NaN\n    material                                                       Brass\n    color                                                  18\" Towel Bar\n    url                             https://www.amazon.com/dp/B001AS8D82\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 73, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Imports D\u00e9cor PVC Backed Coir Doormat, Eighth .\n    primary_image      https://m.media-amazon.com/images/I/51H9lDOICr.\n    style                                                       Art Deco\n    material                                                       Vinyl\n    color                                                Black and Beige\n    url                             https://www.amazon.com/dp/B08WF83LMF\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 74, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Croydex Chester Square Flexi-Fix Wall Mounted .\n    primary_image      https://m.media-amazon.com/images/I/41sDO1HW2c.\n    style                                                            NaN\n    material                                                         NaN\n    color                                                         Silver\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 1499d61a-f849-4b7b-bd74-42d4e693c10c
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"1499d61a-f849-4b7b-bd74-42d4e693c10c\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"c2e17e97-e9f8-405c-b4d9-6e740a272d93\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"20e6be99358c25427bcc2136f699162a66021ed61f40224e1dcc570fc95e7e54\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"9dd41ed3-ba26-4531-8ae2-d7394be50601\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"eca1845bc2d5dbac4e9f9e9735c0014023c3cadea68c1cdd65721caeee0b7875\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "com/images/I/41hUc8c+DC.\n    style                                                         Modern\n    material                                             Engineered Wood\n    color                                                          Brown\n    url                             https://www.amazon.com/dp/B017TNJR72\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 72, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Motiv 0202/PC Sine 18-In Towel Bar, Polished C.\n    primary_image      https://m.media-amazon.com/images/I/31a6GfenW0.\n    style                                                            NaN\n    material                                                       Brass\n    color                                                  18\" Towel Bar\n    url                             https://www.amazon.com/dp/B001AS8D82\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 73, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Imports D\u00e9cor PVC Backed Coir Doormat, Eighth .\n    primary_image      https://m.media-amazon.com/images/I/51H9lDOICr.\n    style                                                       Art Deco\n    material                                                       Vinyl\n    color                                                Black and Beige\n    url                             https://www.amazon.com/dp/B08WF83LMF\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 74, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Croydex Chester Square Flexi-Fix Wall Mounted .\n    primary_image      https://m.media-amazon.com/images/I/41sDO1HW2c.\n    style                                                            NaN\n    material                                                         NaN\n    color                                                         Silver\n    url                             https://www.amazon.com/dp/B09DGFRM4B\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 75, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              itbe Easy Fit Ready-to-Assemble Multipurpose O.\n    primary_image      https://m.media-amazon.com/images/I/21NWASZgUV.\n    style                                                     Flat Panel\n    material                                                 Alloy Steel\n    color                                                           Blue\n    url                             https://www.amazon.com/dp/B09FR4XSCT\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 76, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Delta ARV18-DN Arvo 18-in Wall Mount Towel Bar.\n    primary_image      https://m.media-amazon.com/images/I/11zzs81fXB.\n    style                                 18\" Towel Bar with 6\" Extender\n    material                                     Multiple Base Materials\n    color                                      Spotshield Brushed Nickel\n    url                             https://www.amazon.com/dp/B09LVSZRZS\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 77, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Bamboo Waste Basket | Waste Basket for Bathroo.\n    primary_image      https://m.media-amazon.com/images/I/318RY00VlI.\n    style                                                            NaN\n    material                                                         NaN\n    color                                                            NaN\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 9dd41ed3-ba26-4531-8ae2-d7394be50601
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"9dd41ed3-ba26-4531-8ae2-d7394be50601\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"1499d61a-f849-4b7b-bd74-42d4e693c10c\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"15e992a2e8ae253860571c9c7b5708f554efa2ff8b015f2b4564e9eb049b00ea\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"668d2501-ed4b-4265-abe6-570262adae81\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"2c98f3d9fdd85d313d27ccc03a962f63841c8f9e3b203cd64a00275e4eea99a5\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "com/images/I/41sDO1HW2c.\n    style                                                            NaN\n    material                                                         NaN\n    color                                                         Silver\n    url                             https://www.amazon.com/dp/B09DGFRM4B\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 75, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              itbe Easy Fit Ready-to-Assemble Multipurpose O.\n    primary_image      https://m.media-amazon.com/images/I/21NWASZgUV.\n    style                                                     Flat Panel\n    material                                                 Alloy Steel\n    color                                                           Blue\n    url                             https://www.amazon.com/dp/B09FR4XSCT\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 76, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Delta ARV18-DN Arvo 18-in Wall Mount Towel Bar.\n    primary_image      https://m.media-amazon.com/images/I/11zzs81fXB.\n    style                                 18\" Towel Bar with 6\" Extender\n    material                                     Multiple Base Materials\n    color                                      Spotshield Brushed Nickel\n    url                             https://www.amazon.com/dp/B09LVSZRZS\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 77, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Bamboo Waste Basket | Waste Basket for Bathroo.\n    primary_image      https://m.media-amazon.com/images/I/318RY00VlI.\n    style                                                            NaN\n    material                                                         NaN\n    color                                                            NaN\n    url                             https://www.amazon.com/dp/B08VWTB8CH\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 78, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Way Basics Vinyl Record Storage - 2 Tier Book .\n    primary_image      https://m.media-amazon.com/images/I/41YMttt7a5.\n    style                                                         Modern\n    material                                           Recycled Material\n    color                                                          White\n    url                             https://www.amazon.com/dp/B075M1PKSW\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 79, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              TocTen Double Bath Towel Bar - Thicken SUS304 .\n    primary_image      https://m.media-amazon.com/images/I/41cFJKXyA5.\n    style                                                            NaN\n    material                                             Stainless Steel\n    color                                                    Matte Black\n    url                             https://www.amazon.com/dp/B0BWRVGQRM\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 80, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              MoNiBloom Adjustable Bar Stools Set of 2, 360\u00b0.\n    primary_image      https://m.media-amazon.com/images/I/41jD28iN4b.\n    style                                                       Straight\n    material                                                         NaN\n    color                                                      Dark Grey\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 668d2501-ed4b-4265-abe6-570262adae81
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"668d2501-ed4b-4265-abe6-570262adae81\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"9dd41ed3-ba26-4531-8ae2-d7394be50601\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"95f94640877bdf245fe2141ea90f89ddc19ab16e9f35f4af85ce4da133475674\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b20285a0-4814-4bab-b918-c73548e0a29a\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"5cc9eb44fb4b534a5f6f4f2893836008701e1c7213a3bb18404d2a90861968a0\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "media-amazon.com/images/I/318RY00VlI.\n    style                                                            NaN\n    material                                                         NaN\n    color                                                            NaN\n    url                             https://www.amazon.com/dp/B08VWTB8CH\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 78, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Way Basics Vinyl Record Storage - 2 Tier Book .\n    primary_image      https://m.media-amazon.com/images/I/41YMttt7a5.\n    style                                                         Modern\n    material                                           Recycled Material\n    color                                                          White\n    url                             https://www.amazon.com/dp/B075M1PKSW\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 79, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              TocTen Double Bath Towel Bar - Thicken SUS304 .\n    primary_image      https://m.media-amazon.com/images/I/41cFJKXyA5.\n    style                                                            NaN\n    material                                             Stainless Steel\n    color                                                    Matte Black\n    url                             https://www.amazon.com/dp/B0BWRVGQRM\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 80, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              MoNiBloom Adjustable Bar Stools Set of 2, 360\u00b0.\n    primary_image      https://m.media-amazon.com/images/I/41jD28iN4b.\n    style                                                       Straight\n    material                                                         NaN\n    color                                                      Dark Grey\n    url                             https://www.amazon.com/dp/B0CB7SG59J\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 81, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              LANTEFUL Shoe Rack Organizer Shoe Storage Cabi.\n    primary_image      https://m.media-amazon.com/images/I/51e8SrHHW3.\n    style                                       free standing shoe racks\n    material                                                         NaN\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B0C3QDL2XW\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 82, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              ANDY STAR 24x32 INCH Brushed Nickel Mirror, Ro.\n    primary_image      https://m.media-amazon.com/images/I/41MQWfATgg.\n    style                                                            NaN\n    material                                             Stainless Steel\n    color                                                 Brushed Nickel\n    url                             https://www.amazon.com/dp/B0CBRGS5D7\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 83, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              MJL Furniture Designs Upholstered Cubed/Square.\n    primary_image      https://m.media-amazon.com/images/I/410tv-zDYX.\n    style                                                   Contemporary\n    material                                                        Wood\n    color                                                     Smoke Grey\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: b20285a0-4814-4bab-b918-c73548e0a29a
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"b20285a0-4814-4bab-b918-c73548e0a29a\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"668d2501-ed4b-4265-abe6-570262adae81\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"ea3d6daa2d31b482bb4cf672600eb4233b126f5b79d69cbfff146f4e1965cba9\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"32745195-758f-4c81-b386-adb46487d108\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"4891930956b16db50cced2dc69f71870b1c607bfddd88e53a5cffa7d4536d198\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "media-amazon.com/images/I/41jD28iN4b.\n    style                                                       Straight\n    material                                                         NaN\n    color                                                      Dark Grey\n    url                             https://www.amazon.com/dp/B0CB7SG59J\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 81, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              LANTEFUL Shoe Rack Organizer Shoe Storage Cabi.\n    primary_image      https://m.media-amazon.com/images/I/51e8SrHHW3.\n    style                                       free standing shoe racks\n    material                                                         NaN\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B0C3QDL2XW\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 82, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              ANDY STAR 24x32 INCH Brushed Nickel Mirror, Ro.\n    primary_image      https://m.media-amazon.com/images/I/41MQWfATgg.\n    style                                                            NaN\n    material                                             Stainless Steel\n    color                                                 Brushed Nickel\n    url                             https://www.amazon.com/dp/B0CBRGS5D7\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 83, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              MJL Furniture Designs Upholstered Cubed/Square.\n    primary_image      https://m.media-amazon.com/images/I/410tv-zDYX.\n    style                                                   Contemporary\n    material                                                        Wood\n    color                                                     Smoke Grey\n    url                             https://www.amazon.com/dp/B01D378FYE\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 84, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Cpintltr Small Foot Stool Ottoman Modern Accen.\n    primary_image      https://m.media-amazon.com/images/I/51CjfUJVuL.\n    style                                                            NaN\n    material                                                        Pine\n    color                                                          Green\n    url                             https://www.amazon.com/dp/B0CKPFKDZY\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 85, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              YuiHome Extendable Round, Farmhouse 16\" Leaf T.\n    primary_image      https://m.media-amazon.com/images/I/5175Qzg03L.\n    style                                                      Farmhouse\n    material                                Rubber Wood, Engineered Wood\n    color                                              Natural Wood Wash\n    url                             https://www.amazon.com/dp/B0CHVQ6BC5\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 86, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Ergonomic Office Chair,Office Chair, with Lumb.\n    primary_image      https://m.media-amazon.com/images/I/51vnoZERmP.\n    style                                                      With arms\n    material                                                        Foam\n    color                                                      All Black\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 32745195-758f-4c81-b386-adb46487d108
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"32745195-758f-4c81-b386-adb46487d108\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"b20285a0-4814-4bab-b918-c73548e0a29a\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"7380773aeaa9049334c2af61897520aa457fdba6565f133c1698115b3a52bd36\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"eda092c3-5ca2-4846-9303-eda76816ef36\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"95e274ffa3b459a7a4d3ce07abb47da74d49283bf7d9a228770b36867185c192\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "media-amazon.com/images/I/410tv-zDYX.\n    style                                                   Contemporary\n    material                                                        Wood\n    color                                                     Smoke Grey\n    url                             https://www.amazon.com/dp/B01D378FYE\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 84, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Cpintltr Small Foot Stool Ottoman Modern Accen.\n    primary_image      https://m.media-amazon.com/images/I/51CjfUJVuL.\n    style                                                            NaN\n    material                                                        Pine\n    color                                                          Green\n    url                             https://www.amazon.com/dp/B0CKPFKDZY\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 85, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              YuiHome Extendable Round, Farmhouse 16\" Leaf T.\n    primary_image      https://m.media-amazon.com/images/I/5175Qzg03L.\n    style                                                      Farmhouse\n    material                                Rubber Wood, Engineered Wood\n    color                                              Natural Wood Wash\n    url                             https://www.amazon.com/dp/B0CHVQ6BC5\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 86, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Ergonomic Office Chair,Office Chair, with Lumb.\n    primary_image      https://m.media-amazon.com/images/I/51vnoZERmP.\n    style                                                      With arms\n    material                                                        Foam\n    color                                                      All Black\n    url                             https://www.amazon.com/dp/B0CBBV4S1P\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 87, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Kate and Laurel Celia Round Metal Foldable Acc.\n    primary_image      https://m.media-amazon.com/images/I/31ZMqrgDD8.\n    style                                                         Modern\n    material                                                        Iron\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B084WLY61H\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 88, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Lizipai Floating Bedside Table, No Assembly Re.\n    primary_image      https://m.media-amazon.com/images/I/41HBX6be98.\n    style                                                             no\n    material                                                        Wood\n    color                                                          White\n    url                             https://www.amazon.com/dp/B09NBWCTDS\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 89, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              CordaRoy's Chenille Bean Bag Ottoman Footstool.\n    primary_image      https://m.media-amazon.com/images/I/51HpCirQNA.\n    style                                                         Modern\n    material                                             Engineered Wood\n    color                                                     Rainforest\n    url                             https://www.amazon.com/dp/B0BSZ96YG7\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 90,"}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: eda092c3-5ca2-4846-9303-eda76816ef36
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"eda092c3-5ca2-4846-9303-eda76816ef36\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"32745195-758f-4c81-b386-adb46487d108\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"2df5ae3327bec1970e67522f894629e14de2bde4e898001f8c6d745bf4202501\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"fef0c223-f789-45aa-8277-cb18a03d937f\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"a64abcbffbce16ca46b1a17f299eda5384e8d61ad6368f74c2d31e09955a48f6\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "amazon.com/dp/B0CBBV4S1P\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 87, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Kate and Laurel Celia Round Metal Foldable Acc.\n    primary_image      https://m.media-amazon.com/images/I/31ZMqrgDD8.\n    style                                                         Modern\n    material                                                        Iron\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B084WLY61H\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 88, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Lizipai Floating Bedside Table, No Assembly Re.\n    primary_image      https://m.media-amazon.com/images/I/41HBX6be98.\n    style                                                             no\n    material                                                        Wood\n    color                                                          White\n    url                             https://www.amazon.com/dp/B09NBWCTDS\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 89, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              CordaRoy's Chenille Bean Bag Ottoman Footstool.\n    primary_image      https://m.media-amazon.com/images/I/51HpCirQNA.\n    style                                                         Modern\n    material                                             Engineered Wood\n    color                                                     Rainforest\n    url                             https://www.amazon.com/dp/B0BSZ96YG7\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 90, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Plebs Home Solid Desktop Store Cart, with Rubb.\n    primary_image      https://m.media-amazon.com/images/I/51WFQwBEqj.\n    style                                                           Slab\n    material                                                        Wood\n    color                                                      Dark Blue\n    url                             https://www.amazon.com/dp/B0CD7FSWMK\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 91, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              ErGear Ergonomic Desk Chair, Office Chair with.\n    primary_image      https://m.media-amazon.com/images/I/41C4FUmS-h.\n    style                                                      With arms\n    material                                                 Memory Foam\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B0C99D3V15\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 92, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Kingston Brass Millennium Towel-Ring, 7.63\", O.\n    primary_image      https://m.media-amazon.com/images/I/31+kzwXTjx.\n    style                                                            NaN\n    material                                                       Brass\n    color                                              Oil Rubbed Bronze\n    url                             https://www.amazon.com/dp/B00FM0WG7I\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 93, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Homebeez 18.9\" Round Velvet Storage Ottoman Mu.\n    primary_image      https://m."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: fef0c223-f789-45aa-8277-cb18a03d937f
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"fef0c223-f789-45aa-8277-cb18a03d937f\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"eda092c3-5ca2-4846-9303-eda76816ef36\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"f98c53e487005a3df6eb62c4037e2424f2ac0bb62d3e86b42ef8222532cd1659\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"34963399-5748-4c2c-acf6-8e00d101393f\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"35a9ff03b0fb650d7aecf6abd72d7db10379ccc6557f94cfae9fd0ec510c9388\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Plebs Home Solid Desktop Store Cart, with Rubb.\n    primary_image      https://m.media-amazon.com/images/I/51WFQwBEqj.\n    style                                                           Slab\n    material                                                        Wood\n    color                                                      Dark Blue\n    url                             https://www.amazon.com/dp/B0CD7FSWMK\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 91, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              ErGear Ergonomic Desk Chair, Office Chair with.\n    primary_image      https://m.media-amazon.com/images/I/41C4FUmS-h.\n    style                                                      With arms\n    material                                                 Memory Foam\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B0C99D3V15\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 92, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Kingston Brass Millennium Towel-Ring, 7.63\", O.\n    primary_image      https://m.media-amazon.com/images/I/31+kzwXTjx.\n    style                                                            NaN\n    material                                                       Brass\n    color                                              Oil Rubbed Bronze\n    url                             https://www.amazon.com/dp/B00FM0WG7I\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 93, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Homebeez 18.9\" Round Velvet Storage Ottoman Mu.\n    primary_image      https://m.media-amazon.com/images/I/51vTxE-9lH.\n    style                                                         Modern\n    material                                                        Wood\n    color                                                         Orange\n    url                             https://www.amazon.com/dp/B09DKG6JDN\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 94, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Mickey and Friends Collapsible Nylon Basket Bu.\n    primary_image      https://m.media-amazon.com/images/I/410mEc5bbl.\n    style                                                            NaN\n    material                                                         NaN\n    color                                                            NaN\n    url                             https://www.amazon.com/dp/B0B7Q5LB2C\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 95, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Homepop Home Decor | Backless Nailhead Trim Co.\n    primary_image      https://m.media-amazon.com/images/I/41HPIScA4s.\n    style                                                   Contemporary\n    material                                                         NaN\n    color                                                           Blue\n    url                             https://www.amazon.com/dp/B01LWPSVUW\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 96, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Camco Life Is Better at The Campsite Outdoor &.\n    primary_image      https://m.media-amazon.com/images/I/51DN2is3Zj."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 34963399-5748-4c2c-acf6-8e00d101393f
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"34963399-5748-4c2c-acf6-8e00d101393f\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"fef0c223-f789-45aa-8277-cb18a03d937f\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"0ba13b75aef8e1697a7bafad5f1ef3b1843ec5b08938c8e908cc1ed28e650054\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"0956fc73-9465-45ae-b1cd-56f7375d3e1f\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"b09c28f347f8f1ef4b304e2708a65867e860d98c6f1880dbbcad0785ded4e5cb\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Homebeez 18.9\" Round Velvet Storage Ottoman Mu.\n    primary_image      https://m.media-amazon.com/images/I/51vTxE-9lH.\n    style                                                         Modern\n    material                                                        Wood\n    color                                                         Orange\n    url                             https://www.amazon.com/dp/B09DKG6JDN\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 94, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Mickey and Friends Collapsible Nylon Basket Bu.\n    primary_image      https://m.media-amazon.com/images/I/410mEc5bbl.\n    style                                                            NaN\n    material                                                         NaN\n    color                                                            NaN\n    url                             https://www.amazon.com/dp/B0B7Q5LB2C\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 95, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Homepop Home Decor | Backless Nailhead Trim Co.\n    primary_image      https://m.media-amazon.com/images/I/41HPIScA4s.\n    style                                                   Contemporary\n    material                                                         NaN\n    color                                                           Blue\n    url                             https://www.amazon.com/dp/B01LWPSVUW\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 96, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Camco Life Is Better at The Campsite Outdoor &.\n    primary_image      https://m.media-amazon.com/images/I/51DN2is3Zj.\n    style                                               Outdoor & Indoor\n    material                                                      Rubber\n    color                                                           Blue\n    url                             https://www.amazon.com/dp/B07D7RQNJV\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 97, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              MoNiBloom Round Folding Faux Fur Saucer Chair .\n    primary_image      https://m.media-amazon.com/images/I/41eoFKL3gK.\n    style                                                         Modern\n    material                                                   Polyester\n    color                                                       Burgundy\n    url                             https://www.amazon.com/dp/B0CD7TH3BF\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 98, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              YMYNY Vanity Stool Chair with Storage, Square .\n    primary_image      https://m.media-amazon.com/images/I/519Am3LPMv.\n    style                                                         Modern\n    material                                                         NaN\n    color                                                     Dusty Blue\n    url                             https://www.amazon.com/dp/B0C1NSNDW2\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 99, dtype: object: 'float' object is not iterable\n    Error creating embedding for title                   Casual Home 5 Piece Tray Table Set, Espresso\n    primary_image      https://m.media-amazon.com/images/I/41WweDJqgZ.\n    style                                                 Tray Table Set\n    material                                                        Wood\n    color                                                       Espresso\n    url                             https://www."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 0956fc73-9465-45ae-b1cd-56f7375d3e1f
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"0956fc73-9465-45ae-b1cd-56f7375d3e1f\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"34963399-5748-4c2c-acf6-8e00d101393f\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"7c1e69899bd969b573c2151c4c29c180a803d57236e5e720c32272232931e6ad\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f83ba7b8-a49c-4ce5-a5fd-2caa617f1254\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"2cb41e7463b73051e85943eca0631e3f9fdd68903884799b0d87f2f9ac801a49\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "primary_image      https://m.media-amazon.com/images/I/51DN2is3Zj.\n    style                                               Outdoor & Indoor\n    material                                                      Rubber\n    color                                                           Blue\n    url                             https://www.amazon.com/dp/B07D7RQNJV\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 97, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              MoNiBloom Round Folding Faux Fur Saucer Chair .\n    primary_image      https://m.media-amazon.com/images/I/41eoFKL3gK.\n    style                                                         Modern\n    material                                                   Polyester\n    color                                                       Burgundy\n    url                             https://www.amazon.com/dp/B0CD7TH3BF\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 98, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              YMYNY Vanity Stool Chair with Storage, Square .\n    primary_image      https://m.media-amazon.com/images/I/519Am3LPMv.\n    style                                                         Modern\n    material                                                         NaN\n    color                                                     Dusty Blue\n    url                             https://www.amazon.com/dp/B0C1NSNDW2\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 99, dtype: object: 'float' object is not iterable\n    Error creating embedding for title                   Casual Home 5 Piece Tray Table Set, Espresso\n    primary_image      https://m.media-amazon.com/images/I/41WweDJqgZ.\n    style                                                 Tray Table Set\n    material                                                        Wood\n    color                                                       Espresso\n    url                             https://www.amazon.com/dp/B0069H9BYO\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 100, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Simplify Hanging Grey 20-Pocket Shoe Boho Clos.\n    primary_image      https://m.media-amazon.com/images/I/41eYiOqsld.\n    style                                                            NaN\n    material           80% Linen printed nonwoven +20% solid nonwoven.\n    color                                                           Grey\n    url                             https://www.amazon.com/dp/B09J1RM23P\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 101, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Get Set Style Black Glass Side Table, Square G.\n    primary_image      https://m.media-amazon.com/images/I/51gG6ukN1n.\n    style                                             Modern and Elegant\n    material                                              Tempered Glass\n    color                                                    Shiny Black\n    url                             https://www.amazon.com/dp/B0C5DH6ZY6\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 102, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Watson & Whitely Swivel Bar Stools Set of 2, F.\n    primary_image      https://m.media-amazon.com/images/I/41nDc6aFKo.\n    style                                                         Modern\n    material                                                         NaN\n    color                                                          Black\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: f83ba7b8-a49c-4ce5-a5fd-2caa617f1254
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f83ba7b8-a49c-4ce5-a5fd-2caa617f1254\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"0956fc73-9465-45ae-b1cd-56f7375d3e1f\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"0b806be0f0b48816b06b2c259ca5117263e005a18d8662bb95feb0b885e707e2\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"2ffb1567-8ea7-47da-98b4-62c5af6bf888\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"e10b92f5b9762d4212ea27b4fccf33f1f20cdb9fa1cefce22e56bfc1c323c604\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "style                                                 Tray Table Set\n    material                                                        Wood\n    color                                                       Espresso\n    url                             https://www.amazon.com/dp/B0069H9BYO\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 100, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Simplify Hanging Grey 20-Pocket Shoe Boho Clos.\n    primary_image      https://m.media-amazon.com/images/I/41eYiOqsld.\n    style                                                            NaN\n    material           80% Linen printed nonwoven +20% solid nonwoven.\n    color                                                           Grey\n    url                             https://www.amazon.com/dp/B09J1RM23P\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 101, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Get Set Style Black Glass Side Table, Square G.\n    primary_image      https://m.media-amazon.com/images/I/51gG6ukN1n.\n    style                                             Modern and Elegant\n    material                                              Tempered Glass\n    color                                                    Shiny Black\n    url                             https://www.amazon.com/dp/B0C5DH6ZY6\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 102, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Watson & Whitely Swivel Bar Stools Set of 2, F.\n    primary_image      https://m.media-amazon.com/images/I/41nDc6aFKo.\n    style                                                         Modern\n    material                                                         NaN\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B0CKQTTZ5V\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 103, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Sweet Jojo Designs Boho Rainbow Girl Ottoman P.\n    primary_image      https://m.media-amazon.com/images/I/31nn4NwuKf.\n    style                                                    Shabby Chic\n    material                                             Engineered Wood\n    color                                                    Multi Color\n    url                             https://www.amazon.com/dp/B0BZJYM4Q6\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 104, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Pekokavo Sofa Arm Clip Tray, Side Table for Re.\n    primary_image      https://m.media-amazon.com/images/I/51yz-83kj+.\n    style                                                         Modern\n    material                                                      Bamboo\n    color                                                         Bamboo\n    url                             https://www.amazon.com/dp/B08SL4GH7G\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 105, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Caroline's Treasures JMA2013HRM2858 Seaweed Sa.\n    primary_image      https://m.media-amazon.com/images/I/514qJ5aPtb.\n    style                                                         Modern\n    material                                                      Rubber\n    color                                                   Multicolored\n    url                             https://www.amazon."}


created_at: 2024-07-28 18:59:18
topic: persistent://default/default/4bfc3c11-fb71-4cc9-8c12-01ed076a0e01
id: 2ffb1567-8ea7-47da-98b4-62c5af6bf888
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb", "title": "Using GPT-4o mini to tag & caption images", "tokens": 43074, "retrieve_doc": false, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"2ffb1567-8ea7-47da-98b4-62c5af6bf888\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"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\": \"445cd3a9-3b52-4059-b5b8-98d9fd6df70f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8a35c83b4ca97a55dbfb4c665f169096f360b8af9befbf8d15dd085af5f31e89\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f83ba7b8-a49c-4ce5-a5fd-2caa617f1254\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/Tag_caption_images_with_GPT4V.ipynb\", \"title\": \"Using GPT-4o mini to tag & caption images\", \"tokens\": 43074, \"retrieve_doc\": false, \"source\": \"openai_cookbooks\"}, \"hash\": \"8bfe97b16cf6bf8270cee3edcf35779f36feed944276e288fd480c8259a81acb\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"55af071f-2ec0-4cd3-945c-7fdf0b982f83\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"6013a1b845c369234758ec44631e3c717a51caa6feae054754cef48a75dddb60\", \"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": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "ref_doc_id": "445cd3a9-3b52-4059-b5b8-98d9fd6df70f", "chroma:document": "media-amazon.com/images/I/41nDc6aFKo.\n    style                                                         Modern\n    material                                                         NaN\n    color                                                          Black\n    url                             https://www.amazon.com/dp/B0CKQTTZ5V\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 103, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Sweet Jojo Designs Boho Rainbow Girl Ottoman P.\n    primary_image      https://m.media-amazon.com/images/I/31nn4NwuKf.\n    style                                                    Shabby Chic\n    material                                             Engineered Wood\n    color                                                    Multi Color\n    url                             https://www.amazon.com/dp/B0BZJYM4Q6\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 104, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Pekokavo Sofa Arm Clip Tray, Side Table for Re.\n    primary_image      https://m.media-amazon.com/images/I/51yz-83kj+.\n    style                                                         Modern\n    material                                                      Bamboo\n    color                                                         Bamboo\n    url                             https://www.amazon.com/dp/B08SL4GH7G\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 105, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Caroline's Treasures JMA2013HRM2858 Seaweed Sa.\n    primary_image      https://m.media-amazon.com/images/I/514qJ5aPtb.\n    style                                                         Modern\n    material                                                      Rubber\n    color                                                   Multicolored\n    url                             https://www.amazon.com/dp/B07SPYM4M5\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 106, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Xchouxer Side Tables Natural Bamboo Sofa Armre.\n    primary_image      https://m.media-amazon.com/images/I/511LXRAxI+.\n    style                                                         Modern\n    material                                                      Bamboo\n    color                                                          Beige\n    url                             https://www.amazon.com/dp/B08FC5HPBS\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 107, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              Montessori Learning Toddler Tower, Foldable To.\n    primary_image      https://m.media-amazon.com/images/I/51n9ojprZE.\n    style                                                         Modern\n    material                                                        Wood\n    color                                                           Wood\n    url                             https://www.amazon.com/dp/B0CKMRJ1H9\n    keywords                                                         NaN\n    img_description                                                  NaN\n    caption                                                          NaN\n    Name: 108, dtype: object: 'float' object is not iterable\n    Error creating embedding for title              PAK HOME Set of 2 High Gloss Brown Marble Look.\n    primary_image      https://m.media-amazon.com/images/I/51u3oxvEiS.\n    style                                                         Tripod\n    material                                                        Wood\n    color                            Brown Marble High Gloss / Gold Legs\n    url                             https://www.amazon."}


