# embeddings_queue

created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 141d3b8c-d3ab-4693-97df-990b39e36e6a
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb", "title": "GPT Action Library: Canvas LMS", "tokens": 3428, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"141d3b8c-d3ab-4693-97df-990b39e36e6a\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"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\": \"b855db84-51ad-43d4-9f4f-eb9bbd7b340b\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"94c0725c1d416af6c12c1420e12861595a263bf4f35c0fce50278483aa102078\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"6b43381c-2af6-4e99-8940-7644a60bea70\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"447d1750e38d9bbc6c9992842569ac779a2f989a6eb43ea1f31851749f42556d\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"614ff657-0365-4d60-9872-84427ef92a48\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"2f2dc3497a52a52e7e50ee32a030a4812df06ee8b5c284fa76a73dbe45f18401\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 7362, \"end_char_idx\": 8841, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "ref_doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "chroma:document": "parameters:\n         - name: course_id\n           in: path\n           required: true\n           schema:\n             type: integer\n         - name: student_id\n           in: path\n           required: true\n           schema:\n             type: integer\n       responses:\n         '200':\n           description: A list of grades for the student\n           content:\n             application/json:\n               schema:\n                 type: array\n                 items:\n                   $ref: '#/components/schemas/Grade'\n  /api/v1/courses/{course_id}/students/{student_id}/grades/{grade_id}:\n    get:\n      summary: Get a single grade\n      operationId: getGrade\n      parameters:\n        - name: course_id\n          in: path\n          required: true\n          schema:\n            type: integer\n        - name: student_id\n          in: path\n          required: true\n          schema:\n            type: integer\n        - name: grade_id\n          in: path\n          required: true\n          schema:\n            type: integer\n      responses:\n        '200':\n          description: Grade details\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Grade'\n  /api/v1/courses/{course_id}/syllabus:\n    get:\n      summary: Get course syllabus\n      operationId: getSyllabus\n      parameters:\n        - name: course_id\n          in: path\n          required: true\n          schema:\n            type: integer\n      responses:"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 614ff657-0365-4d60-9872-84427ef92a48
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb", "title": "GPT Action Library: Canvas LMS", "tokens": 3428, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"614ff657-0365-4d60-9872-84427ef92a48\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"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\": \"b855db84-51ad-43d4-9f4f-eb9bbd7b340b\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"94c0725c1d416af6c12c1420e12861595a263bf4f35c0fce50278483aa102078\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"141d3b8c-d3ab-4693-97df-990b39e36e6a\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"27112ca91eca67f2178e0f44dd5c83fa280017323df36368c73b09c18f1b8e8d\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"9f44eb5e-d3eb-4ddd-9773-d71f9c4cc3fb\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"561056e86e60a6c03b05bba153f73c7d09d4420a9391f0470f17d4aaac50c65e\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 8081, \"end_char_idx\": 9598, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "ref_doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "chroma:document": "in: path\n          required: true\n          schema:\n            type: integer\n        - name: student_id\n          in: path\n          required: true\n          schema:\n            type: integer\n        - name: grade_id\n          in: path\n          required: true\n          schema:\n            type: integer\n      responses:\n        '200':\n          description: Grade details\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Grade'\n  /api/v1/courses/{course_id}/syllabus:\n    get:\n      summary: Get course syllabus\n      operationId: getSyllabus\n      parameters:\n        - name: course_id\n          in: path\n          required: true\n          schema:\n            type: integer\n      responses:\n        '200':\n          description: Syllabus details\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Syllabus'\n  /api/v1/courses/{course_id}/modules:\n    get:\n      summary: List modules\n      operationId: listModules\n      parameters:\n        - name: course_id\n          in: path\n          required: true\n          schema:\n            type: integer\n      responses:\n        '200':\n          description: A list of modules in the course\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Module'\n  /api/v1/courses/{course_id}/modules/{module_id}:\n    get:\n      summary:"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 9f44eb5e-d3eb-4ddd-9773-d71f9c4cc3fb
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb", "title": "GPT Action Library: Canvas LMS", "tokens": 3428, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"9f44eb5e-d3eb-4ddd-9773-d71f9c4cc3fb\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"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\": \"b855db84-51ad-43d4-9f4f-eb9bbd7b340b\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"94c0725c1d416af6c12c1420e12861595a263bf4f35c0fce50278483aa102078\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"614ff657-0365-4d60-9872-84427ef92a48\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"b358736bac8478c69045d7016d757fecb835fc0827a72fe014b28dcd2e0ba45c\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"ab4cb8b8-9b6c-4dd6-b5b4-ece3c0579bba\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"f2bb1445c10a451995847b2ccdededf8b2f175ef358a10d3b69ba52d6287118f\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 8791, \"end_char_idx\": 10328, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "ref_doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "chroma:document": "schema:\n            type: integer\n      responses:\n        '200':\n          description: Syllabus details\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Syllabus'\n  /api/v1/courses/{course_id}/modules:\n    get:\n      summary: List modules\n      operationId: listModules\n      parameters:\n        - name: course_id\n          in: path\n          required: true\n          schema:\n            type: integer\n      responses:\n        '200':\n          description: A list of modules in the course\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Module'\n  /api/v1/courses/{course_id}/modules/{module_id}:\n    get:\n      summary: Get a single module\n      operationId: getModule\n      parameters:\n        - name: course_id\n          in: path\n          required: true\n          schema:\n            type: integer\n        - name: module_id\n          in: path\n          required: true\n          schema:\n            type: integer\n      responses:\n        '200':\n          description: Module details\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Module'\ncomponents:\n  schemas:\n    Account:\n      type: object\n      properties:\n        id:\n          type: integer\n        name:\n          type: string\n        workflow_state:\n          type: string\n    Course:\n      type: object\n      properties:"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: ab4cb8b8-9b6c-4dd6-b5b4-ece3c0579bba
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb", "title": "GPT Action Library: Canvas LMS", "tokens": 3428, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"ab4cb8b8-9b6c-4dd6-b5b4-ece3c0579bba\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"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\": \"b855db84-51ad-43d4-9f4f-eb9bbd7b340b\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"94c0725c1d416af6c12c1420e12861595a263bf4f35c0fce50278483aa102078\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"9f44eb5e-d3eb-4ddd-9773-d71f9c4cc3fb\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"c0c8608d21bf8ed70b57517b2cbb27bc8226501c3a4c3497592c8b3ea5e0ebb5\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c961d00e-4009-4649-9b7e-e3b2f44162ab\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"b132c387a92272479eab6c7f1c75eb108e93eb746b43fefc7bf16d26788f38b3\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 9526, \"end_char_idx\": 11031, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "ref_doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "chroma:document": "/api/v1/courses/{course_id}/modules/{module_id}:\n    get:\n      summary: Get a single module\n      operationId: getModule\n      parameters:\n        - name: course_id\n          in: path\n          required: true\n          schema:\n            type: integer\n        - name: module_id\n          in: path\n          required: true\n          schema:\n            type: integer\n      responses:\n        '200':\n          description: Module details\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Module'\ncomponents:\n  schemas:\n    Account:\n      type: object\n      properties:\n        id:\n          type: integer\n        name:\n          type: string\n        workflow_state:\n          type: string\n    Course:\n      type: object\n      properties:\n        id:\n          type: integer\n        name:\n          type: string\n        account_id:\n          type: integer\n        start_at:\n          type: string\n          format: date-time\n        end_at:\n          type: string\n          format: date-time\n    Assignment:\n      type: object\n      properties:\n        id:\n          type: integer\n        name:\n          type: string\n        description:\n          type: string\n        due_at:\n          type: string\n          format: date-time\n        points_possible:\n          type: number\n    Quiz:\n      type: object\n      properties:\n        id:\n          type: integer\n        title:\n          type: string\n        description:\n          type: string"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: c961d00e-4009-4649-9b7e-e3b2f44162ab
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb", "title": "GPT Action Library: Canvas LMS", "tokens": 3428, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"c961d00e-4009-4649-9b7e-e3b2f44162ab\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"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\": \"b855db84-51ad-43d4-9f4f-eb9bbd7b340b\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"94c0725c1d416af6c12c1420e12861595a263bf4f35c0fce50278483aa102078\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ab4cb8b8-9b6c-4dd6-b5b4-ece3c0579bba\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"74805180a66c6cdf4c8945d27369cf41515b51b2b784797b6eb6f972ae2b8e56\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"537c40c7-4993-4edc-aa34-00990e4562f1\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"9649608b95afbb434245406dc0aead34f2a4919f0932d85f31b52e772309efe0\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 10267, \"end_char_idx\": 11716, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "ref_doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "chroma:document": "type: string\n    Course:\n      type: object\n      properties:\n        id:\n          type: integer\n        name:\n          type: string\n        account_id:\n          type: integer\n        start_at:\n          type: string\n          format: date-time\n        end_at:\n          type: string\n          format: date-time\n    Assignment:\n      type: object\n      properties:\n        id:\n          type: integer\n        name:\n          type: string\n        description:\n          type: string\n        due_at:\n          type: string\n          format: date-time\n        points_possible:\n          type: number\n    Quiz:\n      type: object\n      properties:\n        id:\n          type: integer\n        title:\n          type: string\n        description:\n          type: string\n        due_at:\n          type: string\n          format: date-time\n        points_possible:\n          type: number\n    Grade:\n      type: object\n      properties:\n        id:\n          type: integer\n        student_id:\n          type: integer\n        course_id:\n          type: integer\n        assignment_id:\n          type: integer\n        score:\n          type: number\n        grade:\n          type: string\n    Syllabus:\n      type: object\n      properties:\n        id:\n          type: integer\n        name:\n          type: string\n        account_id:\n          type: integer\n        start_at:\n          type: string\n          format: date-time\n        end_at:\n          type: string"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 537c40c7-4993-4edc-aa34-00990e4562f1
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb", "title": "GPT Action Library: Canvas LMS", "tokens": 3428, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"537c40c7-4993-4edc-aa34-00990e4562f1\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"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\": \"b855db84-51ad-43d4-9f4f-eb9bbd7b340b\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"94c0725c1d416af6c12c1420e12861595a263bf4f35c0fce50278483aa102078\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"c961d00e-4009-4649-9b7e-e3b2f44162ab\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"2b3c83b4f803e41437030e2a288e3066ac2b82a31e72ead76753f0349fccdcbc\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f8027f8f-2e01-4190-90a5-bb9a7d1c3761\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"a77bb54a3415cc72a6dd24888762b5e467f066b99f5327e7671df294d6cd2d03\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 10975, \"end_char_idx\": 12764, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "ref_doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "chroma:document": "type: string\n        description:\n          type: string\n        due_at:\n          type: string\n          format: date-time\n        points_possible:\n          type: number\n    Grade:\n      type: object\n      properties:\n        id:\n          type: integer\n        student_id:\n          type: integer\n        course_id:\n          type: integer\n        assignment_id:\n          type: integer\n        score:\n          type: number\n        grade:\n          type: string\n    Syllabus:\n      type: object\n      properties:\n        id:\n          type: integer\n        name:\n          type: string\n        account_id:\n          type: integer\n        start_at:\n          type: string\n          format: date-time\n        end_at:\n          type: string\n          format: date-time\n        syllabus_body:\n          type: string\n        syllabus_url:\n          type: string\n    Module:\n     type: object\n     properties:\n       id:\n         type: integer\n       name:\n         type: string\n       position:\n         type: integer\n       unlock_at:\n         type: string\n         format: date-time\n       require_sequential_progress:\n         type: boolean\n       state:\n         type: string\n  securitySchemes:\n    bearerAuth:\n      type: http\n      scheme: bearer\n      bearerFormat: JWT\nsecurity:\n  - bearerAuth: []\n```\n\n**Note : this schema above does not contain all possible API endpoints, be sure to edit the schema to produce the appropriate actions from canvas [API documentation](https://canvas.instructure.com/doc/api/)**\n\n## Authentication Instructions\n\nBelow are instructions on setting up authentication with this 3rd party application. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: f8027f8f-2e01-4190-90a5-bb9a7d1c3761
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb", "title": "GPT Action Library: Canvas LMS", "tokens": 3428, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f8027f8f-2e01-4190-90a5-bb9a7d1c3761\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"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\": \"b855db84-51ad-43d4-9f4f-eb9bbd7b340b\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"94c0725c1d416af6c12c1420e12861595a263bf4f35c0fce50278483aa102078\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"537c40c7-4993-4edc-aa34-00990e4562f1\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"1414c94279f21a64235fe2ce6fe394c68b5ac2a7e23d0262d24e0f6b660f7823\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"7d07c0c3-e68d-48ae-ba48-1245587541e9\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"982d739678175bf3b3244fa608fced3f3b7ecd5bb022e9753f1a07380dc0c44a\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 11660, \"end_char_idx\": 14068, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "ref_doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "chroma:document": "format: date-time\n        end_at:\n          type: string\n          format: date-time\n        syllabus_body:\n          type: string\n        syllabus_url:\n          type: string\n    Module:\n     type: object\n     properties:\n       id:\n         type: integer\n       name:\n         type: string\n       position:\n         type: integer\n       unlock_at:\n         type: string\n         format: date-time\n       require_sequential_progress:\n         type: boolean\n       state:\n         type: string\n  securitySchemes:\n    bearerAuth:\n      type: http\n      scheme: bearer\n      bearerFormat: JWT\nsecurity:\n  - bearerAuth: []\n```\n\n**Note : this schema above does not contain all possible API endpoints, be sure to edit the schema to produce the appropriate actions from canvas [API documentation](https://canvas.instructure.com/doc/api/)**\n\n## Authentication Instructions\n\nBelow are instructions on setting up authentication with this 3rd party application. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n### Pre-Action Steps\n\nBefore you set up authentication in ChatGPT, please take the following steps in the application. Our sample integration below is utilizing a secret key, which is an easier method for testing. In production, it is more common to establish an OAuth connection to ensure permissions are respected from ChatGPT to Canvas, ensuring users the appropriate access. \n\n1. Canvas accounts : The first step is to ensure the canvas environment has users assigned to the appropriate role (student / teacher) with any access to appropriate courses\n2. For testing purposes or service level account access create an approved integration access token as seen below\n- Under Account -> Settings -> Approved Integrations\n\n<br> ![gptactions_canvaslms_settings.png](../../../images/gptactions_canvaslms_settings.png)\n\n- Create new Access Token\n\n<br> ![gptactions_canvaslms_integrationslist.png](../../../images/gptactions_canvaslms_integrationslist.png)\n\n- Provide purpose and expiration\n\n<br> ![gptactions_canvaslms_tokencreate.png](../../../images/gptactions_canvaslms_tokencreate.png)\n\n- Copy the new Token to use in the GPT Action (the token will not be accessible once you leave the page - ensure proper token management access is maintained to prevent unauthorzied access from another application."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 7d07c0c3-e68d-48ae-ba48-1245587541e9
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb", "title": "GPT Action Library: Canvas LMS", "tokens": 3428, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"7d07c0c3-e68d-48ae-ba48-1245587541e9\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"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\": \"b855db84-51ad-43d4-9f4f-eb9bbd7b340b\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"94c0725c1d416af6c12c1420e12861595a263bf4f35c0fce50278483aa102078\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f8027f8f-2e01-4190-90a5-bb9a7d1c3761\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvaslms.ipynb\", \"title\": \"GPT Action Library: Canvas LMS\", \"tokens\": 3428, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"dcda8d551b693d67f821c659f4fd07b25076d6bff21e8c7a306bdc266cdc1340\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 12212, \"end_char_idx\": 16088, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "ref_doc_id": "b855db84-51ad-43d4-9f4f-eb9bbd7b340b", "chroma:document": "scheme: bearer\n      bearerFormat: JWT\nsecurity:\n  - bearerAuth: []\n```\n\n**Note : this schema above does not contain all possible API endpoints, be sure to edit the schema to produce the appropriate actions from canvas [API documentation](https://canvas.instructure.com/doc/api/)**\n\n## Authentication Instructions\n\nBelow are instructions on setting up authentication with this 3rd party application. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n### Pre-Action Steps\n\nBefore you set up authentication in ChatGPT, please take the following steps in the application. Our sample integration below is utilizing a secret key, which is an easier method for testing. In production, it is more common to establish an OAuth connection to ensure permissions are respected from ChatGPT to Canvas, ensuring users the appropriate access. \n\n1. Canvas accounts : The first step is to ensure the canvas environment has users assigned to the appropriate role (student / teacher) with any access to appropriate courses\n2. For testing purposes or service level account access create an approved integration access token as seen below\n- Under Account -> Settings -> Approved Integrations\n\n<br> ![gptactions_canvaslms_settings.png](../../../images/gptactions_canvaslms_settings.png)\n\n- Create new Access Token\n\n<br> ![gptactions_canvaslms_integrationslist.png](../../../images/gptactions_canvaslms_integrationslist.png)\n\n- Provide purpose and expiration\n\n<br> ![gptactions_canvaslms_tokencreate.png](../../../images/gptactions_canvaslms_tokencreate.png)\n\n- Copy the new Token to use in the GPT Action (the token will not be accessible once you leave the page - ensure proper token management access is maintained to prevent unauthorzied access from another application.\n\n\n### In ChatGPT\n\nIn ChatGPT, click on \"Authentication\" and choose **\"API Key\"**. Enter in the information below. API Key provides general access to the Canvas environment based on the users permissions that created the API key, to follow permission models in Canvas use the OAuth method described below.\n\n- **API Key**: Use the token from above \n- **Auth Type**: Bearer\n\n<br> ![gptactions_canvaslms_auth.png](../../../images/gptactions_canvaslms_auth.png)\n\n**OAuth Connection**\n\nIf you want to implement OAuth, follow the guide here : https://canvas.instructure.com/doc/api/file.oauth.html - specific instructions can vary depending on the Canvas implementation.\n\nParameters for GPT Configuration\n- Client ID - obtained from site owner\n- Client Secret - obtained from site owner \n- Authorization URL - : https://< canvas-install-url >/login/oauth2/auth?client_id=XXX&response_type=code&redirect_uri=https://example.com/oauth_complete&state=YYY&scope=< value_1 >%20< value_2 >%20< value_n >\n- Token URL : https://< canvas-install-url> /login/oauth2/token \n\n### Post-Action Steps\n\nOnce you've set up authentication in ChatGPT, follow the steps below in the application to test the Action.\n\n- You will see a list of available actions from the API schema for Canvas, you can test the endpoints from the GPT builder to ensure Canvas can be reached. Once you verified connection make sure to save the GPT and share it witht the appropriate user base.\n- Note: if you are using OAuth, you will need to set up the callback URL from ChatGPT in the Canvas app\n\n### FAQ & Troubleshooting\n\n- *Schema calls the wrong project or dataset:* If ChatGPT calls the wrong project or dataset, consider updating your instructions to make it more explicit either (a) which project / dataset should be called or (b) to require the user provide those exact details before it runs the query\n\n*Are there integrations that you\u2019d like us to prioritize? Are there errors in our integrations? File a PR or issue in our github, and we\u2019ll take a look.*"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: eab4176c-2b1d-4e99-9d53-e6a95141b933
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb", "title": "**GPT Action Library: Google Drive**", "tokens": 3718, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"eab4176c-2b1d-4e99-9d53-e6a95141b933\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"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\": \"55083893-05db-483d-a770-e73ba6436bde\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"3b3da2445c3053f1309894f6d29a740434dd15d0925ded0cfce06c919140d5e6\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"fb405a77-6611-4a8f-b5a3-959aebfc53d4\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"b1743cde07531228ca3df86446128c21cfe847f913ca8737e8393982bc299e27\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 0, \"end_char_idx\": 3504, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "55083893-05db-483d-a770-e73ba6436bde", "doc_id": "55083893-05db-483d-a770-e73ba6436bde", "ref_doc_id": "55083893-05db-483d-a770-e73ba6436bde", "chroma:document": "# **GPT Action Library: Google Drive**\n\n\n## **Introduction**\n\nThis page provides an instruction & guide for developers building a GPT Action for a specific application. Before you proceed, make sure to first familiarize yourself with the following information:\n\n\n* [Introduction to GPT Actions](https://platform.openai.com/docs/actions/introduction)\n* [Introduction to GPT Actions Library](https://platform.openai.com/docs/actions/actions-library)\n* [Example of Building a GPT Action from Scratch](https://platform.openai.com/docs/actions/getting-started)\n\nThis particular GPT Action provides an overview of how to connect to **Google Drive**, Google\u2019s File storage system. This action will allow you to list and query against file names, load the file content into your GPT, and ultimately use that data as context in ChatGPT.  This set of actions is extensible by additional methods found via the [Google Drive API](https://developers.google.com/drive/api/guides/about-sdk).  This is great if you want a generalist GPT that can read smaller files, such as: \n\n\n* Meetings minutes\n* Product design documents\n* Short memos\n* Frequently-asked questions\n\nFor something that wants to read longer memos such as entire books, complex CSVs with many rows, we suggest building a Google Docs or Google Sheets-specific GPT.\n\n### Value + Example business case\n\nUsers can now leverage ChatGPT's natural language capability to connect directly to files in Google Drive\n\nExample Use Cases:\n\n- A user needs to look up which files relate to a certain topic\n- A user needs an answer to a critical question, buried deep in documents\n\n\n## **Application Information**\n\n\n### **Application Key Links**\n\nCheck out these links from the application before you get started:\n\n\n* Application Website: [https://www.google.com/drive/](https://www.google.com/drive/)\n* Application API Documentation: [https://developers.google.com/drive/api/guides/about-sdk](https://developers.google.com/drive/api/guides/about-sdk)\n\n\n### **Application Prerequisites**\n\nBefore you get started, make sure you have a Google Cloud account and that the Drive API is enabled:\n\n\n\n* Set up a Google Cloud project\n* Enable Google Drive API from Google API Library\n* If application\u2019s  \u201cPublishing Status\u201d is \u201cTesting\u201d, ensure users are added to your application\n\n\n## **ChatGPT Steps**\n\n\n### **Example Custom GPT Instructions**\n\nOnce you've created a Custom GPT, to get started, copy the text below in the Instructions panel. You may have to add additional context specific to your use case.  In this way, it is worth testing additional instructions you add to optimize for clarity and accuracy. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n\n\n```python\n*** Context *** \n\nYou are an office helper who takes a look at files within Google Drive and reads in information.  In this way, when asked about something, please take a look at all of the relevant information within the drive.  Respect file names, but also take a look at each document and sheet.\n\n*** Instructions ***\n\nUse the 'listFiles' function to get a list of files available within docs.  In this way, determine out of this list which files make the most sense for you to pull back taking into account name and title.  After the output of listFiles is called into context, act like a normal business analyst.  Things you could be asked to be are:\n\n- Summaries: what happens in a given file?"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: fb405a77-6611-4a8f-b5a3-959aebfc53d4
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb", "title": "**GPT Action Library: Google Drive**", "tokens": 3718, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"fb405a77-6611-4a8f-b5a3-959aebfc53d4\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"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\": \"55083893-05db-483d-a770-e73ba6436bde\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"3b3da2445c3053f1309894f6d29a740434dd15d0925ded0cfce06c919140d5e6\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"eab4176c-2b1d-4e99-9d53-e6a95141b933\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"0d9ca6e8af91e6131c763b578e9f89e8512a92cc86ceb00da811183cde8fa68c\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"ec475a25-73be-46b9-97ef-8dc00395395d\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"4854a6b6bbd38addc675a063b35765db7c06b647a353791d9dc2d431f338cd49\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 1750, \"end_char_idx\": 5161, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "55083893-05db-483d-a770-e73ba6436bde", "doc_id": "55083893-05db-483d-a770-e73ba6436bde", "ref_doc_id": "55083893-05db-483d-a770-e73ba6436bde", "chroma:document": "* Application Website: [https://www.google.com/drive/](https://www.google.com/drive/)\n* Application API Documentation: [https://developers.google.com/drive/api/guides/about-sdk](https://developers.google.com/drive/api/guides/about-sdk)\n\n\n### **Application Prerequisites**\n\nBefore you get started, make sure you have a Google Cloud account and that the Drive API is enabled:\n\n\n\n* Set up a Google Cloud project\n* Enable Google Drive API from Google API Library\n* If application\u2019s  \u201cPublishing Status\u201d is \u201cTesting\u201d, ensure users are added to your application\n\n\n## **ChatGPT Steps**\n\n\n### **Example Custom GPT Instructions**\n\nOnce you've created a Custom GPT, to get started, copy the text below in the Instructions panel. You may have to add additional context specific to your use case.  In this way, it is worth testing additional instructions you add to optimize for clarity and accuracy. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n\n\n```python\n*** Context *** \n\nYou are an office helper who takes a look at files within Google Drive and reads in information.  In this way, when asked about something, please take a look at all of the relevant information within the drive.  Respect file names, but also take a look at each document and sheet.\n\n*** Instructions ***\n\nUse the 'listFiles' function to get a list of files available within docs.  In this way, determine out of this list which files make the most sense for you to pull back taking into account name and title.  After the output of listFiles is called into context, act like a normal business analyst.  Things you could be asked to be are:\n\n- Summaries: what happens in a given file?  Please give a consistent, concise answer and read through the entire file before giving an answer.\n- Professionalism: Behave professionally, providing clear and concise responses.\n- Synthesis, Coding, and Data Analysis: ensure coding blocks are explained.\n- When handling dates: make sure that dates are searched using date fields and also if you don't find anything, use titles.\n- Clarification: Ask for clarification when needed to ensure accuracy and completeness in fulfilling user requests.  Try to make sure you know exactly what is being asked. \n- Privacy and Security: Respect user privacy and handle all data securely.\n\n*** Examples of Documentation ***\nHere is the relevant query documentation from Google for the listFiles function:\nWhat you want to query\tExample\nFiles with the name \"hello\"\tname = 'hello'\nFiles with a name containing the words \"hello\" and \"goodbye\"\tname contains 'hello' and name contains 'goodbye'\nFiles with a name that does not contain the word \"hello\"\tnot name contains 'hello'\nFolders that are Google apps or have the folder MIME type\tmimeType = 'application/vnd.google-apps.folder'\nFiles that are not folders\tmimeType != 'application/vnd.google-apps.folder'\nFiles that contain the text \"important\" and in the trash\tfullText contains 'important' and trashed = true\nFiles that contain the word \"hello\"\tfullText contains 'hello'\nFiles that do not have the word \"hello\"\tnot fullText contains 'hello'\nFiles that contain the exact phrase \"hello world\"\tfullText contains '\"hello world\"'\nFiles with a query that contains the \"\\\" character (e.g., \"\\authors\")\tfullText contains '\\\\authors'\nFiles with ID within a collection, e.g."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: ec475a25-73be-46b9-97ef-8dc00395395d
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb", "title": "**GPT Action Library: Google Drive**", "tokens": 3718, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"ec475a25-73be-46b9-97ef-8dc00395395d\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"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\": \"55083893-05db-483d-a770-e73ba6436bde\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"3b3da2445c3053f1309894f6d29a740434dd15d0925ded0cfce06c919140d5e6\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"fb405a77-6611-4a8f-b5a3-959aebfc53d4\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e58d0746618966b5fefc0cedfc1796d837d766480618af4e89061d8d4b0f07de\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"5b034ae1-efa0-4677-b495-ee5a1c7d4f90\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"064258fd1e74e3c1bbec3c6cefec6f9627eeb7620687e7fc9b6b43a895cf100f\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 3333, \"end_char_idx\": 6449, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "55083893-05db-483d-a770-e73ba6436bde", "doc_id": "55083893-05db-483d-a770-e73ba6436bde", "ref_doc_id": "55083893-05db-483d-a770-e73ba6436bde", "chroma:document": "After the output of listFiles is called into context, act like a normal business analyst.  Things you could be asked to be are:\n\n- Summaries: what happens in a given file?  Please give a consistent, concise answer and read through the entire file before giving an answer.\n- Professionalism: Behave professionally, providing clear and concise responses.\n- Synthesis, Coding, and Data Analysis: ensure coding blocks are explained.\n- When handling dates: make sure that dates are searched using date fields and also if you don't find anything, use titles.\n- Clarification: Ask for clarification when needed to ensure accuracy and completeness in fulfilling user requests.  Try to make sure you know exactly what is being asked. \n- Privacy and Security: Respect user privacy and handle all data securely.\n\n*** Examples of Documentation ***\nHere is the relevant query documentation from Google for the listFiles function:\nWhat you want to query\tExample\nFiles with the name \"hello\"\tname = 'hello'\nFiles with a name containing the words \"hello\" and \"goodbye\"\tname contains 'hello' and name contains 'goodbye'\nFiles with a name that does not contain the word \"hello\"\tnot name contains 'hello'\nFolders that are Google apps or have the folder MIME type\tmimeType = 'application/vnd.google-apps.folder'\nFiles that are not folders\tmimeType != 'application/vnd.google-apps.folder'\nFiles that contain the text \"important\" and in the trash\tfullText contains 'important' and trashed = true\nFiles that contain the word \"hello\"\tfullText contains 'hello'\nFiles that do not have the word \"hello\"\tnot fullText contains 'hello'\nFiles that contain the exact phrase \"hello world\"\tfullText contains '\"hello world\"'\nFiles with a query that contains the \"\\\" character (e.g., \"\\authors\")\tfullText contains '\\\\authors'\nFiles with ID within a collection, e.g. parents collection\t'1234567' in parents\nFiles in an application data folder in a collection\t'appDataFolder' in parents\nFiles for which user \"test@example.org\" has write permission\t'test@example.org' in writers\nFiles for which members of the group \"group@example.org\" have write permission\t'group@example.org' in writers\nFiles modified after a given date\tmodifiedTime > '2012-06-04T12:00:00' // default time zone is UTC\nFiles shared with the authorized user with \"hello\" in the name\tsharedWithMe and name contains 'hello'\nFiles that have not been shared with anyone or domains (only private, or shared with specific users or groups)\tvisibility = 'limited'\nImage or video files modified after a specific date\tmodifiedTime > '2012-06-04T12:00:00' and (mimeType contains 'image/' or mimeType contains 'video/')\n\n```\n\n### **Example OpenAPI Schema**\n\nOnce you've created a Custom GPT, copy the text below in the Actions panel.  This offers an example of what you could include within functions, but . Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/getting-started) to see how this step works in more detail.  As well, try [ActionsGPT](https://chatgpt.com/g/g-TYEliDU6A-actionsgpt), a CustomGPT OpenAI created to help with Actions.  The three examples are:"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 5b034ae1-efa0-4677-b495-ee5a1c7d4f90
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb", "title": "**GPT Action Library: Google Drive**", "tokens": 3718, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"5b034ae1-efa0-4677-b495-ee5a1c7d4f90\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"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\": \"55083893-05db-483d-a770-e73ba6436bde\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"3b3da2445c3053f1309894f6d29a740434dd15d0925ded0cfce06c919140d5e6\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ec475a25-73be-46b9-97ef-8dc00395395d\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"c6cec0fc67019293d4329b6cea0b04a57f8cb5c76e97e787eb6f53b1b1173d10\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"160f040d-802e-4c86-ad57-c1204590253f\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"ccc0d11bd466e53588d2216578a708cd9f5b8ad0b5f149899e087339eb300afb\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 5162, \"end_char_idx\": 8068, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "55083893-05db-483d-a770-e73ba6436bde", "doc_id": "55083893-05db-483d-a770-e73ba6436bde", "ref_doc_id": "55083893-05db-483d-a770-e73ba6436bde", "chroma:document": "parents collection\t'1234567' in parents\nFiles in an application data folder in a collection\t'appDataFolder' in parents\nFiles for which user \"test@example.org\" has write permission\t'test@example.org' in writers\nFiles for which members of the group \"group@example.org\" have write permission\t'group@example.org' in writers\nFiles modified after a given date\tmodifiedTime > '2012-06-04T12:00:00' // default time zone is UTC\nFiles shared with the authorized user with \"hello\" in the name\tsharedWithMe and name contains 'hello'\nFiles that have not been shared with anyone or domains (only private, or shared with specific users or groups)\tvisibility = 'limited'\nImage or video files modified after a specific date\tmodifiedTime > '2012-06-04T12:00:00' and (mimeType contains 'image/' or mimeType contains 'video/')\n\n```\n\n### **Example OpenAPI Schema**\n\nOnce you've created a Custom GPT, copy the text below in the Actions panel.  This offers an example of what you could include within functions, but . Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/getting-started) to see how this step works in more detail.  As well, try [ActionsGPT](https://chatgpt.com/g/g-TYEliDU6A-actionsgpt), a CustomGPT OpenAI created to help with Actions.  The three examples are:\n\n\n* **List Files**: this is the core action that lists the files in your drive.  Within this are a few parameters, such as `q`, `includeItemsFromAllDrives,supportsAllDrives`\n* **Get Metadata**: in case list doesn't work, this can offer as a backup based on certain results - for example, if users attempt to make a search via \u201cmeeting from last week\u201d, etc \n* **Export**: exports in a byte content.  For more reading, please consult [https://developers.google.com/drive/api/reference/rest/v3/files/export](https://developers.google.com/drive/api/reference/rest/v3/files/export)\n\nGenerally, if \u2018get\u2019 is used, the model will attempt to download the file, which may be undesirable. Thus, Export is recommended instead.\n\n\n\n\n```python\n\n{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Google Drive API\",\n    \"description\": \"API for interacting with Google Drive\",\n    \"version\": \"1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"https://www.googleapis.com/drive/v3\"\n    }\n  ],\n  \"paths\": {\n    \"/files\": {\n      \"get\": {\n        \"operationId\": \"ListFiles\",\n        \"summary\": \"List files\",\n        \"description\": \"Retrieve a list of files in the user's Google Drive.\",\n        \"parameters\": [\n          {\n            \"name\": \"q\",\n            \"in\": \"query\",\n            \"description\": \"Query string for searching files.\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"includeItemsFromAllDrives\",\n            \"in\": \"query\",\n            \"description\": \"Whether both My Drive and shared drive items should be included in results."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 160f040d-802e-4c86-ad57-c1204590253f
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb", "title": "**GPT Action Library: Google Drive**", "tokens": 3718, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"160f040d-802e-4c86-ad57-c1204590253f\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"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\": \"55083893-05db-483d-a770-e73ba6436bde\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"3b3da2445c3053f1309894f6d29a740434dd15d0925ded0cfce06c919140d5e6\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"5b034ae1-efa0-4677-b495-ee5a1c7d4f90\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"a117de977b758b70f8c33379eaaef57b9c1dc9667bdccad0f5c32f9b880b0e72\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"de974e36-d18f-4e89-9def-6ff8c1a99216\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"ae15a92928bcadc4f7ffe41af29a8591f3422e88b56c3e31cdb65c3cd009738a\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 6426, \"end_char_idx\": 9858, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "55083893-05db-483d-a770-e73ba6436bde", "doc_id": "55083893-05db-483d-a770-e73ba6436bde", "ref_doc_id": "55083893-05db-483d-a770-e73ba6436bde", "chroma:document": "The three examples are:\n\n\n* **List Files**: this is the core action that lists the files in your drive.  Within this are a few parameters, such as `q`, `includeItemsFromAllDrives,supportsAllDrives`\n* **Get Metadata**: in case list doesn't work, this can offer as a backup based on certain results - for example, if users attempt to make a search via \u201cmeeting from last week\u201d, etc \n* **Export**: exports in a byte content.  For more reading, please consult [https://developers.google.com/drive/api/reference/rest/v3/files/export](https://developers.google.com/drive/api/reference/rest/v3/files/export)\n\nGenerally, if \u2018get\u2019 is used, the model will attempt to download the file, which may be undesirable. Thus, Export is recommended instead.\n\n\n\n\n```python\n\n{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Google Drive API\",\n    \"description\": \"API for interacting with Google Drive\",\n    \"version\": \"1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"https://www.googleapis.com/drive/v3\"\n    }\n  ],\n  \"paths\": {\n    \"/files\": {\n      \"get\": {\n        \"operationId\": \"ListFiles\",\n        \"summary\": \"List files\",\n        \"description\": \"Retrieve a list of files in the user's Google Drive.\",\n        \"parameters\": [\n          {\n            \"name\": \"q\",\n            \"in\": \"query\",\n            \"description\": \"Query string for searching files.\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"includeItemsFromAllDrives\",\n            \"in\": \"query\",\n            \"description\": \"Whether both My Drive and shared drive items should be included in results.\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"supportsAllDrives\",\n            \"in\": \"query\",\n            \"description\": \"Whether the requesting application supports both My Drives and shared drives.\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"pageSize\",\n            \"in\": \"query\",\n            \"description\": \"Maximum number of files to return.\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"integer\",\n              \"default\": 10\n            }\n          },\n          {\n            \"name\": \"pageToken\",\n            \"in\": \"query\",\n            \"description\": \"Token for continuing a previous list request.\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"fields\",\n            \"in\": \"query\",\n            \"description\": \"Comma-separated list of fields to include in the response.\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of files.\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"kind\": {\n                      \"type\": \"string\",\n                      \"example\": \"drive#fileList\"\n                    },\n                    \"nextPageToken\": {\n                      \"type\": \"string\",\n                      \"description\": \"Token to retrieve the next page of results.\""}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: de974e36-d18f-4e89-9def-6ff8c1a99216
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb", "title": "**GPT Action Library: Google Drive**", "tokens": 3718, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"de974e36-d18f-4e89-9def-6ff8c1a99216\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"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\": \"55083893-05db-483d-a770-e73ba6436bde\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"3b3da2445c3053f1309894f6d29a740434dd15d0925ded0cfce06c919140d5e6\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"160f040d-802e-4c86-ad57-c1204590253f\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"a48a8b93b7718b96bcd70e27d965db3bd74d52b80e317baaca2f656a56b64424\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c2746d77-15e1-4677-9690-8b5871ad167e\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"16f49f2ec67bd5fefd0e342a728eed99be7e72c7458311081d8645c134f98d4c\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 8068, \"end_char_idx\": 11392, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "55083893-05db-483d-a770-e73ba6436bde", "doc_id": "55083893-05db-483d-a770-e73ba6436bde", "ref_doc_id": "55083893-05db-483d-a770-e73ba6436bde", "chroma:document": "\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"supportsAllDrives\",\n            \"in\": \"query\",\n            \"description\": \"Whether the requesting application supports both My Drives and shared drives.\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"pageSize\",\n            \"in\": \"query\",\n            \"description\": \"Maximum number of files to return.\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"integer\",\n              \"default\": 10\n            }\n          },\n          {\n            \"name\": \"pageToken\",\n            \"in\": \"query\",\n            \"description\": \"Token for continuing a previous list request.\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"fields\",\n            \"in\": \"query\",\n            \"description\": \"Comma-separated list of fields to include in the response.\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of files.\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"kind\": {\n                      \"type\": \"string\",\n                      \"example\": \"drive#fileList\"\n                    },\n                    \"nextPageToken\": {\n                      \"type\": \"string\",\n                      \"description\": \"Token to retrieve the next page of results.\"\n                    },\n                    \"files\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"type\": \"object\",\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"string\"\n                          },\n                          \"name\": {\n                            \"type\": \"string\"\n                          },\n                          \"mimeType\": {\n                            \"type\": \"string\"\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/files/{fileId}\": {\n      \"get\": {\n        \"operationId\": \"getMetadata\",\n        \"summary\": \"Get file metadata\",\n        \"description\": \"Retrieve metadata for a specific file.\",\n        \"parameters\": [\n          {\n            \"name\": \"fileId\",\n            \"in\": \"path\",\n            \"description\": \"ID of the file to retrieve.\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"fields\",\n            \"in\": \"query\",\n            \"description\": \"Comma-separated list of fields to include in the response.\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Metadata of the file."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: c2746d77-15e1-4677-9690-8b5871ad167e
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb", "title": "**GPT Action Library: Google Drive**", "tokens": 3718, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"c2746d77-15e1-4677-9690-8b5871ad167e\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"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\": \"55083893-05db-483d-a770-e73ba6436bde\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"3b3da2445c3053f1309894f6d29a740434dd15d0925ded0cfce06c919140d5e6\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"de974e36-d18f-4e89-9def-6ff8c1a99216\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"dc320d9b5d511ac4c1c34dbfdad7500aefd3a71f12b738248b8fce09c8037caf\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"964a937e-720e-41bf-abaf-1acb7fba672f\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"e51a256222a5688818a7b626e58e3785decc9affb848ed1e970b2626830cef59\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 9392, \"end_char_idx\": 13178, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "55083893-05db-483d-a770-e73ba6436bde", "doc_id": "55083893-05db-483d-a770-e73ba6436bde", "ref_doc_id": "55083893-05db-483d-a770-e73ba6436bde", "chroma:document": "\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"kind\": {\n                      \"type\": \"string\",\n                      \"example\": \"drive#fileList\"\n                    },\n                    \"nextPageToken\": {\n                      \"type\": \"string\",\n                      \"description\": \"Token to retrieve the next page of results.\"\n                    },\n                    \"files\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"type\": \"object\",\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"string\"\n                          },\n                          \"name\": {\n                            \"type\": \"string\"\n                          },\n                          \"mimeType\": {\n                            \"type\": \"string\"\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/files/{fileId}\": {\n      \"get\": {\n        \"operationId\": \"getMetadata\",\n        \"summary\": \"Get file metadata\",\n        \"description\": \"Retrieve metadata for a specific file.\",\n        \"parameters\": [\n          {\n            \"name\": \"fileId\",\n            \"in\": \"path\",\n            \"description\": \"ID of the file to retrieve.\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"fields\",\n            \"in\": \"query\",\n            \"description\": \"Comma-separated list of fields to include in the response.\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Metadata of the file.\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"id\": {\n                      \"type\": \"string\"\n                    },\n                    \"name\": {\n                      \"type\": \"string\"\n                    },\n                    \"mimeType\": {\n                      \"type\": \"string\"\n                    },\n                    \"description\": {\n                      \"type\": \"string\"\n                    },\n                    \"createdTime\": {\n                      \"type\": \"string\",\n                      \"format\": \"date-time\"\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/files/{fileId}/export\": {\n      \"get\": {\n        \"operationId\": \"export\",\n        \"summary\": \"Export a file\",\n        \"description\": \"Export a Google Doc to the requested MIME type.\",\n        \"parameters\": [\n          {\n            \"name\": \"fileId\",\n            \"in\": \"path\",\n            \"description\": \"ID of the file to export.\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"mimeType\",\n            \"in\": \"query\",\n            \"description\": \"The MIME type of the format to export to.\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"application/pdf\",\n                \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n                \"text/plain\"\n              ]\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"The exported file."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 964a937e-720e-41bf-abaf-1acb7fba672f
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb", "title": "**GPT Action Library: Google Drive**", "tokens": 3718, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"964a937e-720e-41bf-abaf-1acb7fba672f\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"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\": \"55083893-05db-483d-a770-e73ba6436bde\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"3b3da2445c3053f1309894f6d29a740434dd15d0925ded0cfce06c919140d5e6\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"c2746d77-15e1-4677-9690-8b5871ad167e\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"9799203d54dfdb24f12bfc6b52c982623176fe90e6a0988566216c93bfb9d25a\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"5c957989-0f62-4775-9fc7-415a8612dfc6\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"96311f5a307109484e21b27d39528032a939c2b2ed7797036f785490d48b9153\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 11175, \"end_char_idx\": 14945, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "55083893-05db-483d-a770-e73ba6436bde", "doc_id": "55083893-05db-483d-a770-e73ba6436bde", "ref_doc_id": "55083893-05db-483d-a770-e73ba6436bde", "chroma:document": "\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Metadata of the file.\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"id\": {\n                      \"type\": \"string\"\n                    },\n                    \"name\": {\n                      \"type\": \"string\"\n                    },\n                    \"mimeType\": {\n                      \"type\": \"string\"\n                    },\n                    \"description\": {\n                      \"type\": \"string\"\n                    },\n                    \"createdTime\": {\n                      \"type\": \"string\",\n                      \"format\": \"date-time\"\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/files/{fileId}/export\": {\n      \"get\": {\n        \"operationId\": \"export\",\n        \"summary\": \"Export a file\",\n        \"description\": \"Export a Google Doc to the requested MIME type.\",\n        \"parameters\": [\n          {\n            \"name\": \"fileId\",\n            \"in\": \"path\",\n            \"description\": \"ID of the file to export.\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"mimeType\",\n            \"in\": \"query\",\n            \"description\": \"The MIME type of the format to export to.\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"application/pdf\",\n                \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n                \"text/plain\"\n              ]\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"The exported file.\",\n            \"content\": {\n              \"application/pdf\": {\n                \"schema\": {\n                  \"type\": \"string\",\n                  \"format\": \"binary\"\n                }\n              },\n              \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\": {\n                \"schema\": {\n                  \"type\": \"string\",\n                  \"format\": \"binary\"\n                }\n              },\n              \"text/plain\": {\n                \"schema\": {\n                  \"type\": \"string\",\n                  \"format\": \"binary\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid MIME type or file ID.\"\n          },\n          \"404\": {\n            \"description\": \"File not found.\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n## **Authentication Instructions**\n\nBelow are instructions on setting up authentication with this 3rd party application. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n\n### **Pre-Action Steps**\n\nBefore you set up authentication in ChatGPT, please take the following steps in the application.\n\n\n\n* Go to the Google Cloud Console\n* Navigate to Enabled API & Services and enable Google Drive API \n\n\n![alt_text](../../../images/gptactions_gd_api_services_pin.png \"api_and_services\")\n\n![alt_text](../../../images/gptactions_gd_nav_to_enabled_api.png \"api_lib\")\n\n\n* Within the search bar, search Google Drive API:\n\n![alt_text](../../../images/gptactions_gd_search_google_drive_api.png \"gpt_actions\")\n\n\n* Create new OAuth credentials (or use an existing one).  Note that if you haven\u2019t set up an OAuth credentials screen, you will need to do that."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 5c957989-0f62-4775-9fc7-415a8612dfc6
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb", "title": "**GPT Action Library: Google Drive**", "tokens": 3718, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"5c957989-0f62-4775-9fc7-415a8612dfc6\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"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\": \"55083893-05db-483d-a770-e73ba6436bde\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"3b3da2445c3053f1309894f6d29a740434dd15d0925ded0cfce06c919140d5e6\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"964a937e-720e-41bf-abaf-1acb7fba672f\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"1856076344f9611277b72d36dfd80a2255bd2c5e3aa0907a98820b67992eeef8\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b87b48d5-f87f-4444-b8db-3fe3a22e5912\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"01278a3075e0a001bc4859e984d6cf426d50d3b87dbbca0085a1b626a2169fd4\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 13178, \"end_char_idx\": 16641, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "55083893-05db-483d-a770-e73ba6436bde", "doc_id": "55083893-05db-483d-a770-e73ba6436bde", "ref_doc_id": "55083893-05db-483d-a770-e73ba6436bde", "chroma:document": "\",\n            \"content\": {\n              \"application/pdf\": {\n                \"schema\": {\n                  \"type\": \"string\",\n                  \"format\": \"binary\"\n                }\n              },\n              \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\": {\n                \"schema\": {\n                  \"type\": \"string\",\n                  \"format\": \"binary\"\n                }\n              },\n              \"text/plain\": {\n                \"schema\": {\n                  \"type\": \"string\",\n                  \"format\": \"binary\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid MIME type or file ID.\"\n          },\n          \"404\": {\n            \"description\": \"File not found.\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n## **Authentication Instructions**\n\nBelow are instructions on setting up authentication with this 3rd party application. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n\n### **Pre-Action Steps**\n\nBefore you set up authentication in ChatGPT, please take the following steps in the application.\n\n\n\n* Go to the Google Cloud Console\n* Navigate to Enabled API & Services and enable Google Drive API \n\n\n![alt_text](../../../images/gptactions_gd_api_services_pin.png \"api_and_services\")\n\n![alt_text](../../../images/gptactions_gd_nav_to_enabled_api.png \"api_lib\")\n\n\n* Within the search bar, search Google Drive API:\n\n![alt_text](../../../images/gptactions_gd_search_google_drive_api.png \"gpt_actions\")\n\n\n* Create new OAuth credentials (or use an existing one).  Note that if you haven\u2019t set up an OAuth credentials screen, you will need to do that.\n\n\n![alt_text](../../../images/gptactions_gd_oauth_consent_screen.png \"oauth_consent\")\n\n\n\n\n* Within this process, you will need to grant access to the correct permissions, establish the primary tester as a testing email if Testing is enabled, and set up the OAuth rate limit.\n* Next, go to credentials and click \u201c+ Create Credentials\u201d and click \u201cCreate Credentials\u201d.  Below is an example of what this screen looks like when it\u2019s already set up.\n\n\n![alt_text](../../../images/gptactions_gd_go_to_create_credentials.png \"creds\")\n\n\n\n\n* Locate your OAuth Client ID & Client Secret and store both values securely (see screenshot below)\n\n\n\n![alt_text](../../../images/gptactions_gd_oauthcid_and_csecret.png \"id and secret\")\n\n\n\n### **In ChatGPT**\n\nIn ChatGPT, click on \"Authentication\" and choose **\"OAuth\"**. Enter in the information below.\n\n* **Client ID**: use Client ID from steps above\n* **Client Secret**: use Client Secret from steps above\n* **Authorization URL**: [https://accounts.google.com/o/oauth2/auth](https://accounts.google.com/o/oauth2/auth)\n* **Token URL**: [https://oauth2.googleapis.com/token](https://oauth2.googleapis.com/token)\n* **Scope**: [https://www.googleapis.com/auth/drive](https://www.googleapis.com/auth/drive.readonly)\n    * **Note**: for a list of more detailed scopes enabled, please refer to [Google\u2019s OAuth 2.0 guide.](https://developers.google.com/identity/protocols/oauth2/scopes)\n* **Token**: Default (POST)\n* **Privacy Policy**: [https://policies.google.com/privacy?hl=en-US](https://policies.google.com/privacy?hl=en-US)\n\n\n### **Post-Action Steps**\n\nOnce you've set up authentication in ChatGPT, follow the steps below in the application to finalize the Action."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: b87b48d5-f87f-4444-b8db-3fe3a22e5912
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb", "title": "**GPT Action Library: Google Drive**", "tokens": 3718, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"b87b48d5-f87f-4444-b8db-3fe3a22e5912\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"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\": \"55083893-05db-483d-a770-e73ba6436bde\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"3b3da2445c3053f1309894f6d29a740434dd15d0925ded0cfce06c919140d5e6\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"5c957989-0f62-4775-9fc7-415a8612dfc6\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb\", \"title\": \"**GPT Action Library: Google Drive**\", \"tokens\": 3718, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"f85e47f184ec05ddd0c3ee9e70eb65aa73595852c531c7a73d74b170683fe1cb\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 15036, \"end_char_idx\": 17471, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "55083893-05db-483d-a770-e73ba6436bde", "doc_id": "55083893-05db-483d-a770-e73ba6436bde", "ref_doc_id": "55083893-05db-483d-a770-e73ba6436bde", "chroma:document": "* Within this process, you will need to grant access to the correct permissions, establish the primary tester as a testing email if Testing is enabled, and set up the OAuth rate limit.\n* Next, go to credentials and click \u201c+ Create Credentials\u201d and click \u201cCreate Credentials\u201d.  Below is an example of what this screen looks like when it\u2019s already set up.\n\n\n![alt_text](../../../images/gptactions_gd_go_to_create_credentials.png \"creds\")\n\n\n\n\n* Locate your OAuth Client ID & Client Secret and store both values securely (see screenshot below)\n\n\n\n![alt_text](../../../images/gptactions_gd_oauthcid_and_csecret.png \"id and secret\")\n\n\n\n### **In ChatGPT**\n\nIn ChatGPT, click on \"Authentication\" and choose **\"OAuth\"**. Enter in the information below.\n\n* **Client ID**: use Client ID from steps above\n* **Client Secret**: use Client Secret from steps above\n* **Authorization URL**: [https://accounts.google.com/o/oauth2/auth](https://accounts.google.com/o/oauth2/auth)\n* **Token URL**: [https://oauth2.googleapis.com/token](https://oauth2.googleapis.com/token)\n* **Scope**: [https://www.googleapis.com/auth/drive](https://www.googleapis.com/auth/drive.readonly)\n    * **Note**: for a list of more detailed scopes enabled, please refer to [Google\u2019s OAuth 2.0 guide.](https://developers.google.com/identity/protocols/oauth2/scopes)\n* **Token**: Default (POST)\n* **Privacy Policy**: [https://policies.google.com/privacy?hl=en-US](https://policies.google.com/privacy?hl=en-US)\n\n\n### **Post-Action Steps**\n\nOnce you've set up authentication in ChatGPT, follow the steps below in the application to finalize the Action.\n\n\n\n* Copy the callback URL from the GPT Action\n\n\n![alt_text](../../../images/gptactions_gd_callbackurl_from_gpt_action.png \"callback\")\n\n\n\n\n* In the \u201cAuthorized redirect URIs\u201d, add your callback URL\n\n\n![alt_text](../../../images/gptactions_gd_authorized_redirect_uris.png \"image_tooltip\")\n\n\n\n### **FAQ & Troubleshooting**\n\n\n\n* _Callback URL Error:_ If you get a callback URL error in ChatGPT, pay close attention to the screenshot above. You need to add the callback URL directly into GCP for the action to authenticate correctly.\n\n_Are there integrations that you\u2019d like us to prioritize? Are there errors in our integrations? File a PR or issue in our GitHub, and we\u2019ll take a look._\n\n\n\n\n<!-- watermark --><div style=\"background-color:#FFFFFF\"><p style=\"color:#FFFFFF; font-size: 1px\">gd2md-html: xyzzy Mon Aug 12 2024</p></div>"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: ad694fbf-97ac-4c3f-b2b5-eeeed24148a1
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb", "title": "GPT Action Library: Confluence", "tokens": 2411, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"ad694fbf-97ac-4c3f-b2b5-eeeed24148a1\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"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\": \"ccfa0d68-6753-4c2d-a573-f8a08517b88f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"2588a086a336b8e21d84546d77fa7ffaa1325df68a6615cdf1543bba92660629\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"d44e9a06-a37a-42df-bfd3-34de11cbc017\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"bd37646c5a6fa97ae55f93e88eac0fb4c65b5554542d96b3ca8631ce4d5f5fb5\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 0, \"end_char_idx\": 2736, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "doc_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "ref_doc_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "chroma:document": "# GPT Action Library: Confluence\n\n## Introduction\n\nThis page provides an instruction & guide for developers building a GPT Action for a specific application. Before you proceed, make sure to first familiarize yourself with the following information: \n- [Introduction to GPT Actions](https://platform.openai.com/docs/actions)\n- [Introduction to GPT Actions Library](https://platform.openai.com/docs/actions/actions-library)\n- [Example of Building a GPT Action from Scratch](https://platform.openai.com/docs/actions/getting-started)\n\nThis particular GPT Action provides an overview of how to connect to **Confluence**, Atlassian's collaboration and documentation platform. This Action takes a user\u2019s question, scans the relevant Confluence spaces and pages to gather the necessary information, then formulates a response to answer the user\u2019s question. This cookbook does not address updating content in Confluence directly from ChatGPT, but it is technically feasible to accomplish with additional Actions and scopes.\n\n### Value + Example Business Use Cases\n\n**Value**\n\nUsers can now leverage ChatGPT's natural language capability to connect directly to Confluence, enabling seamless interaction with their organization's knowledge base.\n\n**Example Use Cases**\n- **Knowledge Workers**: Easily retrieve information from Confluence pages and spaces to answer questions or gather details for reports and presentations.\n- **Project Managers**: Quickly access project documentation and updates stored in Confluence without manually searching through pages.\n- **Customer Support Teams**: Provide accurate and timely responses to customer inquiries by pulling relevant information from the Confluence knowledge base.\n- **All Users**: Gain more visibility into company-wide documentation, policies, and procedures, enhancing collaboration and knowledge sharing.\n\n## Application Information\n\n### Application Key Links\n\nCheck out these links from the application before you get started:\n- Application Website: https://developer.atlassian.com/console/myapps/ \n- Application API Documentation: https://developer.atlassian.com/cloud/confluence/rest/v2/intro/#about\n\n### Application Prerequisites\n\nBefore you get started, make sure you go through the following steps in your application environment:\n- Ensure you have permissions to create an App in the Atlassian Developer Portal\n- Determine what interactions you would like your GPT to take (search, read, edit, etc.)\n\n## ChatGPT Steps\n\n### Custom GPT Instructions \n\nOnce you've created a Custom GPT, copy the text below in the Instructions panel. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: d44e9a06-a37a-42df-bfd3-34de11cbc017
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb", "title": "GPT Action Library: Confluence", "tokens": 2411, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"d44e9a06-a37a-42df-bfd3-34de11cbc017\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"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\": \"ccfa0d68-6753-4c2d-a573-f8a08517b88f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"2588a086a336b8e21d84546d77fa7ffaa1325df68a6615cdf1543bba92660629\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ad694fbf-97ac-4c3f-b2b5-eeeed24148a1\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"a812dc385e288be04bc698a8e2bc228aff4e5ff4c6075bf438b64c6ecf3e3a78\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"9c78f1d3-706b-4deb-b9c0-b1f6c07469b3\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"de4f5397664aee77ead8eb938ffe826dfddfa9b90628decac6ebc399030d0093\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 2739, \"end_char_idx\": 6421, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "doc_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "ref_doc_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "chroma:document": "```python\nYou are a \"Confluence Savant\", equipped with the ability to search our company's Product Wiki in Confluence to answer product-related questions.\n\nYou must ALWAYS perform the \"getAccessibleResources\" Action first to get the \"cloudid\" value you will need in subsequent Actions.\n\nYour job is to provide accurate and detailed responses by retrieving information from the Product Wiki. Your responses should be clear, concise, and directly address the question asked. You have the capability to execute an action named \"performConfluenceSearch\" that allows you to search for content within our Confluence Product Wiki using specific terms or phrases related to the user's question.\n\n    - When you receive a query about product information, use the \"performConfluenceSearch\" action to retrieve relevant content from the Product Wiki. Formulate your search query based on the user's question, using specific keywords or phrases to find the most pertinent information.\n    - Once you receive the search results, review the content to ensure it matches the user's query. If necessary, refine your search query to retrieve more accurate results.\n    - Provide a response that synthesizes the information from the Product Wiki, clearly answering the user's question. Your response should be easy to understand and directly related to the query.\n    - If the query is complex or requires clarification, ask follow-up questions to the user to refine your understanding and improve the accuracy of your search.\n    - If the information needed to answer the question is not available in the Product Wiki, inform the user and guide them to where they might find the answer, such as contacting a specific department or person in the company.\n\n    Here is an example of how you might respond to a query:\n\n    User: \"What are the latest features of our XYZ product?\"\n    You: \"The latest features of the XYZ product, as detailed in our Product Wiki, include [feature 1], [feature 2], and [feature 3]. These features were added in the recent update to enhance [specific functionalities]. For more detailed information, you can refer to the Product Wiki page [link to the specific Confluence page].\"\n\nRemember, your goal is to provide helpful, accurate, and relevant information to the user's query by effectively leveraging the Confluence Product Wiki.\n\n```\n\n### OpenAPI Schema \n\nOnce you've created a Custom GPT, copy the text below in the Actions panel. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n\n```python\nopenapi: 3.1.0\ninfo:\n  title: Atlassian API\n  description: This API provides access to Atlassian resources through OAuth token authentication.\n  version: 1.0.0\nservers:\n  - url: https://api.atlassian.com\n    description: Main API server\npaths:\n  /oauth/token/accessible-resources:\n    get:\n      operationId: getAccessibleResources\n      summary: Retrieves accessible resources for the authenticated user.\n      description: This endpoint retrieves a list of resources the authenticated user has access to, using an OAuth token.\n      security:\n        - bearerAuth: []\n      responses:\n        '200':\n          description: A JSON array of accessible resources.\n          content:\n            application/json:\n              schema: \n                $ref: '#/components/schemas/ResourceArray'\n  /ex/confluence/{cloudid}/wiki/rest/api/search:\n    get:\n      operationId: performConfluenceSearch\n      summary: Performs a search in Confluence based on a query.\n      description: This endpoint allows searching within Confluence using the CQL (Confluence Query Language)."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 9c78f1d3-706b-4deb-b9c0-b1f6c07469b3
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb", "title": "GPT Action Library: Confluence", "tokens": 2411, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"9c78f1d3-706b-4deb-b9c0-b1f6c07469b3\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"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\": \"ccfa0d68-6753-4c2d-a573-f8a08517b88f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"2588a086a336b8e21d84546d77fa7ffaa1325df68a6615cdf1543bba92660629\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"d44e9a06-a37a-42df-bfd3-34de11cbc017\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"4bcbe151558e03411c44b235e7fa05b8bdccd811a009b894b66e7fc29bb923bc\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"59bd8e58-b058-4d48-82d8-73ed061f6512\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"5e975f34efcf77ccb3b97cc5ac29a3703183ead515986b465ed45e0c4447f2fc\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 5341, \"end_char_idx\": 9044, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "doc_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "ref_doc_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "chroma:document": "```python\nopenapi: 3.1.0\ninfo:\n  title: Atlassian API\n  description: This API provides access to Atlassian resources through OAuth token authentication.\n  version: 1.0.0\nservers:\n  - url: https://api.atlassian.com\n    description: Main API server\npaths:\n  /oauth/token/accessible-resources:\n    get:\n      operationId: getAccessibleResources\n      summary: Retrieves accessible resources for the authenticated user.\n      description: This endpoint retrieves a list of resources the authenticated user has access to, using an OAuth token.\n      security:\n        - bearerAuth: []\n      responses:\n        '200':\n          description: A JSON array of accessible resources.\n          content:\n            application/json:\n              schema: \n                $ref: '#/components/schemas/ResourceArray'\n  /ex/confluence/{cloudid}/wiki/rest/api/search:\n    get:\n      operationId: performConfluenceSearch\n      summary: Performs a search in Confluence based on a query.\n      description: This endpoint allows searching within Confluence using the CQL (Confluence Query Language).\n      parameters:\n        - in: query\n          name: cql\n          required: true\n          description: The Confluence Query Language expression to evaluate.\n          schema:\n            type: string\n        - in: path\n          name: cloudid\n          required: true\n          schema:\n            type: string\n          description: The cloudid retrieved from the getAccessibleResources Action\n        - in: query\n          name: cqlcontext\n          description: The context to limit the search, specified as JSON.\n          schema:\n            type: string\n        - in: query\n          name: expand\n          description: A comma-separated list of properties to expand on the search result.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: A list of search results matching the query.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/SearchResults'\ncomponents:\n  securitySchemes:\n    bearerAuth:\n      type: http\n      scheme: bearer\n      bearerFormat: JWT\n  schemas:\n    ResourceArray:\n      type: array\n      items:\n        $ref: '#/components/schemas/Resource'\n    Resource:\n      type: object\n      required:\n        - id\n        - name\n        - type\n      properties:\n        id:\n          type: string\n          description: The unique identifier for the resource.\n        name:\n          type: string\n          description: The name of the resource.\n        type:\n          type: string\n          description: The type of the resource.\n    SearchResults:\n      type: object\n      properties:\n        results:\n          type: array\n          items:\n            $ref: '#/components/schemas/SearchResult'\n    SearchResult:\n      type: object\n      properties:\n        id:\n          type: string\n          description: The unique identifier of the content.\n        title:\n          type: string\n          description: The title of the content.\n        type:\n          type: string\n          description: The type of the content (e.g., page, blog post).\n        space:\n          type: object\n          properties:\n            id:\n              type: string\n              description: The space ID where the content is located.\n            name:\n              type: string\n              description: The name of the space.\n```\n\n## Authentication Instructions\n\nBelow are instructions on setting up authentication with this 3rd party application. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 59bd8e58-b058-4d48-82d8-73ed061f6512
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb", "title": "GPT Action Library: Confluence", "tokens": 2411, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"59bd8e58-b058-4d48-82d8-73ed061f6512\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"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\": \"ccfa0d68-6753-4c2d-a573-f8a08517b88f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"2588a086a336b8e21d84546d77fa7ffaa1325df68a6615cdf1543bba92660629\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"9c78f1d3-706b-4deb-b9c0-b1f6c07469b3\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"f591609919211db6eb3ab4083f58f4bdf276ff95513c3170f4aff9fcf2d36ae1\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b802228a-b2f0-4d41-a850-b85747d17280\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"cf579e21906dfcc88c903f74fdc99e9f1d29b5c0ef4f33788febf57d112759d5\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 7130, \"end_char_idx\": 10115, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "doc_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "ref_doc_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "chroma:document": "schema:\n            type: string\n      responses:\n        '200':\n          description: A list of search results matching the query.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/SearchResults'\ncomponents:\n  securitySchemes:\n    bearerAuth:\n      type: http\n      scheme: bearer\n      bearerFormat: JWT\n  schemas:\n    ResourceArray:\n      type: array\n      items:\n        $ref: '#/components/schemas/Resource'\n    Resource:\n      type: object\n      required:\n        - id\n        - name\n        - type\n      properties:\n        id:\n          type: string\n          description: The unique identifier for the resource.\n        name:\n          type: string\n          description: The name of the resource.\n        type:\n          type: string\n          description: The type of the resource.\n    SearchResults:\n      type: object\n      properties:\n        results:\n          type: array\n          items:\n            $ref: '#/components/schemas/SearchResult'\n    SearchResult:\n      type: object\n      properties:\n        id:\n          type: string\n          description: The unique identifier of the content.\n        title:\n          type: string\n          description: The title of the content.\n        type:\n          type: string\n          description: The type of the content (e.g., page, blog post).\n        space:\n          type: object\n          properties:\n            id:\n              type: string\n              description: The space ID where the content is located.\n            name:\n              type: string\n              description: The name of the space.\n```\n\n## Authentication Instructions\n\nBelow are instructions on setting up authentication with this 3rd party application. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n### Pre-Action Steps\n\nBefore you set up authentication in ChatGPT, make sure you go through the following steps within the Atlassian Developer portal to create your Confluence app:\n\n1. Select the Create drop-down\n2. Choose OAuth 2.0 integration\n3. Give a name, agree to terms, and click Create\n4. Select \"Distribution\" on the left-hand menu and click \u201cEdit\u201d\n5. Change radio button to \"Sharing\"\n6. Fill out required fields and Save Changes\n7. Select \"Permissions\" on the left-hand menu\n8. Add in the scopes you would like to include (e.g., User identity API and Confluence API so that the app can know what a user has access to and fetch from Confluence)\n9. Select \"Authorization\" on the left-hand menu\n10. Click \"Add\" under Action in the row for OAuth 2.0\n11. Enter the callback URL from your GPT (note: you may need to add a placeholder for now and revisit this once you have created the Action and OAuth in your GPT so that you have the final callback URL)\n12. Select \"Settings\" under the left-hand menu\n13. Copy your Client ID and Secret for us in OAuth setup in GPT"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: b802228a-b2f0-4d41-a850-b85747d17280
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb", "title": "GPT Action Library: Confluence", "tokens": 2411, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"b802228a-b2f0-4d41-a850-b85747d17280\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"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\": \"ccfa0d68-6753-4c2d-a573-f8a08517b88f\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"2588a086a336b8e21d84546d77fa7ffaa1325df68a6615cdf1543bba92660629\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"59bd8e58-b058-4d48-82d8-73ed061f6512\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_confluence.ipynb\", \"title\": \"GPT Action Library: Confluence\", \"tokens\": 2411, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"0951cc6300dbcba564c35590be192bb4b5a1c63900e9008329c3c328c6cb52d9\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 8510, \"end_char_idx\": 11680, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "doc_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "ref_doc_id": "ccfa0d68-6753-4c2d-a573-f8a08517b88f", "chroma:document": "space:\n          type: object\n          properties:\n            id:\n              type: string\n              description: The space ID where the content is located.\n            name:\n              type: string\n              description: The name of the space.\n```\n\n## Authentication Instructions\n\nBelow are instructions on setting up authentication with this 3rd party application. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n### Pre-Action Steps\n\nBefore you set up authentication in ChatGPT, make sure you go through the following steps within the Atlassian Developer portal to create your Confluence app:\n\n1. Select the Create drop-down\n2. Choose OAuth 2.0 integration\n3. Give a name, agree to terms, and click Create\n4. Select \"Distribution\" on the left-hand menu and click \u201cEdit\u201d\n5. Change radio button to \"Sharing\"\n6. Fill out required fields and Save Changes\n7. Select \"Permissions\" on the left-hand menu\n8. Add in the scopes you would like to include (e.g., User identity API and Confluence API so that the app can know what a user has access to and fetch from Confluence)\n9. Select \"Authorization\" on the left-hand menu\n10. Click \"Add\" under Action in the row for OAuth 2.0\n11. Enter the callback URL from your GPT (note: you may need to add a placeholder for now and revisit this once you have created the Action and OAuth in your GPT so that you have the final callback URL)\n12. Select \"Settings\" under the left-hand menu\n13. Copy your Client ID and Secret for us in OAuth setup in GPT\n\n\n![confluence_gpt.png](../../../images/confluence_gpt.png)\n\n### In ChatGPT\n\nIn ChatGPT, click on \"Authentication\" and choose **\"OAuth\"**. Enter in the information below. \n\n- **Client ID**: use Client ID from steps above \n- **Client Secret**: use Client Secret from steps above\n- **Authorization URL**: https://auth.atlassian.com/authorize\n- **Token URL**: https://auth.atlassian.com/oauth/token \n- **Scope**: read:confluence-content.all search:confluence\n- **Token**: Default (POST)\n\n### Post-Action Steps\n\nOnce you've set up authentication in ChatGPT, follow the steps below in the application to finalize the Action. \n\n- Copy the callback URL from the GPT Action\n- In the \u201cAuthorized redirect URIs\u201d (see screenshot above), add your callback URL \n\n\n### FAQ & Troubleshooting\n\n- *Callback URL Error:* If you get a callback URL error in ChatGPT, pay close attention to the screenshot above. You need to add the callback URL directly into your Confluence app for the action to authenticate correctly\n- *Schema calls the wrong project or dataset:* If ChatGPT calls the wrong project or dataset, consider updating your instructions to make it more explicit either (a) which project / dataset should be called or (b) to require the user provide those exact details before it runs the query\n- *Looping Actions:* You may not have given the necessary scopes/permissions to your app to accomplish its intended purpose\n\n*Are there integrations that you\u2019d like us to prioritize? Are there errors in our integrations? File a PR or issue in our github, and we\u2019ll take a look.*"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 8d1d490f-edc1-49c7-9e40-8a7ffa9d33ea
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_zapier.ipynb", "title": "GPT Action Library: Zapier", "tokens": 577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"8d1d490f-edc1-49c7-9e40-8a7ffa9d33ea\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_zapier.ipynb\", \"title\": \"GPT Action Library: Zapier\", \"tokens\": 577, \"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\": \"2b208d3e-9236-4396-8a9f-ded63768f204\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_zapier.ipynb\", \"title\": \"GPT Action Library: Zapier\", \"tokens\": 577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"6833f6d2aa59602869e7c43920c005e78fa68af20a7d2d47708aab6d7ca9d6c7\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 0, \"end_char_idx\": 2521, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "2b208d3e-9236-4396-8a9f-ded63768f204", "doc_id": "2b208d3e-9236-4396-8a9f-ded63768f204", "ref_doc_id": "2b208d3e-9236-4396-8a9f-ded63768f204", "chroma:document": "# GPT Action Library: Zapier\n\n## Introduction\n\nThis page provides an instruction & guide for developers building a GPT Action for a specific application. Before you proceed, make sure to first familiarize yourself with the following information: \n- [Introduction to GPT Actions](https://platform.openai.com/docs/actions)\n- [Introduction to GPT Actions Library](https://platform.openai.com/docs/actions/actions-library)\n- [Example of Buliding a GPT Action from Scratch](https://platform.openai.com/docs/actions/getting-started)\n\nThis GPT Action provides an overview of how to connect a GPT to **Zapier**.  Because the majority of configuration occurs on Zapier, we recommend reviewing this ***[helpful guide from Zapier on connecting GPTs to custom Zapier Actions](https://actions.zapier.com/docs/platform/gpt)***.\n\n### Value + Example Business Use Cases\n\n**Value**: Users can now connect custom GPTs within ChatGPT to Zapier and get instant integration to 6,0000+ apps and 20,000+ actions across the tech stack.   \n\n**Example Use Cases**: \n- An organization has already setup Zapier integrations, and would like to avoid additional integration work when connecting their tech ecosystem with ChatGPT\n- Build a Calendar Assistant GPT which looks up calendar events, and provides additional context based on attendees' LinkedIn profiles\n- A CRM GPT to help connect Hubspot to ChatGPT allowing sales teams to update or review contacts and notes on the go\n\n\n## Application Information\n\n### Application Key Links\n\nCheck out these links from the application before you get started:\n- Application Website: https://zapier.com\n- AI Actions URL: https://actions.zapier.com/gpt/actions/\n- Automatic OpenAPI Configuration: https://actions.zapier.com/gpt/api/v1/dynamic/openapi.json?tools=meta\n\n### Application Prerequisites\n\nBefore you get started, make sure you go through the following step in your Zapier:\n- Configure the desired AI Actions via the [AI Action Manager](https://actions.zapier.com/gpt/actions/)\n\n![zapier_ai_actions.png](../../../images/zapier_ai_actions.png)\n\n![zapier_action_config.png](../../../images/zapier_action_config.png)\n\n### In ChatGPT\n\nIn ChatGPT, from the custom GPT creator screen, click on \"Actions\" and choose **\"Import from URL\"**. Enter in Zapier URL for provisioning GPTs: https://actions.zapier.com/gpt/api/v1/dynamic/openapi.json?tools=meta\n\n*Are there integrations that you\u2019d like us to prioritize? Are there errors in our integrations? File a PR or issue in our github, and we\u2019ll take a look.*"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: e82b2f1a-2f38-4ea0-ab73-4a7dbe385dbc
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb", "title": "GPT Action Library: Box", "tokens": 5278, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"e82b2f1a-2f38-4ea0-ab73-4a7dbe385dbc\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"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\": \"ac929a31-75d1-4968-acdf-858b8d36f7e6\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d03a11bf65184d684bcf5a9096334f39b7cece7cc5d8081d0fb5dc0facbbc08d\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"3f0beb73-a1ac-4439-8113-8d9e20bfced9\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"a3ebdd4685e08b45c7cd41ea4c3966bbd039d05a801f5313a07047d6e6d011e7\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 0, \"end_char_idx\": 3638, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "ref_doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "chroma:document": "# GPT Action Library: Box\n\n## Introduction\n\nThis page provides an instruction & guide for developers building a GPT Action for a specific application. Before you proceed, make sure to first familiarize yourself with the following information: \n- [Introduction to GPT Actions](https://platform.openai.com/docs/actions)\n- [Introduction to GPT Actions Library](https://platform.openai.com/docs/actions/actions-library)\n- [Example of Buliding a GPT Action from Scratch](https://platform.openai.com/docs/actions/getting-started)\n\nThis guide provides details on how to connect chatGPT with a Box.com account, the GPT requires two actions to pull data from Box. The GPT will interact with the Box API directly but requires middleware (ie Azure function) to properly format the response from Box to download and read the file contents. The azure function action is transparent to the end user, meaning the user will not need to explicity call the action. \n\n- Action 1 : Box API Action - Leverages the Box API to query data from Box \n- Action 2 : Azure function - Formats response from Box enabling chatGPT to download the file directly from Box\n\n### Value + Example Business Use Cases\n\nExisting Box customers can leverage these guidelines to query details about files, contents of files and any metadata related. This enables a OpenAI powered analysis of any content stored in Box such as visualizing data sets and creating summaries across multiple folders and files. This GPT can access folders, files and business process data such as metadata in Box. Additionally Box admins can use this GPT action for visibility into audit trails and health checks.\n\n## Application Information\n\n### Application Key Links\n\nCheck out these links from Box and Azure before you get started:\n\n**Box Action**\n- Application Website: https://app.box.com \n- Application API Documentation: https://developer.box.com/reference/\n\n</br>\n\n**Azure Function**\n- Application Website: https://learn.microsoft.com/en-us/azure/azure-functions/\n- Application API Documentation: https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference/\n \n\n### Application Prerequisites\n\nBefore you get started, make sure you go through the following steps in your Box environment:\n- This requires a Box developer account to get started : https://developer.box.com/\n- Follow the Box Developer site to create a custom app with OAuth 2.0 authentication type  : https://developer.box.com/guides/getting-started/first-application/  \n- Navigate to **Configuration** tab for the following values\n    - OAuth 2.0 Credentials (**Client ID** / **Client Secret**) You will need both of these values for the chatGPT configuration\n    - OAuth 2.0 **Redirect URIs** : You will fill this value in from chatGPT action configuration below\n    - Application scopes (**Read all files and folders in Box**, **Manage Enterprise properties**) \n\nYou will want to keep this window open, the Redirct URIs needs to be filled in from the gpt configuration.\n\n\n\n![gpt_actions_box_boxconfig1.png.png](../../../images/gpt_actions_box_boxconfig1.png)\n\n</br>\n\n\n### Middleware information : required for Action 2\n\nMake sure you go through the following steps in your Azure environment:\n- Azure Portal with access to create Azure Function Apps and Azure Entra App Registrations\n- There is a detailed section in this guide related to deploying and designing the function required to wrap the response from Box in order to view the contents of the file. Without the function the GPT will only be able to query data about the file and not the contents. Be sure to read this section after creating the first action."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 3f0beb73-a1ac-4439-8113-8d9e20bfced9
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb", "title": "GPT Action Library: Box", "tokens": 5278, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"3f0beb73-a1ac-4439-8113-8d9e20bfced9\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"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\": \"ac929a31-75d1-4968-acdf-858b8d36f7e6\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d03a11bf65184d684bcf5a9096334f39b7cece7cc5d8081d0fb5dc0facbbc08d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"e82b2f1a-2f38-4ea0-ab73-4a7dbe385dbc\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ec0636cf22750abd2c412dd95ebde41975764df3561de8393f4a657ecf8b8d93\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"02c88097-20ca-4f6d-8ae7-6487f9cc5447\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"fbae7c8c7e3f6e82055fe245799205f79efa3d95e751aa18ff03059994d9aa8a\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 2995, \"end_char_idx\": 6368, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "ref_doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "chroma:document": "![gpt_actions_box_boxconfig1.png.png](../../../images/gpt_actions_box_boxconfig1.png)\n\n</br>\n\n\n### Middleware information : required for Action 2\n\nMake sure you go through the following steps in your Azure environment:\n- Azure Portal with access to create Azure Function Apps and Azure Entra App Registrations\n- There is a detailed section in this guide related to deploying and designing the function required to wrap the response from Box in order to view the contents of the file. Without the function the GPT will only be able to query data about the file and not the contents. Be sure to read this section after creating the first action.\n\n\n## ChatGPT Steps\n\n### Custom GPT Instructions \n\nOnce you've created a Custom GPT, copy the text below in the Instructions panel. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n\n```python\n**context** \n\nThis GPT will connect to your Box.com account to search files and folders, providing accurate and helpful responses based on the user's queries. It will assist with finding, organizing, and retrieving information stored in Box.com. Ensure secure and private handling of any accessed data. Avoid performing any actions that could modify or delete files unless explicitly instructed. Prioritize clarity and efficiency in responses. Use simple language for ease of understanding. Ask for clarification if a request is ambiguous or if additional details are needed to perform a search. Maintain a professional and friendly tone, ensuring users feel comfortable and supported.\n\n\nPlease use this website for instructions using the box API : https://developer.box.com/reference/ each endpoint can be found from this reference documentation\n\nUsers can search with the Box search endpoint or Box metadata search endpoint\n\n**instructions**\nWhen retrieving file information from Box provide as much details as possible and format into a table when more than one file is returned, include the modified date, created date and any other headers you might find valuable\n\nProvide insights to files and suggest patterns for users, gives example queries and suggestions when appropriate\n\nWhen a user wants to compare files retrieve the file for the user with out asking\n```\n\n### Action 1 : Box API Action\n\nOnce you've created a Custom GPT, you will need to create 2 actions. Copy the text below in the 1st Actions panel, this will be for the Box action. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n\n```python\n{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Box.com API\",\n    \"description\": \"API for Box.com services\",\n    \"version\": \"v1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"https://api.box.com/2.0\"\n    }\n  ],\n  \"paths\": {\n    \"/folders/{folder_id}\": {\n      \"get\": {\n        \"summary\": \"Get Folder Items\",\n        \"operationId\": \"getFolderItems\",\n        \"parameters\": [\n          {\n            \"name\": \"folder_id\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"The ID of the folder\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of items in the folder\","}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 02c88097-20ca-4f6d-8ae7-6487f9cc5447
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb", "title": "GPT Action Library: Box", "tokens": 5278, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"02c88097-20ca-4f6d-8ae7-6487f9cc5447\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"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\": \"ac929a31-75d1-4968-acdf-858b8d36f7e6\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d03a11bf65184d684bcf5a9096334f39b7cece7cc5d8081d0fb5dc0facbbc08d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"3f0beb73-a1ac-4439-8113-8d9e20bfced9\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"011d96336653b75143d17f11a5d3c8d666e7bbc21a01b36408df409a486420f7\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4ce33c93-df2b-4ca3-b0bf-b820e1c99869\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"db0790474626c716d51ffacee086454822dcc2ca9d0ffb5e1d4ff38a90921a95\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 5640, \"end_char_idx\": 8805, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "ref_doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "chroma:document": "```python\n{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Box.com API\",\n    \"description\": \"API for Box.com services\",\n    \"version\": \"v1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"https://api.box.com/2.0\"\n    }\n  ],\n  \"paths\": {\n    \"/folders/{folder_id}\": {\n      \"get\": {\n        \"summary\": \"Get Folder Items\",\n        \"operationId\": \"getFolderItems\",\n        \"parameters\": [\n          {\n            \"name\": \"folder_id\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"The ID of the folder\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of items in the folder\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/FolderItems\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:folders\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/files/{file_id}\": {\n      \"get\": {\n        \"summary\": \"Get File Information\",\n        \"operationId\": \"getFileInfo\",\n        \"parameters\": [\n          {\n            \"name\": \"file_id\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"The ID of the file\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"File information\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/FileInfo\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:files\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/folders\": {\n      \"get\": {\n        \"summary\": \"List All Folders\",\n        \"operationId\": \"listAllFolders\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of all folders\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/FoldersList\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:folders\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/events\": {\n      \"get\": {\n        \"summary\": \"Get User Events\",\n        \"operationId\": \"getUserEvents\",\n        \"parameters\": [\n          {\n            \"name\": \"stream_type\",\n            \"in\": \"query\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"The type of stream\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"User events\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/UserEvents\"\n                }\n              }\n            }\n          }\n        },"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 4ce33c93-df2b-4ca3-b0bf-b820e1c99869
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb", "title": "GPT Action Library: Box", "tokens": 5278, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"4ce33c93-df2b-4ca3-b0bf-b820e1c99869\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"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\": \"ac929a31-75d1-4968-acdf-858b8d36f7e6\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d03a11bf65184d684bcf5a9096334f39b7cece7cc5d8081d0fb5dc0facbbc08d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"02c88097-20ca-4f6d-8ae7-6487f9cc5447\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"da9e94717cd9150719f2605a4f5438f7facb28fcd4bf2bd05d2bce9a19995402\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"04577281-8b6f-44e5-9c6c-46f9d88043dd\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"d5918dde00de7ac659f6b8be0460793cee0e51cffa12c24dc7ae41acab105878\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 6955, \"end_char_idx\": 10438, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "ref_doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "chroma:document": "\"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"The ID of the file\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"File information\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/FileInfo\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:files\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/folders\": {\n      \"get\": {\n        \"summary\": \"List All Folders\",\n        \"operationId\": \"listAllFolders\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of all folders\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/FoldersList\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:folders\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/events\": {\n      \"get\": {\n        \"summary\": \"Get User Events\",\n        \"operationId\": \"getUserEvents\",\n        \"parameters\": [\n          {\n            \"name\": \"stream_type\",\n            \"in\": \"query\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"The type of stream\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"User events\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/UserEvents\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:events\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/admin_events\": {\n      \"get\": {\n        \"summary\": \"Get Admin Events\",\n        \"operationId\": \"getAdminEvents\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Admin events\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/AdminEvents\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:events\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/search\": {\n      \"get\": {\n        \"summary\": \"Search\",\n        \"operationId\": \"search\",\n        \"parameters\": [\n          {\n            \"name\": \"query\",\n            \"in\": \"query\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"Search query\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Search results\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SearchResults\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"search:items\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/metadata_templates\": {\n      \"get\": {\n        \"summary\": \"Get Metadata Templates\",\n        \"operationId\": \"getMetadataTemplates\","}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 04577281-8b6f-44e5-9c6c-46f9d88043dd
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb", "title": "GPT Action Library: Box", "tokens": 5278, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"04577281-8b6f-44e5-9c6c-46f9d88043dd\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"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\": \"ac929a31-75d1-4968-acdf-858b8d36f7e6\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d03a11bf65184d684bcf5a9096334f39b7cece7cc5d8081d0fb5dc0facbbc08d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4ce33c93-df2b-4ca3-b0bf-b820e1c99869\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"372dc2ede4e24a94cf7a16106e4416f6e5cdffb66569c362aca6cb07a6f1dac0\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"27fe90d3-bc24-425a-bf4a-eb30d16ad1c3\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"95355e07d9fec585f21ab98204fdece961dde6abe310d6c147b62e4485c391d1\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 8598, \"end_char_idx\": 12071, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "ref_doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "chroma:document": "\"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/UserEvents\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:events\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/admin_events\": {\n      \"get\": {\n        \"summary\": \"Get Admin Events\",\n        \"operationId\": \"getAdminEvents\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Admin events\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/AdminEvents\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:events\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/search\": {\n      \"get\": {\n        \"summary\": \"Search\",\n        \"operationId\": \"search\",\n        \"parameters\": [\n          {\n            \"name\": \"query\",\n            \"in\": \"query\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"Search query\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Search results\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SearchResults\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"search:items\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/metadata_templates\": {\n      \"get\": {\n        \"summary\": \"Get Metadata Templates\",\n        \"operationId\": \"getMetadataTemplates\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Metadata templates\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/MetadataTemplates\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:metadata_templates\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/metadata_templates/enterprise\": {\n      \"get\": {\n        \"summary\": \"Get Enterprise Metadata Templates\",\n        \"operationId\": \"getEnterpriseMetadataTemplates\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Enterprise metadata templates\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/MetadataTemplates\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:metadata_templates\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/files/{file_id}/metadata\": {\n      \"get\": {\n        \"summary\": \"Get All Metadata for a File\",\n        \"operationId\": \"getAllMetadataForFile\",\n        \"parameters\": [\n          {\n            \"name\": \"file_id\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"The ID of the file\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"All metadata instances for the file\","}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 27fe90d3-bc24-425a-bf4a-eb30d16ad1c3
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb", "title": "GPT Action Library: Box", "tokens": 5278, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"27fe90d3-bc24-425a-bf4a-eb30d16ad1c3\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"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\": \"ac929a31-75d1-4968-acdf-858b8d36f7e6\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d03a11bf65184d684bcf5a9096334f39b7cece7cc5d8081d0fb5dc0facbbc08d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"04577281-8b6f-44e5-9c6c-46f9d88043dd\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"0decbc0239cf8be2fb6e1b84871cd380f8ee0583861aba91bb948382a5feb636\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"ce735448-c85f-478b-b1c3-64d088e8df8d\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"5d8ad6b3d9ad33a421c49f7885134ca894f983da1700fbd573d4b6013409898a\", \"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": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "ref_doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "chroma:document": "\"/metadata_templates\": {\n      \"get\": {\n        \"summary\": \"Get Metadata Templates\",\n        \"operationId\": \"getMetadataTemplates\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Metadata templates\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/MetadataTemplates\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:metadata_templates\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/metadata_templates/enterprise\": {\n      \"get\": {\n        \"summary\": \"Get Enterprise Metadata Templates\",\n        \"operationId\": \"getEnterpriseMetadataTemplates\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Enterprise metadata templates\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/MetadataTemplates\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:metadata_templates\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/files/{file_id}/metadata\": {\n      \"get\": {\n        \"summary\": \"Get All Metadata for a File\",\n        \"operationId\": \"getAllMetadataForFile\",\n        \"parameters\": [\n          {\n            \"name\": \"file_id\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"The ID of the file\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"All metadata instances for the file\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/MetadataInstances\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:metadata\"\n            ]\n          }\n        ]\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"FolderItems\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"total_count\": {\n            \"type\": \"integer\",\n            \"description\": \"The total number of items in the folder\"\n          },\n          \"entries\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"type\": {\n                  \"type\": \"string\",\n                  \"description\": \"The type of the item (e.g. file, folder)\"\n                },\n                \"id\": {\n                  \"type\": \"string\",\n                  \"description\": \"The ID of the item\"\n                },\n                \"name\": {\n                  \"type\": \"string\",\n                  \"description\": \"The name of the item\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"FileInfo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"string\",\n            \"description\": \"The ID of the file\"\n          },\n          \"name\": {\n            \"type\": \"string\",\n            \"description\": \"The name of the file\"\n          },\n          \"size\": {\n            \"type\": \"integer\",\n            \"description\": \"The size of the file in bytes\"\n          },\n          \"created_at\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\","}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: ce735448-c85f-478b-b1c3-64d088e8df8d
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb", "title": "GPT Action Library: Box", "tokens": 5278, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"ce735448-c85f-478b-b1c3-64d088e8df8d\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"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\": \"ac929a31-75d1-4968-acdf-858b8d36f7e6\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d03a11bf65184d684bcf5a9096334f39b7cece7cc5d8081d0fb5dc0facbbc08d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"27fe90d3-bc24-425a-bf4a-eb30d16ad1c3\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"bb749f4a5c7d08b365cb27e00771a8217a97ff001a5a88b8e67528601c8c9b9e\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"123d95e7-3dde-4249-839d-e89ee56dc9ce\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"ac229b3674eeea2eb0171c3bf78338e19e5f9a208677bd52b3c48af756673835\", \"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": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "ref_doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "chroma:document": "\"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/MetadataInstances\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"OAuth2\": [\n              \"read:metadata\"\n            ]\n          }\n        ]\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"FolderItems\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"total_count\": {\n            \"type\": \"integer\",\n            \"description\": \"The total number of items in the folder\"\n          },\n          \"entries\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"type\": {\n                  \"type\": \"string\",\n                  \"description\": \"The type of the item (e.g. file, folder)\"\n                },\n                \"id\": {\n                  \"type\": \"string\",\n                  \"description\": \"The ID of the item\"\n                },\n                \"name\": {\n                  \"type\": \"string\",\n                  \"description\": \"The name of the item\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"FileInfo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"string\",\n            \"description\": \"The ID of the file\"\n          },\n          \"name\": {\n            \"type\": \"string\",\n            \"description\": \"The name of the file\"\n          },\n          \"size\": {\n            \"type\": \"integer\",\n            \"description\": \"The size of the file in bytes\"\n          },\n          \"created_at\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"description\": \"The creation time of the file\"\n          },\n          \"modified_at\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"description\": \"The last modification time of the file\"\n          }\n        }\n      },\n      \"FoldersList\": {\n        \"type\": \"array\",\n        \"items\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"id\": {\n              \"type\": \"string\",\n              \"description\": \"The ID of the folder\"\n            },\n            \"name\": {\n              \"type\": \"string\",\n              \"description\": \"The name of the folder\"\n            }\n          }\n        }\n      },\n      \"UserEvents\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"entries\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"event_id\": {\n                  \"type\": \"string\",\n                  \"description\": \"The ID of the event\"\n                },\n                \"event_type\": {\n                  \"type\": \"string\",\n                  \"description\": \"The type of the event\"\n                },\n                \"created_at\": {\n                  \"type\": \"string\",\n                  \"format\": \"date-time\",\n                  \"description\": \"The time the event occurred\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"AdminEvents\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"entries\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"event_id\": {\n                  \"type\": \"string\",\n                  \"description\": \"The ID of the event\"\n                },"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 123d95e7-3dde-4249-839d-e89ee56dc9ce
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb", "title": "GPT Action Library: Box", "tokens": 5278, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"123d95e7-3dde-4249-839d-e89ee56dc9ce\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"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\": \"ac929a31-75d1-4968-acdf-858b8d36f7e6\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d03a11bf65184d684bcf5a9096334f39b7cece7cc5d8081d0fb5dc0facbbc08d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ce735448-c85f-478b-b1c3-64d088e8df8d\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"b3d3427cdaeaad93e97fddb268d9368aba4483ddcdc49543411d4523fe38899c\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"3fc7d304-6b7b-461e-b1a2-2a510c855bb9\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"4ca0faa5f49f592a854f470d22a7c02a81fdce6671ced0fc7750d57f6b3a2eaa\", \"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": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "ref_doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "chroma:document": "\"format\": \"date-time\",\n            \"description\": \"The creation time of the file\"\n          },\n          \"modified_at\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"description\": \"The last modification time of the file\"\n          }\n        }\n      },\n      \"FoldersList\": {\n        \"type\": \"array\",\n        \"items\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"id\": {\n              \"type\": \"string\",\n              \"description\": \"The ID of the folder\"\n            },\n            \"name\": {\n              \"type\": \"string\",\n              \"description\": \"The name of the folder\"\n            }\n          }\n        }\n      },\n      \"UserEvents\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"entries\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"event_id\": {\n                  \"type\": \"string\",\n                  \"description\": \"The ID of the event\"\n                },\n                \"event_type\": {\n                  \"type\": \"string\",\n                  \"description\": \"The type of the event\"\n                },\n                \"created_at\": {\n                  \"type\": \"string\",\n                  \"format\": \"date-time\",\n                  \"description\": \"The time the event occurred\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"AdminEvents\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"entries\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"event_id\": {\n                  \"type\": \"string\",\n                  \"description\": \"The ID of the event\"\n                },\n                \"event_type\": {\n                  \"type\": \"string\",\n                  \"description\": \"The type of the event\"\n                },\n                \"created_at\": {\n                  \"type\": \"string\",\n                  \"format\": \"date-time\",\n                  \"description\": \"The time the event occurred\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"SearchResults\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"total_count\": {\n            \"type\": \"integer\",\n            \"description\": \"The total number of search results\"\n          },\n          \"entries\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"type\": {\n                  \"type\": \"string\",\n                  \"description\": \"The type of the item (e.g. file, folder)\"\n                },\n                \"id\": {\n                  \"type\": \"string\",\n                  \"description\": \"The ID of the item\"\n                },\n                \"name\": {\n                  \"type\": \"string\",\n                  \"description\": \"The name of the item\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"MetadataTemplates\": {\n        \"type\": \"array\",\n        \"items\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"templateKey\": {\n              \"type\": \"string\",\n              \"description\": \"The key of the metadata template\"\n            },\n            \"displayName\": {\n              \"type\": \"string\",\n              \"description\": \"The display name of the metadata template\"\n            },\n            \"scope\": {\n              \"type\": \"string\",\n              \"description\": \"The scope of the metadata template\"\n            }\n          }\n        }\n      },"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 3fc7d304-6b7b-461e-b1a2-2a510c855bb9
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb", "title": "GPT Action Library: Box", "tokens": 5278, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"3fc7d304-6b7b-461e-b1a2-2a510c855bb9\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"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\": \"ac929a31-75d1-4968-acdf-858b8d36f7e6\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d03a11bf65184d684bcf5a9096334f39b7cece7cc5d8081d0fb5dc0facbbc08d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"123d95e7-3dde-4249-839d-e89ee56dc9ce\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"c5e6c3ce29c77efb28411fd61bf3b39af61d3d94d559aad7d7fa21d4bc669d72\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"e2f32af6-4388-4a5a-b697-c22d395560fa\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"299f90d1ba2fb5bda98108c5ca216bc510266bb2b0ee28d2b0fffab51dcbf437\", \"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": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "ref_doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "chroma:document": "\"description\": \"The ID of the event\"\n                },\n                \"event_type\": {\n                  \"type\": \"string\",\n                  \"description\": \"The type of the event\"\n                },\n                \"created_at\": {\n                  \"type\": \"string\",\n                  \"format\": \"date-time\",\n                  \"description\": \"The time the event occurred\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"SearchResults\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"total_count\": {\n            \"type\": \"integer\",\n            \"description\": \"The total number of search results\"\n          },\n          \"entries\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"type\": {\n                  \"type\": \"string\",\n                  \"description\": \"The type of the item (e.g. file, folder)\"\n                },\n                \"id\": {\n                  \"type\": \"string\",\n                  \"description\": \"The ID of the item\"\n                },\n                \"name\": {\n                  \"type\": \"string\",\n                  \"description\": \"The name of the item\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"MetadataTemplates\": {\n        \"type\": \"array\",\n        \"items\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"templateKey\": {\n              \"type\": \"string\",\n              \"description\": \"The key of the metadata template\"\n            },\n            \"displayName\": {\n              \"type\": \"string\",\n              \"description\": \"The display name of the metadata template\"\n            },\n            \"scope\": {\n              \"type\": \"string\",\n              \"description\": \"The scope of the metadata template\"\n            }\n          }\n        }\n      },\n      \"MetadataInstances\": {\n        \"type\": \"array\",\n        \"items\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"templateKey\": {\n              \"type\": \"string\",\n              \"description\": \"The key of the metadata template\"\n            },\n            \"type\": {\n              \"type\": \"string\",\n              \"description\": \"The type of the metadata instance\"\n            },\n            \"attributes\": {\n              \"type\": \"object\",\n              \"additionalProperties\": {\n                \"type\": \"string\"\n              },\n              \"description\": \"Attributes of the metadata instance\"\n            }\n          }\n        }\n      }\n    },\n    \"securitySchemes\": {\n      \"OAuth2\": {\n        \"type\": \"oauth2\",\n        \"flows\": {\n          \"authorizationCode\": {\n            \"authorizationUrl\": \"https://account.box.com/api/oauth2/authorize\",\n            \"tokenUrl\": \"https://api.box.com/oauth2/token\",\n            \"scopes\": {\n              \"read:folders\": \"Read folders\",\n              \"read:files\": \"Read files\",\n              \"search:items\": \"Search items\",\n              \"read:metadata\": \"Read metadata\",\n              \"read:metadata_templates\": \"Read metadata templates\",\n              \"read:events\": \"Read events\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n**Note : this schema above does not contain all possible API endpoints, be sure to edit the schema to produce the appropriate actions from [Box Developer documentation](https://developer.box.com)**\n\n## Authentication Instructions\n\nBelow are instructions on setting up authentication with this 3rd party application. Have questions?"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: e2f32af6-4388-4a5a-b697-c22d395560fa
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb", "title": "GPT Action Library: Box", "tokens": 5278, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"e2f32af6-4388-4a5a-b697-c22d395560fa\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"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\": \"ac929a31-75d1-4968-acdf-858b8d36f7e6\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d03a11bf65184d684bcf5a9096334f39b7cece7cc5d8081d0fb5dc0facbbc08d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"3fc7d304-6b7b-461e-b1a2-2a510c855bb9\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"af7955f8327f081fe519af80da65bd36a551eafbe3fb125c2bb5fd476ef65a55\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f67cf60e-3500-4a93-bd7a-b03599188573\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"4de2f402bec7bc38ae5768ebc7ba981a725e7daf3df0b28ecac24226081a941e\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 17229, \"end_char_idx\": 20345, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "ref_doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "chroma:document": "\"scope\": {\n              \"type\": \"string\",\n              \"description\": \"The scope of the metadata template\"\n            }\n          }\n        }\n      },\n      \"MetadataInstances\": {\n        \"type\": \"array\",\n        \"items\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"templateKey\": {\n              \"type\": \"string\",\n              \"description\": \"The key of the metadata template\"\n            },\n            \"type\": {\n              \"type\": \"string\",\n              \"description\": \"The type of the metadata instance\"\n            },\n            \"attributes\": {\n              \"type\": \"object\",\n              \"additionalProperties\": {\n                \"type\": \"string\"\n              },\n              \"description\": \"Attributes of the metadata instance\"\n            }\n          }\n        }\n      }\n    },\n    \"securitySchemes\": {\n      \"OAuth2\": {\n        \"type\": \"oauth2\",\n        \"flows\": {\n          \"authorizationCode\": {\n            \"authorizationUrl\": \"https://account.box.com/api/oauth2/authorize\",\n            \"tokenUrl\": \"https://api.box.com/oauth2/token\",\n            \"scopes\": {\n              \"read:folders\": \"Read folders\",\n              \"read:files\": \"Read files\",\n              \"search:items\": \"Search items\",\n              \"read:metadata\": \"Read metadata\",\n              \"read:metadata_templates\": \"Read metadata templates\",\n              \"read:events\": \"Read events\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n**Note : this schema above does not contain all possible API endpoints, be sure to edit the schema to produce the appropriate actions from [Box Developer documentation](https://developer.box.com)**\n\n## Authentication Instructions\n\nBelow are instructions on setting up authentication with this 3rd party application. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n### In ChatGPT\n\nIn ChatGPT, click on \"Authentication\" and choose OAuth \n\n\n<br> ![gptactions_box_gptauth.png](../../../images/gpt_actions_box_gptauth.png)\n\n**OAuth Connection**\n\n- Client ID - value from Box custom app you created earlier\n- Client Secret - value from Box custom app you created earlier \n- Authorization URL - : https://account.box.com/api/oauth2/authorize?response_type=code&client_id=[client ID from above]&redirect_uri=[use a placeholder like chat.openai.com/aip//oauth/callback for now, you\u2019ll update this later when you create the Action in ChatGPT]\n- Token URL : https:api.box.com/oauth2/token\n</br>\n</br>\nYou need to save the configuration and navigate back to the gpt Configuration tab to copy the Callback URL, edit the configuration for the Box action Authorization URL and format the URL as https://account.box.com/api/oauth2/authorize?response_type=code&client_id=[client_ID]&redirect_uri=[callBack URL]\n\n### Post-Action Steps\n\nUpdate the Box.com custom application\n</br>\n- Copy the CallBack URL from the gpt and add a OAuth 2.0 Redirect URIs in Box.com\n</br>\n</br>\n![gpt_actions_box_boxconfig1.png.png](../../../images/gpt_actions_box_boxconfig1.png)\n\n</br>"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: f67cf60e-3500-4a93-bd7a-b03599188573
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb", "title": "GPT Action Library: Box", "tokens": 5278, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f67cf60e-3500-4a93-bd7a-b03599188573\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"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\": \"ac929a31-75d1-4968-acdf-858b8d36f7e6\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d03a11bf65184d684bcf5a9096334f39b7cece7cc5d8081d0fb5dc0facbbc08d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"e2f32af6-4388-4a5a-b697-c22d395560fa\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"743980366435e1cde1f734afae999faf721e058cdf2305519d70b9cb1d7b4371\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"1ec6c6e1-4cfd-4d4c-a46e-0cc3ca4825de\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"49e7131cea51067c087ea9af23ea131c0d6bd3ca15ca3405b81d63553147f203\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 18763, \"end_char_idx\": 21100, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "ref_doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "chroma:document": "be sure to edit the schema to produce the appropriate actions from [Box Developer documentation](https://developer.box.com)**\n\n## Authentication Instructions\n\nBelow are instructions on setting up authentication with this 3rd party application. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n### In ChatGPT\n\nIn ChatGPT, click on \"Authentication\" and choose OAuth \n\n\n<br> ![gptactions_box_gptauth.png](../../../images/gpt_actions_box_gptauth.png)\n\n**OAuth Connection**\n\n- Client ID - value from Box custom app you created earlier\n- Client Secret - value from Box custom app you created earlier \n- Authorization URL - : https://account.box.com/api/oauth2/authorize?response_type=code&client_id=[client ID from above]&redirect_uri=[use a placeholder like chat.openai.com/aip//oauth/callback for now, you\u2019ll update this later when you create the Action in ChatGPT]\n- Token URL : https:api.box.com/oauth2/token\n</br>\n</br>\nYou need to save the configuration and navigate back to the gpt Configuration tab to copy the Callback URL, edit the configuration for the Box action Authorization URL and format the URL as https://account.box.com/api/oauth2/authorize?response_type=code&client_id=[client_ID]&redirect_uri=[callBack URL]\n\n### Post-Action Steps\n\nUpdate the Box.com custom application\n</br>\n- Copy the CallBack URL from the gpt and add a OAuth 2.0 Redirect URIs in Box.com\n</br>\n</br>\n![gpt_actions_box_boxconfig1.png.png](../../../images/gpt_actions_box_boxconfig1.png)\n\n</br>\n\n\n### Action 2 : Azure Function\n\nNow that we have the GPT created and authenticating against Box.com, we can create the azure function to handle the response formatting enabling the GPT to download the files from Box. \n\nFollow this [Azure Cookbook Guide](https://cookbook.openai.com/examples/azure/functions) for further details deploying an Azure function. Below you will find sample code to add to the function. \n\nThis code is meant to be directional - while it should work out of the box, it is designed to be customized to your need.</br>\n\n</br>\n\n**Data flow**\n\n![gpt_actions_box_azureflow.png](../../../images/gpt_actions_box_azuredataflow.png)\n\n</br></br>\n\n\n\nNow that you have the azure function created, add the sample code below:\n\nfunction_app.py"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 1ec6c6e1-4cfd-4d4c-a46e-0cc3ca4825de
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb", "title": "GPT Action Library: Box", "tokens": 5278, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"1ec6c6e1-4cfd-4d4c-a46e-0cc3ca4825de\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"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\": \"ac929a31-75d1-4968-acdf-858b8d36f7e6\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d03a11bf65184d684bcf5a9096334f39b7cece7cc5d8081d0fb5dc0facbbc08d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f67cf60e-3500-4a93-bd7a-b03599188573\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"c989cb227f5387727cd8d92fd373b31f9482c5157991e601f87b03efdb40b61e\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b72c8ef7-5acf-42f7-9d47-488e6860b87c\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"7a528b96c9139b8d1f823fa5cf9fbeb2d3ab722c8b71dff057b7b8c8ccf1dc92\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 20348, \"end_char_idx\": 23801, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "ref_doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "chroma:document": "### Action 2 : Azure Function\n\nNow that we have the GPT created and authenticating against Box.com, we can create the azure function to handle the response formatting enabling the GPT to download the files from Box. \n\nFollow this [Azure Cookbook Guide](https://cookbook.openai.com/examples/azure/functions) for further details deploying an Azure function. Below you will find sample code to add to the function. \n\nThis code is meant to be directional - while it should work out of the box, it is designed to be customized to your need.</br>\n\n</br>\n\n**Data flow**\n\n![gpt_actions_box_azureflow.png](../../../images/gpt_actions_box_azuredataflow.png)\n\n</br></br>\n\n\n\nNow that you have the azure function created, add the sample code below:\n\nfunction_app.py\n\n\n```python\nimport azure.functions as func\nfrom boxsdk import Client, JWTAuth\n\nimport requests\nimport base64\nimport json\nimport jwt\nimport logging\n\napp = func.FunctionApp(http_auth_level=func.AuthLevel.FUNCTION)\n\nlogger = logging.getLogger(__name__)\nlogger.setLevel(logging.INFO)\n\n@app.route(route=\"box_retrieval\")\ndef box_retrieval(req: func.HttpRequest) -> func.HttpResponse:\n    logger.info('Starting box_retrieval function')\n    file_ids = req.params.get('file_ids')\n    auth_header = req.headers.get('Authorization')\n\n    if not file_ids or not auth_header:\n        logger.error('Missing file_ids or Authorization header')\n        return func.HttpResponse(\n            \"Missing file_id or Authorization header.\",\n            status_code=400\n        )\n    \n    file_ids = file_ids.split(\",\")  # Assuming file_ids are passed as a comma-separated string\n    if len(file_ids) == 0 or len(file_ids) > 10:\n        logger.error('file_ids list is empty or contains more than 10 IDs')\n        return func.HttpResponse(\n            \"file_ids list is empty or contains more than 10 IDs.\",\n            status_code=400\n        )\n\n    try:\n        # Decode JWT to extract the email\n        token = auth_header.split(\" \")[1]\n        decoded_token = jwt.decode(token, options={\"verify_signature\": False})\n        upn = decoded_token['upn']\n        user_email = get_user_mapping(upn)\n        logger.info(f'User email extracted: {user_email}')\n\n        config = JWTAuth.from_settings_file('jwt_config.json')\n        sdk = Client(config)\n        logger.info('Authenticated with Box API')\n\n        # Use the user email to get the user ID\n        users = sdk.users(filter_term=user_email)\n        user = next(users)\n        user_id = user.id\n        logger.info(f'User ID obtained: {user_id}')\n\n        openai_file_responses = []\n        for file_id in file_ids:\n            # Perform as_user call to get the file representation\n            my_file = sdk.as_user(user).file(file_id).get()\n            file_url = my_file.get_download_url()\n            openai_file_responses.append(file_url)\n        \n        response_body = json.dumps({'openaiFileResponse': openai_file_responses})\n\n        return func.HttpResponse(\n            response_body,\n            status_code=200,\n            mimetype=\"application/json\"\n        )\n\n    except Exception as e:\n        return func.HttpResponse(\n            f\"An error occurred: {str(e)}\",\n            status_code=500\n        )\n    \ndef get_user_mapping(upn):\n    # In our case, the user's authentication email into Azure AD is the same as their email in Box\n    # If that is not the case, map the email in Box to the email in Azure AD\n    return upn\n```\n\njwt_config.json.sample"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: b72c8ef7-5acf-42f7-9d47-488e6860b87c
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb", "title": "GPT Action Library: Box", "tokens": 5278, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"b72c8ef7-5acf-42f7-9d47-488e6860b87c\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"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\": \"ac929a31-75d1-4968-acdf-858b8d36f7e6\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d03a11bf65184d684bcf5a9096334f39b7cece7cc5d8081d0fb5dc0facbbc08d\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"1ec6c6e1-4cfd-4d4c-a46e-0cc3ca4825de\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_box.ipynb\", \"title\": \"GPT Action Library: Box\", \"tokens\": 5278, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"16475c15c910ed4790e89c8ddac9a58aed9a12f3afa0e8dab3bbdd46e2906a20\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 23804, \"end_char_idx\": 24951, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "ref_doc_id": "ac929a31-75d1-4968-acdf-858b8d36f7e6", "chroma:document": "```python\n{\n    \"boxAppSettings\": {\n      \"clientID\": \"12345\",\n      \"clientSecret\": \"abcde\",\n      \"appAuth\": {\n        \"publicKeyID\": \"123\",\n        \"privateKey\": \"-----BEGIN ENCRYPTED PRIVATE KEY-----\\nvwxyz==\\n-----END ENCRYPTED PRIVATE KEY-----\\n\",\n        \"passphrase\": \"lmnop\"\n      }\n    },\n    \"enterpriseID\": \"09876\"\n  }\n```\n\nrequirements.txt\n\n\n```python\nboxsdk[jwt]\nazure-functions\nrequests\npyjwt\n```\n\nMake sure to follow the rest of the Azure guide for post authentication steps and chatGPT configuration : [Azure Cookbook Guide](https://cookbook.openai.com/examples/azure/functions)\n\n### FAQ & Troubleshooting\n\n- *Schema calls the wrong project or dataset:* If ChatGPT calls the wrong project or dataset, consider updating your instructions to make it more explicit either (a) which project / dataset should be called or (b) to require the user provide those exact details before it runs the query\n- Box can return a large set of data in the event stream which can cause errors, \n\n*Are there integrations that you\u2019d like us to prioritize? Are there errors in our integrations? File a PR or issue in our github, and we\u2019ll take a look.*"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: d7c4e0e1-a0c0-4e42-a66d-a4b6e4fb161d
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb", "title": "GPT Actions - Snowflake middleware", "tokens": 5944, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"d7c4e0e1-a0c0-4e42-a66d-a4b6e4fb161d\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"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\": \"af2d2469-8f83-44e0-8bbf-a032755257cf\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e51bb0df04ca68cc266c89829e99d51cb7e4dbda8766927640621bb1521570b9\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4eb028cd-d41a-4786-a7c5-a0d268dc9aab\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"b3e8a188f8eddec0d3a61dfdc53b5de00d96bfa5dc278a74d6b09aeeb023f5ac\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 0, \"end_char_idx\": 3085, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "ref_doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "chroma:document": "# GPT Actions - Snowflake middleware\n## Introduction\n\n\nThis page provides an instruction & guide for developers building a GPT Action for a specific application. Before you proceed, make sure to first familiarize yourself with the following information:\n\n* [Introduction to GPT Actions](https://platform.openai.com/docs/actions)\n* [Introduction to GPT Actions Library](https://platform.openai.com/docs/actions/actions-library)\n* [Example of Buliding a GPT Action from Scratch](https://platform.openai.com/docs/actions/getting-started)\n\n\nThis guide provides details on how to connect ChatGPT with a Snowflake Data Warehouse for the purposes of returning a SQL query to ChatGPT for use with [Data Analysis](https://help.openai.com/en/articles/8437071-data-analysis-with-chatgpt). The GPT requires an action that interfaces with middleware (ie Azure function) so that the action can properly format the response from Snowflake for use in the Python notebook environment. Data must be [returned as a file](https://platform.openai.com/docs/actions/sending-files/returning-files), so the middleware function should transform the SQL response into a CSV/Excel file, under 10MB in size.\n\nThis document will outline the Middleware function GPT action. For setting up the middleware function itself, see [GPT Actions library (Middleware) - Azure Functions](https://cookbook.openai.com/examples/chatgpt/gpt_actions_library/gpt_middleware_azure_function). You can combine this Snowflake middleware action with an action to Snowflake Directly to enable a GPT that can form and test SQL queries prior to executing them.\n\n### Value + Example Business Use Cases\n\n\nExisting Snowflake customers can leverage these guidelines to query data from their data warehouse and load that data into the Data Analysis Python environment for further insights. This enables ChatGPT powered analysis such as visualizing data sets, identifying patterns/anomalies, or identifying gaps for data cleansing purposes. This GPT can be used to drive business decisions from relatively small datasets, or to explore subsets of data through AI to generate hypotheses as you explore the holistic dataset in your BI tool, saving time and money, while identifying previously unseen patterns.\n\n## Application Information\n\n### Application Key Links\n\n\nCheck out these links from Snowflake and Azure before you get started:\n\n**Snowflake Action**\n\n* Application Website: [https://app.snowflake.com/](https://app.snowflake.com/)\n* Application Python Connector Documentation: [https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-connect](https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-connect)\n\n**Azure Function**\n\n* Application Website: [https://learn.microsoft.com/en-us/azure/azure-functions/](https://learn.microsoft.com/en-us/azure/azure-functions/)\n* Application API Documentation: [https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference/](https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference/)\n\n\n### Application Prerequisites"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 4eb028cd-d41a-4786-a7c5-a0d268dc9aab
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb", "title": "GPT Actions - Snowflake middleware", "tokens": 5944, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"4eb028cd-d41a-4786-a7c5-a0d268dc9aab\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"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\": \"af2d2469-8f83-44e0-8bbf-a032755257cf\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e51bb0df04ca68cc266c89829e99d51cb7e4dbda8766927640621bb1521570b9\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"d7c4e0e1-a0c0-4e42-a66d-a4b6e4fb161d\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"faae36901de09ebfea00e1481a7a55fb7c5a7c82e93cdec2fcc509b90d6534a0\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"af6ae3a5-15a5-46d2-9c5f-62d3131e9351\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"32abb55004f06f6d25101b5e0f5761dff498d1c311f48a77cd37dcc4387c4436\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 1648, \"end_char_idx\": 5182, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "ref_doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "chroma:document": "Existing Snowflake customers can leverage these guidelines to query data from their data warehouse and load that data into the Data Analysis Python environment for further insights. This enables ChatGPT powered analysis such as visualizing data sets, identifying patterns/anomalies, or identifying gaps for data cleansing purposes. This GPT can be used to drive business decisions from relatively small datasets, or to explore subsets of data through AI to generate hypotheses as you explore the holistic dataset in your BI tool, saving time and money, while identifying previously unseen patterns.\n\n## Application Information\n\n### Application Key Links\n\n\nCheck out these links from Snowflake and Azure before you get started:\n\n**Snowflake Action**\n\n* Application Website: [https://app.snowflake.com/](https://app.snowflake.com/)\n* Application Python Connector Documentation: [https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-connect](https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-connect)\n\n**Azure Function**\n\n* Application Website: [https://learn.microsoft.com/en-us/azure/azure-functions/](https://learn.microsoft.com/en-us/azure/azure-functions/)\n* Application API Documentation: [https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference/](https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference/)\n\n\n### Application Prerequisites\n\n\nBefore you get started, make sure you go through the following steps in your application environment:\n\n* Provision a Snowflake Data Warehouse\n* Ensure that the user authenticating into Snowflake via ChatGPT has access to the database, schemas, and tables with the necessary role\n\nIn addition, before creating your application in Azure Function App, you\u2019ll need a way to handle user authentication. You\u2019ll need to set up an OAuth App Registration in Azure Entra ID that can be linked with a Snowflake External OAuth security integration. Snowflake\u2019s External OAuth security integrations allow external systems to issue access tokens that Snowflake can use for determining level of access. In this case, that external token provider is Azure Entra ID. Since ChatGPT will connect to Azure rather than Snowflake, the GPT user\u2019s OAuth token will be provisioned by Azure associated with their user in Entra ID. Thus you\u2019ll need a way to map users in Snowflake to their corresponding user in Azure. \n\nAll of the necessary steps for both the Azure side and the Snowflake side are laid out below.\n\n## Configure the OAuth resource in Azure Entra ID\n\n\nWe\u2019ll set up a new App Registration, configure the necessary Snowflake Scopes in Azure that will be used, and retrieve all of the OAuth configuration parameters that will be needed in both Snowflake and ChatGPT. This section will all be in Azure so that in the next section, you\u2019ll have the necessary info to link to this App Registration when configuring on the Snowflake side.\n\n1. Navigate to the [Microsoft Azure Portal](https://portal.azure.com/) and authenticate.\n2. Navigate to Azure Entra ID (formerly Active Directory).\n3. Click on **App Registrations** under **Manage**.\n4. Click on **New Registration**.\n5. Enter `Snowflake GPT OAuth Client`, or similar value as the **Name**.\n6. Verify the **Supported account types** is set to **Single Tenant**.\n7. Ignore Redirect URI for now. You will come back for this once you are configuring your GPT\n8. Click **Register**.\n9. Note down the **Directory (tenant) ID** (`TENANT_ID`) under **Essentials**."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: af6ae3a5-15a5-46d2-9c5f-62d3131e9351
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb", "title": "GPT Actions - Snowflake middleware", "tokens": 5944, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"af6ae3a5-15a5-46d2-9c5f-62d3131e9351\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"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\": \"af2d2469-8f83-44e0-8bbf-a032755257cf\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e51bb0df04ca68cc266c89829e99d51cb7e4dbda8766927640621bb1521570b9\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4eb028cd-d41a-4786-a7c5-a0d268dc9aab\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"415b08d08f54145cd71ac4c2c76528b753864f340ea576f4e72bc0fb93f76eab\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f294c6d2-5ccc-4326-abb9-1b2fc15370b7\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"683decc6d07bfda1c8a07925b11b8fda755b538e2a3e69229a3764b5bf6fab5e\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 4229, \"end_char_idx\": 6974, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "ref_doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "chroma:document": "We\u2019ll set up a new App Registration, configure the necessary Snowflake Scopes in Azure that will be used, and retrieve all of the OAuth configuration parameters that will be needed in both Snowflake and ChatGPT. This section will all be in Azure so that in the next section, you\u2019ll have the necessary info to link to this App Registration when configuring on the Snowflake side.\n\n1. Navigate to the [Microsoft Azure Portal](https://portal.azure.com/) and authenticate.\n2. Navigate to Azure Entra ID (formerly Active Directory).\n3. Click on **App Registrations** under **Manage**.\n4. Click on **New Registration**.\n5. Enter `Snowflake GPT OAuth Client`, or similar value as the **Name**.\n6. Verify the **Supported account types** is set to **Single Tenant**.\n7. Ignore Redirect URI for now. You will come back for this once you are configuring your GPT\n8. Click **Register**.\n9. Note down the **Directory (tenant) ID** (`TENANT_ID`) under **Essentials**. You will use this to generate your `AZURE_AD_ISSUER` and `AZURE_AD_JWS_KEY_ENDPOINT.`\n    * The `AZURE_AD_ISSUER` is `https://sts.windows.net/TENANT_ID/`\n    *  The `AZURE_AD_JWS_KEY_ENDPOINT` is `https://login.microsoftonline.com/TENANT_ID/discovery/v2.0/keys`\n10. Click on **Endpoints** in the **Overview** interface.\n11. On the right-hand side, note the **OAuth 2.0 authorization endpoint (v2)** as the `AZURE_AD_OAUTH_AUTHORIZATION_ENDPOINT`  and **OAuth 2.0 token endpoint (v2)** as the `AZURE_AD_OAUTH_TOKEN_ENDPOINT`.\n    * The endpoints should be similar to `https://login.microsoftonline.com/90288a9b-97df-4c6d-b025-95713f21cef9/oauth2/v2.0/authorization` and `https://login.microsoftonline.com/90288a9b-97df-4c6d-b025-95713f21cef9/oauth2/v2.0/token`.\n12. Click on **Expose an API **under **Manage**.\n13. Click on the **Set** link next to **Application ID URI** to set the `Application ID URI`.\n    * The `Application ID URI` must be unique within your organization\u2019s directory, such as `https://your.company.com/4d2a8c2b-a5f4-4b86-93ca-294185f45f2e`. This value will be referred to as the `<SNOWFLAKE_APPLICATION_ID_URI>` in the subsequent configuration steps.\n14. To add a Snowflake Role as an OAuth scope for OAuth flows where the programmatic client acts on behalf of a user, click on **Add a scope** to add a scope representing the Snowflake role.\n    * Enter the scope by having the name of the Snowflake role with the `session:scope:` prefix. For example, for the Snowflake Analyst role, enter `session:scope:analyst`.\n    * Select who can consent.\n    * Enter a **display name** for the scope (e.g.: Account Admin).\n    * Enter a **description** for the scope (e.g.: Can administer the Snowflake account).\n    * Click **Add Scope**.\n    * Save the scope as `AZURE_AD_SCOPE`."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: f294c6d2-5ccc-4326-abb9-1b2fc15370b7
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb", "title": "GPT Actions - Snowflake middleware", "tokens": 5944, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f294c6d2-5ccc-4326-abb9-1b2fc15370b7\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"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\": \"af2d2469-8f83-44e0-8bbf-a032755257cf\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e51bb0df04ca68cc266c89829e99d51cb7e4dbda8766927640621bb1521570b9\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"af6ae3a5-15a5-46d2-9c5f-62d3131e9351\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"0b7de66be9d9fe919e63bf18135e8c0e301b9be9ecaaa9563069ce6473610dfa\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"603ccd97-c475-49a5-aa9e-517dff59ead2\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"6ced49d223edfee113df72f35c19edfe9a2b17df098e6a6cf3bab8009934d39b\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 5712, \"end_char_idx\": 8458, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "ref_doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "chroma:document": "* The endpoints should be similar to `https://login.microsoftonline.com/90288a9b-97df-4c6d-b025-95713f21cef9/oauth2/v2.0/authorization` and `https://login.microsoftonline.com/90288a9b-97df-4c6d-b025-95713f21cef9/oauth2/v2.0/token`.\n12. Click on **Expose an API **under **Manage**.\n13. Click on the **Set** link next to **Application ID URI** to set the `Application ID URI`.\n    * The `Application ID URI` must be unique within your organization\u2019s directory, such as `https://your.company.com/4d2a8c2b-a5f4-4b86-93ca-294185f45f2e`. This value will be referred to as the `<SNOWFLAKE_APPLICATION_ID_URI>` in the subsequent configuration steps.\n14. To add a Snowflake Role as an OAuth scope for OAuth flows where the programmatic client acts on behalf of a user, click on **Add a scope** to add a scope representing the Snowflake role.\n    * Enter the scope by having the name of the Snowflake role with the `session:scope:` prefix. For example, for the Snowflake Analyst role, enter `session:scope:analyst`.\n    * Select who can consent.\n    * Enter a **display name** for the scope (e.g.: Account Admin).\n    * Enter a **description** for the scope (e.g.: Can administer the Snowflake account).\n    * Click **Add Scope**.\n    * Save the scope as `AZURE_AD_SCOPE`. It should be a concatenation of your `Application ID URI` and your `Scope name`\n15. In the **Overview** section, copy the `ClientID` from the **Application (client) ID** field. This will be known as the `OAUTH_CLIENT_ID` in the following steps.\n16. Click on **Certificates & secrets** and then **New client secret**.\n17. Add a description of the secret.\n18. Select **730 days (24 months)**. For testing purposes, select secrets that don\u2019t expire soon.\n19. Click **Add**. Copy the secret. This will be known as the `OAUTH_CLIENT_SECRET` in the following steps.\n20. For programmatic clients that will request an Access Token on behalf of a user, configure Delegated permissions for Applications as follows.\n    * Click on **API Permissions**.\n    * Click on **Add Permission**.\n    * Click on **My APIs**.\n    * Click on the **Snowflake OAuth Resource** that you created in [Configure the OAuth resource in Azure AD](https://docs.snowflake.com/en/user-guide/oauth-azure#configure-the-oauth-resource-in-azure-ad).\n    * Click on the **Delegated Permissions** box.\n    * Check on the Permission related to the Scopes defined in the Application that you wish to grant to this client.\n    * Click **Add Permissions**.\n    * Click on the **Grant Admin Consent** button to grant the permissions to the client. Note that for testing purposes, permissions are configured this way. However, in a production environment, granting permissions in this manner is not advisable.\n    * Click **Yes**."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 603ccd97-c475-49a5-aa9e-517dff59ead2
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb", "title": "GPT Actions - Snowflake middleware", "tokens": 5944, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"603ccd97-c475-49a5-aa9e-517dff59ead2\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"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\": \"af2d2469-8f83-44e0-8bbf-a032755257cf\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e51bb0df04ca68cc266c89829e99d51cb7e4dbda8766927640621bb1521570b9\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f294c6d2-5ccc-4326-abb9-1b2fc15370b7\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"20f8092363d4d61c19c00d701faf47e1f44499388ebeb75734565c825f376034\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"0740576b-175f-4c6f-a9cc-30154cf4e62e\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"ba4a1f0791b11d46c5d1d5a42aae0e6c7fa1eef0985f61cf0d49ee9333b512f1\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 6798, \"end_char_idx\": 9203, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "ref_doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "chroma:document": ": Account Admin).\n    * Enter a **description** for the scope (e.g.: Can administer the Snowflake account).\n    * Click **Add Scope**.\n    * Save the scope as `AZURE_AD_SCOPE`. It should be a concatenation of your `Application ID URI` and your `Scope name`\n15. In the **Overview** section, copy the `ClientID` from the **Application (client) ID** field. This will be known as the `OAUTH_CLIENT_ID` in the following steps.\n16. Click on **Certificates & secrets** and then **New client secret**.\n17. Add a description of the secret.\n18. Select **730 days (24 months)**. For testing purposes, select secrets that don\u2019t expire soon.\n19. Click **Add**. Copy the secret. This will be known as the `OAUTH_CLIENT_SECRET` in the following steps.\n20. For programmatic clients that will request an Access Token on behalf of a user, configure Delegated permissions for Applications as follows.\n    * Click on **API Permissions**.\n    * Click on **Add Permission**.\n    * Click on **My APIs**.\n    * Click on the **Snowflake OAuth Resource** that you created in [Configure the OAuth resource in Azure AD](https://docs.snowflake.com/en/user-guide/oauth-azure#configure-the-oauth-resource-in-azure-ad).\n    * Click on the **Delegated Permissions** box.\n    * Check on the Permission related to the Scopes defined in the Application that you wish to grant to this client.\n    * Click **Add Permissions**.\n    * Click on the **Grant Admin Consent** button to grant the permissions to the client. Note that for testing purposes, permissions are configured this way. However, in a production environment, granting permissions in this manner is not advisable.\n    * Click **Yes**.\n\n\n## Create a security integration in Snowflake\n\nOnce the App Registration is complete in Azure Entra ID, the next step is to link that App Registration to Snowflake via an External OAuth Security Integration. The `external_oauth_audience_list` parameter of the security integration must match the **Application ID URI** that you specified while configuring Azure Entra ID. \n\nThe **Issuer** and the **JWS Keys endpoint** will also come from values collected in the previous steps. The **User Mapping Attribute** can either be set to `EMAIL_ADDRESS` or `LOGIN_NAME`, and this is how user\u2019s Microsoft login credentials will be mapped to their user in Snowflake to ensure permissions in Snowflake are honored by the access token issued to ChatGPT."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 0740576b-175f-4c6f-a9cc-30154cf4e62e
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb", "title": "GPT Actions - Snowflake middleware", "tokens": 5944, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"0740576b-175f-4c6f-a9cc-30154cf4e62e\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"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\": \"af2d2469-8f83-44e0-8bbf-a032755257cf\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e51bb0df04ca68cc266c89829e99d51cb7e4dbda8766927640621bb1521570b9\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"603ccd97-c475-49a5-aa9e-517dff59ead2\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"94fce7394a27815467e4321a27d1f54f7178e96a1db8a0a6b63b4343156f5eb1\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"3e0d4e21-f535-4557-a39b-ab3eaa751580\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"160816291367e70930ccb6d4f063599cd8b984d0880c5e14d140348086a9c0fa\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 7427, \"end_char_idx\": 11853, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "ref_doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "chroma:document": "19. Click **Add**. Copy the secret. This will be known as the `OAUTH_CLIENT_SECRET` in the following steps.\n20. For programmatic clients that will request an Access Token on behalf of a user, configure Delegated permissions for Applications as follows.\n    * Click on **API Permissions**.\n    * Click on **Add Permission**.\n    * Click on **My APIs**.\n    * Click on the **Snowflake OAuth Resource** that you created in [Configure the OAuth resource in Azure AD](https://docs.snowflake.com/en/user-guide/oauth-azure#configure-the-oauth-resource-in-azure-ad).\n    * Click on the **Delegated Permissions** box.\n    * Check on the Permission related to the Scopes defined in the Application that you wish to grant to this client.\n    * Click **Add Permissions**.\n    * Click on the **Grant Admin Consent** button to grant the permissions to the client. Note that for testing purposes, permissions are configured this way. However, in a production environment, granting permissions in this manner is not advisable.\n    * Click **Yes**.\n\n\n## Create a security integration in Snowflake\n\nOnce the App Registration is complete in Azure Entra ID, the next step is to link that App Registration to Snowflake via an External OAuth Security Integration. The `external_oauth_audience_list` parameter of the security integration must match the **Application ID URI** that you specified while configuring Azure Entra ID. \n\nThe **Issuer** and the **JWS Keys endpoint** will also come from values collected in the previous steps. The **User Mapping Attribute** can either be set to `EMAIL_ADDRESS` or `LOGIN_NAME`, and this is how user\u2019s Microsoft login credentials will be mapped to their user in Snowflake to ensure permissions in Snowflake are honored by the access token issued to ChatGPT. \n\n\n```python\nCREATE OR REPLACE SECURITY INTEGRATION AZURE_OAUTH_INTEGRATION\n  TYPE = EXTERNAL_OAUTH\n  ENABLED = TRUE\n  EXTERNAL_OAUTH_TYPE = 'AZURE'\n  EXTERNAL_OAUTH_ISSUER = '<AZURE_AD_ISSUER>'\n  EXTERNAL_OAUTH_JWS_KEYS_URL = '<AZURE_AD_JWS_KEY_ENDPOINT>'\n  EXTERNAL_OAUTH_AUDIENCE_LIST = ('<SNOWFLAKE_APPLICATION_ID_URI>')\n  EXTERNAL_OAUTH_TOKEN_USER_MAPPING_CLAIM = 'upn'\n  EXTERNAL_OAUTH_SNOWFLAKE_USER_MAPPING_ATTRIBUTE = 'EMAIL_ADDRESS';\n```\n\n### Middleware information:\n\nMake sure you go through the following steps in your Azure environment:\n\n* Azure Portal or VS Code with access to create Azure Function Apps and Azure Entra App Registrations\n* There is [a detailed section in this guide](#azure-function-app) related to deploying and designing the function required to wrap the response from Snowflake in order to return the query results as a CSV to ChatGPT. The Azure Function App allows your GPT to ingest larger datasets as ChatGPT can ingest more data from files responses rather than from application/json payloads. Additionally, those datasets will only be available for Data Analysis (aka Code Interpreter) with a response formatted as a CSV file.\n\n### Azure Function App\n\nNow that we have the GPT created and handled Azure/Snowflake authentication, we can create the Azure Function App itself to execute the SQL query and handle the response formatting enabling the GPT to download the result as a CSV for use with Data Analysis.\n\nFollow this [Azure Cookbook Guide](https://cookbook.openai.com/examples/azure/functions) for further details deploying an Azure Function App. Below you will find sample code to add to the function.\n\nThis code is meant to be directional - while it should work out of the box, you should customize it based on the needs specific to your GPT and your IT setup.\n\n### Application Code\n\nYou\u2019ll need to setup the following flows in your Azure Function App:\n\n* Extracting the token from the HTTP request and using it to connect to Snowflake\n* Executing the SQL query and writing the results to a CSV\n* Temporarily storing that CSV in Blob Storage*\n* Generating a pre-signed URL to access that CSV securely*\n* Responding with an openaiFileResponse\n\n*These steps may not be required if you use the [file stream](https://platform.openai.com/docs/actions/getting-started/inline-option) option instead of the [url](https://platform.openai.com/docs/actions/getting-started/url-option) option for returning files to your GPT. More on this below.\n\nEnsure you have the necessary libraries installed and imported into your script. In addition to Python standard libraries, this sample script leveraged the following:"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 3e0d4e21-f535-4557-a39b-ab3eaa751580
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb", "title": "GPT Actions - Snowflake middleware", "tokens": 5944, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"3e0d4e21-f535-4557-a39b-ab3eaa751580\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"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\": \"af2d2469-8f83-44e0-8bbf-a032755257cf\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e51bb0df04ca68cc266c89829e99d51cb7e4dbda8766927640621bb1521570b9\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"0740576b-175f-4c6f-a9cc-30154cf4e62e\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"f50e2c0c707c52b912d2e54f5a9583c1f6cb4acfcf5eea52bf2f11a068ec1af1\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"ec627e04-e0ec-48be-b44f-00bb6661ff92\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"db2cd53f39f9b2d703a48f52c21c00ce7d75ce0ac7f5d2e1c323d62735b45b55\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 11856, \"end_char_idx\": 14707, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "ref_doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "chroma:document": "```python\nimport azure.functions as func\nfrom azure.storage.blob import BlobServiceClient, generate_blob_sas, BlobSasPermissions, ContentSettings\nimport snowflake.connector\nimport jwt    # pyjwt for token decoding\n```\n\n#### Connecting to Snowflake\n\nTo connect to Snowflake, you\u2019ll need to extract the access token assigned from Azure Entra ID from the Authorization header and use that token when connecting to the Snowflake server. \n\nIn this this example, Snowflake usernames are email addresses which simplifies the mapping of the Entra ID user extracted from the HTTP access token to the Snowflake user ID needed to connect. If this is not the case for your organization, you can map email addresses to Snowflake user IDs in your Python application.\n\nMy application was built to interface with a single Snowflake Account (i.e. ab12345.eastus2.azure) and Warehouse. If you need to access multiple accounts or warehouses, you may consider passing these parameters in your GPT action parameters so you can extract them from the HTTP request.\n\n\n```python\n# Extract the token from the Authorization header\nauth_header = req.headers.get('Authorization')\ntoken_type, token = auth_header.split()\n\ntry:\n    # Extract email address from token to use for Snowflake user mapping\n    # If Snowflake usernames are not emails, then identify the username accordingly\n    decoded_token = jwt.decode(token, options={\"verify_signature\": False})\n    email = decoded_token.get('upn') \n    \n    conn = snowflake.connector.connect(\n        user=email, # Snowflake username, i.e., user's email in my example\n        account=SNOWFLAKE_ACCOUNT, # Snowflake account, i.e., ab12345.eastus2.azure\n        authenticator=\"oauth\",\n        token=token,\n        warehouse=SNOWFLAKE_WAREHOUSE # Replace with Snowflake warehouse\n    )\n    logging.info(\"Successfully connected to Snowflake.\")\nexcept Exception as e:\n    logging.error(f\"Failed to connect to Snowflake: {e}\")\n```\n\n#### Execute query and save CSV\n\nOnce you connect to Snowflake you\u2019ll need to execute the query and store the results into a CSV. While the role in Snowflake should prevent any chance of harmful queries, you may want to sanitize your query in your application (not included below) just as you would any other programmatic SQL query execution. \n\n\n```python\n# Extract SQL query from request parameters or body\nsql_query = req.params.get('sql_query')\n\ntry:\n    # Use the specified warehouse\n    cursor = conn.cursor()\n\n    # Execute the query\n    cursor.execute(sql_query)\n    results = cursor.fetchall()\n    column_names = [desc[0] for desc in cursor.description]\n    logger.info(f\"Query executed successfully: {sql_query}\")\n\n    # Convert results to CSV\n    csv_file_path = write_results_to_csv(results, column_names)\nexcept Exception as e:\n    logger.error(f\"Error executing query or processing data: {e}\")"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: ec627e04-e0ec-48be-b44f-00bb6661ff92
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb", "title": "GPT Actions - Snowflake middleware", "tokens": 5944, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"ec627e04-e0ec-48be-b44f-00bb6661ff92\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"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\": \"af2d2469-8f83-44e0-8bbf-a032755257cf\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e51bb0df04ca68cc266c89829e99d51cb7e4dbda8766927640621bb1521570b9\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"3e0d4e21-f535-4557-a39b-ab3eaa751580\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"a02aba08243cf11dd1886ffd65cb0b66126a9fa50cf78415b495b5a27285c59d\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"dd3fcd90-2142-4f11-ac40-86efbf5cc624\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"7ceb5b3788e60af1a7c855b8c884fe03bdbc362e2b87c6c9ad71d3e7fcca58b4\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 14147, \"end_char_idx\": 16341, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "ref_doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "chroma:document": "```python\n# Extract SQL query from request parameters or body\nsql_query = req.params.get('sql_query')\n\ntry:\n    # Use the specified warehouse\n    cursor = conn.cursor()\n\n    # Execute the query\n    cursor.execute(sql_query)\n    results = cursor.fetchall()\n    column_names = [desc[0] for desc in cursor.description]\n    logger.info(f\"Query executed successfully: {sql_query}\")\n\n    # Convert results to CSV\n    csv_file_path = write_results_to_csv(results, column_names)\nexcept Exception as e:\n    logger.error(f\"Error executing query or processing data: {e}\")\n\n\ndef write_results_to_csv(results, column_names):\n    try:\n        # Create a temporary file\n        temp_file = tempfile.NamedTemporaryFile(delete=False, mode='w', newline='')\n        csv_writer = csv.writer(temp_file)\n        csv_writer.writerow(column_names)  # Write the column headers\n        csv_writer.writerows(results)      # Write the data rows\n        temp_file.close()  # Close the file to flush the contents\n        return temp_file.name  # Return file path\n    except Exception as e:\n        logger.error(f\"Error writing results to CSV: {e}\")\n```\n\n#### Storing the file in Blob Storage\n\nThere are 2 methods for returning files to ChatGPT for processing. You can either [stream](https://platform.openai.com/docs/actions/getting-started/inline-option) the base64 encoded data along with the mimeType and file name in the openaiFileResponse list response, or you can return a [list of URLs](https://platform.openai.com/docs/actions/getting-started/url-option). In this solution we\u2019ll focus on the latter.\n\nTo do this, you\u2019ll need to upload the CSV to Azure Blob Storage and return a pre-signed URL for accessing that file securely in ChatGPT. It is important to note that in order to download a URL in ChatGPT, you\u2019ll need to ensure that URL includes a content_type and content_disposition, as in the below example. If you\u2019d like to inspect whether a URL has the necessary headers, you can use ``curl -I <url>`` from any terminal.\n\nYou\u2019ll need to get a connection String for your Azure storage bucket, as per instructions [here](https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string)."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: dd3fcd90-2142-4f11-ac40-86efbf5cc624
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb", "title": "GPT Actions - Snowflake middleware", "tokens": 5944, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"dd3fcd90-2142-4f11-ac40-86efbf5cc624\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"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\": \"af2d2469-8f83-44e0-8bbf-a032755257cf\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e51bb0df04ca68cc266c89829e99d51cb7e4dbda8766927640621bb1521570b9\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"ec627e04-e0ec-48be-b44f-00bb6661ff92\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"30b3adb482f6abdb189496ecc2d0557ce19ba5d92e5bfa639255640168de2345\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"6c9f84ac-7165-49e0-9364-f09b5891cfe5\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"8a7a916f14bc8b62d5cc7ad2017314f40fe72f2f78bfb7888b960bbeae191848\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 14710, \"end_char_idx\": 18402, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "ref_doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "chroma:document": "def write_results_to_csv(results, column_names):\n    try:\n        # Create a temporary file\n        temp_file = tempfile.NamedTemporaryFile(delete=False, mode='w', newline='')\n        csv_writer = csv.writer(temp_file)\n        csv_writer.writerow(column_names)  # Write the column headers\n        csv_writer.writerows(results)      # Write the data rows\n        temp_file.close()  # Close the file to flush the contents\n        return temp_file.name  # Return file path\n    except Exception as e:\n        logger.error(f\"Error writing results to CSV: {e}\")\n```\n\n#### Storing the file in Blob Storage\n\nThere are 2 methods for returning files to ChatGPT for processing. You can either [stream](https://platform.openai.com/docs/actions/getting-started/inline-option) the base64 encoded data along with the mimeType and file name in the openaiFileResponse list response, or you can return a [list of URLs](https://platform.openai.com/docs/actions/getting-started/url-option). In this solution we\u2019ll focus on the latter.\n\nTo do this, you\u2019ll need to upload the CSV to Azure Blob Storage and return a pre-signed URL for accessing that file securely in ChatGPT. It is important to note that in order to download a URL in ChatGPT, you\u2019ll need to ensure that URL includes a content_type and content_disposition, as in the below example. If you\u2019d like to inspect whether a URL has the necessary headers, you can use ``curl -I <url>`` from any terminal.\n\nYou\u2019ll need to get a connection String for your Azure storage bucket, as per instructions [here](https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string). \n\n\n```python\ndef upload_csv_to_azure(file_path, container_name, blob_name, connect_str):\n    try:\n        # Create the BlobServiceClient object which will be used to create a container client\n        blob_service_client = BlobServiceClient.from_connection_string(connect_str)\n        \n        # Create a blob client using the local file name as the name for the blob\n        blob_client = blob_service_client.get_blob_client(container=container_name, blob=blob_name)\n\n        # Upload the file with specified content settings\n        with open(file_path, \"rb\") as data:\n            blob_client.upload_blob(data, overwrite=True, content_settings=ContentSettings(\n                content_type='text/csv',\n                content_disposition=f'attachment; filename=\"{blob_name}\"'\n            ))\n        logger.info(f\"Successfully uploaded {file_path} to {container_name}/{blob_name}\")\n\n        # Generate a SAS token for the blob\n        sas_token = generate_blob_sas(\n            account_name=blob_service_client.account_name,\n            container_name=container_name,\n            blob_name=blob_name,\n            account_key=blob_service_client.credential.account_key,\n            permission=BlobSasPermissions(read=True),\n            expiry=datetime.datetime.utcnow() + datetime.timedelta(hours=1)  # Token valid for 1 hour\n        )\n\n        # Generate a presigned URL using the SAS token\n        url = f\"https://{blob_service_client.account_name}.blob.core.windows.net/{container_name}/{blob_name}?{sas_token}\"\n        logger.info(f\"Generated presigned URL: {url}\")\n\n        return url\n    except Exception as e:\n        logger.error(f\"Error uploading file to Azure Blob Storage: {e}\")\n        raise\n```\n\n#### Format openaiFileResponse\n\nLastly, you\u2019ll need to format the response appropriately to instruct ChatGPT to process that response as a file or series of files. The openaiFileResponse is a list which can include up to 10 URLs (or base64 encodings if using the [inline option](https://platform.openai.com/docs/actions/getting-started/inline-option))."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 6c9f84ac-7165-49e0-9364-f09b5891cfe5
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb", "title": "GPT Actions - Snowflake middleware", "tokens": 5944, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"6c9f84ac-7165-49e0-9364-f09b5891cfe5\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"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\": \"af2d2469-8f83-44e0-8bbf-a032755257cf\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e51bb0df04ca68cc266c89829e99d51cb7e4dbda8766927640621bb1521570b9\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"dd3fcd90-2142-4f11-ac40-86efbf5cc624\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"75ddf880fb3bdf6489f3614ce2ca078c03f03c50e5e3a9687ddd8b425c20e355\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"6771a787-cb8a-4792-801d-48e1802ccdbe\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"c9f5cc16f34fad6a7d06b6667e11c95ac09d31c7027e48750d87bc3b9b292740\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 18405, \"end_char_idx\": 20509, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "ref_doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "chroma:document": "```python\n# Format the response so ChatGPT treats it as a file\nresponse = {\n    'openaiFileResponse': [csv_url]\n}\ncursor.close()\nconn.close()\nreturn func.HttpResponse(\n    json.dumps(response), \n    status_code=200\n)\n```\n\n\nThere are a lot of moving pieces to this application, so testing your Azure Function App can be important. ChatGPT can be a difficult testing grounds given that requests and responses can sometimes be more opaque than needed for debugging. Initial testing of your application through cURL or Postman to invoke the HTTP request from a more controlled environment will allow you to debug and triage issues more easily. Once you determine that responses are being returned as expected in those tools, you are ready to build your GPT.\n\n## ChatGPT Steps\n\n### Custom GPT Instructions\n\nOnce you've created a Custom GPT, use the text below in the Instructions panel for inspiration. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n##### Example Instructions\n\nIt is important that ChatGPT understands your table schema to properly form SQL queries. There are different methods for doing so, and this Instruction set represents the most direct way. We are working to publish additional instructions for different versions of Snowflake GPTs you may want to build to allow for working with multiple different tables, schemas and databases, or to even learn dynamically for schemas that tend to change over time.\n\nBelow are some basic instructions when working with a single schema and table. This GPT has been optimized for a single use case (analyzing flight data from January 2013 out of NYC) which allows for the most simple instructions to provide the most reliable GPT performance.\n\nYou are an expert at writing SQL queries to fetch data from Snowflake. You help users convert their prompts into SQL queries. Any question around flight data will be converted into a Snowflake SQL query that hits the table `FLIGHTS.PUBLIC.JAN_2013_NYC`. Pass any query into the \"sql_query\" parameter"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 6771a787-cb8a-4792-801d-48e1802ccdbe
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb", "title": "GPT Actions - Snowflake middleware", "tokens": 5944, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"6771a787-cb8a-4792-801d-48e1802ccdbe\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"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\": \"af2d2469-8f83-44e0-8bbf-a032755257cf\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e51bb0df04ca68cc266c89829e99d51cb7e4dbda8766927640621bb1521570b9\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"6c9f84ac-7165-49e0-9364-f09b5891cfe5\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"5567e4f817571c9a60630762ec589659bb8cc366a90c7010c62cd94e426f34a9\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c78d8e30-3965-46db-bfec-c44ffe1d0166\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"ea27476ccbd950edce14861b2c1e44513f6b6a6d833f1c72cd305141f7f0cf92\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 18628, \"end_char_idx\": 22289, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "ref_doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "chroma:document": "There are a lot of moving pieces to this application, so testing your Azure Function App can be important. ChatGPT can be a difficult testing grounds given that requests and responses can sometimes be more opaque than needed for debugging. Initial testing of your application through cURL or Postman to invoke the HTTP request from a more controlled environment will allow you to debug and triage issues more easily. Once you determine that responses are being returned as expected in those tools, you are ready to build your GPT.\n\n## ChatGPT Steps\n\n### Custom GPT Instructions\n\nOnce you've created a Custom GPT, use the text below in the Instructions panel for inspiration. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n##### Example Instructions\n\nIt is important that ChatGPT understands your table schema to properly form SQL queries. There are different methods for doing so, and this Instruction set represents the most direct way. We are working to publish additional instructions for different versions of Snowflake GPTs you may want to build to allow for working with multiple different tables, schemas and databases, or to even learn dynamically for schemas that tend to change over time.\n\nBelow are some basic instructions when working with a single schema and table. This GPT has been optimized for a single use case (analyzing flight data from January 2013 out of NYC) which allows for the most simple instructions to provide the most reliable GPT performance.\n\nYou are an expert at writing SQL queries to fetch data from Snowflake. You help users convert their prompts into SQL queries. Any question around flight data will be converted into a Snowflake SQL query that hits the table `FLIGHTS.PUBLIC.JAN_2013_NYC`. Pass any query into the \"sql_query\" parameter\n\n\nThe schema of the table includes\n```\nID\tNUMBER\tA unique identifier for each flight\nYEAR\tNUMBER\tThe year of the flight\nMONTH\tNUMBER\tThe month of the flight\nDAY\t\tNUMBER\tThe day of the month on which the flight departed\nDEP_TIME\tNUMBER\tThe actual departure time of the flight\nSCHED_DEP_TIME\tNUMBER\tThe scheduled departure time of the flight\nDEP_DELAY\tNUMBER\tThe departure delay in minutes (negative values indicate early departures)\nARR_TIME\tNUMBER\tThe actual arrival time of the flight\nSCHED_ARR_TIME\tNUMBER\tThe scheduled arrival time of the flight\nARR_DELAY\tNUMBER\tThe arrival delay in minutes (negative values indicate early arrivals)\nCARRIER_CODE\tTEXT\tThe carrier code of the airline\nFLIGHT\tNUMBER\tThe flight number\nTAILNUM\tTEXT\tThe aircraft tail number\nORIGIN_AIRPORT_CODE\tTEXT\tThe origin airport code\nDEST_AIRPORT_CODE\tTEXT\tThe destination airport code\nAIR_TIME\tNUMBER\tThe total airtime of the flight in minutes\nDISTANCE\tNUMBER\tThe distance traveled by the flight in miles\nHOUR\tNUMBER\tThe hour part of the scheduled departure time\nMINUTE\tNUMBER\tThe minute part of the scheduled departure time\nTIME_HOUR\tNUMBER\tThe time at which the flight departed (rounded to the nearest hour)\nCARRIER_NAME\tTEXT\tThe full name of the airline carrier\nORIGIN_AIRPORT_NAME\tTEXT\tThe full name of the origin airport\nORIGIN_REGION\tTEXT\tThe region code of the origin airport\nORIGIN_MUNICIPALITY\tTEXT\tThe city where the origin airport is located\nORIGIN_COORDINATES\tTEXT\tThe geographical coordinates of the origin airport\nDEST_AIRPORT_NAME\tTEXT\tThe full name of the destination airport\nDEST_REGION\tTEXT\tThe region code of the destination airport\nDEST_MUNICIPALITY\tTEXT\tThe city where the destination airport is located\nDEST_COORDINATES\tTEXT\tThe geographical coordinates of the destination airport\n```"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: c78d8e30-3965-46db-bfec-c44ffe1d0166
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb", "title": "GPT Actions - Snowflake middleware", "tokens": 5944, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"c78d8e30-3965-46db-bfec-c44ffe1d0166\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"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\": \"af2d2469-8f83-44e0-8bbf-a032755257cf\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e51bb0df04ca68cc266c89829e99d51cb7e4dbda8766927640621bb1521570b9\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"6771a787-cb8a-4792-801d-48e1802ccdbe\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"0570e1e6ad773044360241e2c72ca492d9c5f9c0404497a2bd0462043ac8faa1\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"8324e94e-c165-425a-8170-a31d76cc653b\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"f63f6f7630c887d06ae59fabef1b20ddbf4699f06dd3a442b99a1a47b37efb15\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 22292, \"end_char_idx\": 25598, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "ref_doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "chroma:document": "When a user asks for data around flights, perform the following:\n\n\n1. Use the `executeSQL` action to send a POST request to the Azure function endpoint\n2. Receive the file that is returned as part of the Action response. Display it as a spreadsheet\n3. Perform analysis on the file and provide the necessary information that the user has asked for\n\n\nThe user will wish to ask questions about the data in code interpreter, so use that for any data analysis insights from the dataset you pulled.\n\n### OpenAPI Schema\n\nOnce you've created a Custom GPT, copy the text below in the Actions panel, replacing the placeholder values with your specific function details and updating your parameters based on any additional inputs you built into your Azure Function App. \n\nHave questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n\n```python\nopenapi: 3.1.0\ninfo:\n  title: Snowflake GPT API\n  description: API to execute SQL queries on Snowflake and get the results as a CSV file URL.\n  version: 1.0.0\nservers:\n  - url: https://<server-name>.azurewebsites.net\n    description: Azure Function App server running Snowflake integration application\npaths:\n  /api/<function_name>?code=<code>:\n    post:\n      operationId: executeSQL\n      summary: Executes a SQL query on Snowflake and returns the result file URL as a CSV.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                sql_query:\n                  type: string\n                  description: The SQL query to be executed on Snowflake.\n              required:\n                - sql_query\n      responses:\n        '200':\n          description: Successfully executed the query.\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  openaiFileResponse:\n                    type: array\n                    items:\n                      type: string\n                      format: uri\n                    description: Array of URLs pointing to the result files.\n        '401':\n          description: Unauthorized. Missing or invalid authentication token.\n        '400':\n          description: Bad Request. The request was invalid or cannot be otherwise served.\n        '500':\n          description: Internal Server Error. An error occurred on the server.\ncomponents:\n  schemas: {} \n```\n\n### FAQ & Troubleshooting\n\n* Files returned to ChatGPT are limited in size to 10MB. Your request may fail if the file returned is larger than that. Ensure to include LIMITs on your SQL commands if you find you are running into these limitations.\n* _Why is the Azure Function App requred in the first place?_ ChatGPT\u2019s Data Analysis feature (aka Code Interpreter) depends on a secure Python environment that is separate from the model\u2019s context window. Data passed to Data Analysis must be done so by uploading a file today. GPT actions returning data must then return that data as a CSV or other data file type. In order to return a file via GPT action, the response must be wrapped in an `openaiFileResponse` object. This requires custom code to properly format the response."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 8324e94e-c165-425a-8170-a31d76cc653b
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb", "title": "GPT Actions - Snowflake middleware", "tokens": 5944, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"8324e94e-c165-425a-8170-a31d76cc653b\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"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\": \"af2d2469-8f83-44e0-8bbf-a032755257cf\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e51bb0df04ca68cc266c89829e99d51cb7e4dbda8766927640621bb1521570b9\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"c78d8e30-3965-46db-bfec-c44ffe1d0166\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_middleware.ipynb\", \"title\": \"GPT Actions - Snowflake middleware\", \"tokens\": 5944, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"bf85947818fb44162632c67b2fdc242522a4567294cea3a2c84c2ec8920a2918\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 23700, \"end_char_idx\": 27346, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "ref_doc_id": "af2d2469-8f83-44e0-8bbf-a032755257cf", "chroma:document": "requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                sql_query:\n                  type: string\n                  description: The SQL query to be executed on Snowflake.\n              required:\n                - sql_query\n      responses:\n        '200':\n          description: Successfully executed the query.\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  openaiFileResponse:\n                    type: array\n                    items:\n                      type: string\n                      format: uri\n                    description: Array of URLs pointing to the result files.\n        '401':\n          description: Unauthorized. Missing or invalid authentication token.\n        '400':\n          description: Bad Request. The request was invalid or cannot be otherwise served.\n        '500':\n          description: Internal Server Error. An error occurred on the server.\ncomponents:\n  schemas: {} \n```\n\n### FAQ & Troubleshooting\n\n* Files returned to ChatGPT are limited in size to 10MB. Your request may fail if the file returned is larger than that. Ensure to include LIMITs on your SQL commands if you find you are running into these limitations.\n* _Why is the Azure Function App requred in the first place?_ ChatGPT\u2019s Data Analysis feature (aka Code Interpreter) depends on a secure Python environment that is separate from the model\u2019s context window. Data passed to Data Analysis must be done so by uploading a file today. GPT actions returning data must then return that data as a CSV or other data file type. In order to return a file via GPT action, the response must be wrapped in an `openaiFileResponse` object. This requires custom code to properly format the response.\n* _My company uses a different cloud provider than Azure._ For connecting other middleware functions to ChatGPT via GPT action, please refer to other [AWS](https://cookbook.openai.com/examples/chatgpt/gpt_actions_library/gpt_middleware_aws_function) or [GCP](https://cookbook.openai.com/examples/chatgpt/gpt_actions_library/gpt_middleware_google_cloud_function) middleware cookbooks. You can use the concepts discussed in this cookbook to advise on considerations when building your middleware app, but connecting that middleware to Snowflake may be different for different cloud providers. For example, Snowflake built an External OAuth integration specifically for linking with Azure Entra ID. \n* _How do I limit the datasets that my GPT has access to?_ It can be imporant to limit the scope of access ChatGPT has within Snowflake. There are a few ways to do this:\n    * Snowflake roles can limit who has access to which tables, and will be respected by the GPT user\u2019s access token provisioned by Azure Entra ID\n    * In your middleware function you can add sanity checks to verify the tables accessed are approved by for that application\n    * You may want to generate an entirely new Database/Warehouse specific to integrating with ChatGPT that is scrubbed of anything sensitive, such as PII.\n* _Schema calls the wrong warehouse or dataset:_ If ChatGPT calls the wrong warehouse or database, consider updating your instructions to make it more explicit either (a) which warehouse / database should be called or (b) to require the user provide those exact details before it runs the query\n\n\n_Are there integrations that you\u2019d like us to prioritize? Are there errors in our integrations? File a PR or issue in our github, and we\u2019ll take a look._"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: a62cdc94-00d1-47dd-a992-6ec570ec122f
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb", "title": "GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)", "tokens": 4540, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"a62cdc94-00d1-47dd-a992-6ec570ec122f\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"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\": \"f8e76820-fce1-4d88-bab9-2784d99832f3\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"44d7328e4b5dce8556b9ba5a13491cc0c5403634e0e06500d6162de7f3cc9f20\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"d5c0d381-a67c-4a67-ac0a-d8d5fe690779\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"9608d55c1f2b80d30ebe7365dc5c7671ef9154d3ef96c80bef4755b36e919a24\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 0, \"end_char_idx\": 3151, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "ref_doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "chroma:document": "# GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\n\n## Introduction\n\nThis page provides an instruction & guide for developers building a GPT Action for a specific application. Before you proceed, make sure to first familiarize yourself with the following information: \n- [Introduction to GPT Actions](https://platform.openai.com/docs/actions)\n- [Introduction to GPT Actions Library](https://platform.openai.com/docs/actions/actions-library)\n- [Example of Building a GPT Action from Scratch](https://platform.openai.com/docs/actions/getting-started)\n\nThis solution enables a GPT action to answer a user\u2019s question with the context of files the user can access in SharePoint or Office365, using Microsoft\u2019s Graph API [search capabilities](https://learn.microsoft.com/en-us/graph/api/resources/search-api-overview?view=graph-rest-1.0) and the ability to [retrieve files](https://learn.microsoft.com/en-us/graph/api/driveitem-get?view=graph-rest-1.0\\&tabs=http). It uses Azure Functions to process the Graph API response and convert it to a human readable format or structure it in a way ChatGPT understands. This code is meant to be directional, and you should modify it to your requirements.\n\nThis solution uses the ability to[ retrieve files in Actions](https://platform.openai.com/docs/actions/sending-files) and use them as if you had uploaded them directly to a conversation. The Azure Function returns a base64 string that ChatGPT converts into a file. This solution can handle both structured and unstructured data, but does have size volume limitations (see docs [here](https://platform.openai.com/docs/actions/sending-files))\n\n### Value + Example Business Use Cases\n\n**Value**: Users can now leverage ChatGPT's natural language capability to connect directly to files in Sharpeoint\n\n**Example Use Cases**: \n- A user needs to look up which files relate to a certain topic\n- A user needs an answer to a critical question, buried deep in documents\n\n## Architecture / Example\n\n![](../../../images/solution_1.gif)\n\n\nThis solution uses a Node.js Azure Function to, based on the logged in user:\n\n1. Search for a relevant file that the user has access to, based on the user\u2019s initial question.\u00a0\n\n2. For each file that is found, convert it to a base64 string.\n\n3. Format the data in the structure ChatGPT is expecting [here](https://platform.openai.com/docs/actions/sending-files/inline-option).\n\n4. Return that to ChatGPT. The GPT then can use those files as if you had uploaded it to the conversation.\n\n![](../../../images/solution_1_architecture.png)\n\n## Application Information\n\n### Application Key Links\n\nCheck out these links from the application before you get started:\n- Application Website: https://www.microsoft.com/en-us/microsoft-365/sharepoint/collaboration\n- Application API Documentation: https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-rest-reference/\n\n### Application Prerequisites\n\nBefore you get started, make sure you go through the following steps in your application environment:\n- Access to a Sharepoint environment \n- Postman (and knowledge of APIs and OAuth)"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: d5c0d381-a67c-4a67-ac0a-d8d5fe690779
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb", "title": "GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)", "tokens": 4540, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"d5c0d381-a67c-4a67-ac0a-d8d5fe690779\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"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\": \"f8e76820-fce1-4d88-bab9-2784d99832f3\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"44d7328e4b5dce8556b9ba5a13491cc0c5403634e0e06500d6162de7f3cc9f20\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"a62cdc94-00d1-47dd-a992-6ec570ec122f\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"11b6c96af5a58077e72af8ea1e860949b5c1f0cd9e3361319b4ad277fece3e3c\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"df609fa9-8745-404c-9a3d-f6e79f20a6a0\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"34da1156f1121dfd44962762f258e9bbd4c662859a2c3abe2f2e88a259e51727\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 2056, \"end_char_idx\": 5474, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "ref_doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "chroma:document": "This solution uses a Node.js Azure Function to, based on the logged in user:\n\n1. Search for a relevant file that the user has access to, based on the user\u2019s initial question.\u00a0\n\n2. For each file that is found, convert it to a base64 string.\n\n3. Format the data in the structure ChatGPT is expecting [here](https://platform.openai.com/docs/actions/sending-files/inline-option).\n\n4. Return that to ChatGPT. The GPT then can use those files as if you had uploaded it to the conversation.\n\n![](../../../images/solution_1_architecture.png)\n\n## Application Information\n\n### Application Key Links\n\nCheck out these links from the application before you get started:\n- Application Website: https://www.microsoft.com/en-us/microsoft-365/sharepoint/collaboration\n- Application API Documentation: https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-rest-reference/\n\n### Application Prerequisites\n\nBefore you get started, make sure you go through the following steps in your application environment:\n- Access to a Sharepoint environment \n- Postman (and knowledge of APIs and OAuth)\n\n\n## Middleware Information\n\nIf you follow the [search concept files guide](https://learn.microsoft.com/en-us/graph/search-concept-files), the [Microsoft Graph Search API](https://learn.microsoft.com/en-us/graph/search-concept-files) returns references to files that fit the criteria, but not the file contents themselves. Therefore, middleware is required, rather than hitting the MSFT endpoints directly.\n\nWe need to restructure the response from that API so that it matches the expected structure in `openaiFileResponse` outlined [here](https://platform.openai.com/docs/actions/getting-started/inline-option).\n\n### Additional Steps\n\n#### Set up Azure Function\n\n1. Set up an Azure Function using the steps in the [Azure Function cookbook](https://cookbook.openai.com/examples/chatgpt/gpt_actions_library/gpt_middleware_azure_function)\n\n#### Add in Function Code\n\nNow that you have an authenticated Azure Function, we can update the function to search SharePoint / O365\n\n2. Go to your test function and paste in the code from [this file](https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/sharepoint_azure_function/solution_one_file_retrieval.js). Save the function.\n\n> **This code is meant to be directional** - while it should work out of the box, it is designed to be customized to your needs (see examples towards the end of this document).\n\n3. Set up the following env variables by going to the **Configuration** tab on the left under **Settings.** Note that this may be listed directly in **Environment Variables** depending on your Azure UI.\n\n    1. `TENANT_ID`: copied from previous section\n\n    2. `CLIENT_ID`: copied from previous section\n\n4. Go to the **Console** tab under the **Development Tools**\n\n    1. Install the following packages in console\n\n       1. `npm install @microsoft/microsoft-graph-client`\n\n       2. `npm install axios`\n\n5. Once this is complete, try calling the function (POST call) from Postman again, putting the below into body (using a query and search term you think will generate responses).\n\n     ```json\n    {\n        \"searchTerm\": \"<choose a search term>\"\n    }\n    ```\n\n6. If you get a response, you are ready to set this up with a Custom GPT! See the ChatGPT Section of the Azure Function page for more details on setting this up\n\n\n## More Detailed Walkthrough"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: df609fa9-8745-404c-9a3d-f6e79f20a6a0
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb", "title": "GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)", "tokens": 4540, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"df609fa9-8745-404c-9a3d-f6e79f20a6a0\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"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\": \"f8e76820-fce1-4d88-bab9-2784d99832f3\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"44d7328e4b5dce8556b9ba5a13491cc0c5403634e0e06500d6162de7f3cc9f20\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"d5c0d381-a67c-4a67-ac0a-d8d5fe690779\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"f6044fe73cbf6bc4160282038fa3b1189e858d1e80a6c52f07756d1c1450eead\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c7495575-337a-4e4d-aaaf-b13a99388f7c\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"98227c9a5ba660ee865051b4ae2f8386c509d94287b093f95cdacb8180c472e0\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 5446, \"end_char_idx\": 7934, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "ref_doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "chroma:document": "## More Detailed Walkthrough\n\n\nThe below walks through setup instructions and walkthrough unique to this solution. You can find the entire code [here](https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/sharepoint_azure_function/solution_one_file_retrieval.js).\n\n### Code Walkthrough\n\nThe below walks through the different parts of the function. Before you begin, ensure you have the required packages installed and environment variables set up (see the Installation Steps section).\n\n\n#### Implementing the Authentication\u00a0\n\nBelow we have a few helper functions that we\u2019ll use in the function.\n\n\n##### Initializing the Microsoft Graph Client\n\nCreate a function to initialize the Graph client with an access token. This will be used to search through Office 365 and SharePoint.\n\n```javascript\nconst { Client } = require('@microsoft/microsoft-graph-client');\n\nfunction initGraphClient(accessToken) {\n    return Client.init({\n        authProvider: (done) => {\n            done(null, accessToken);\n        }\n    });\n}\n```\n\n##### Obtaining an On-Behalf-Of (OBO) Token\n\nThis function uses an existing bearer token to request an OBO token from Microsoft's identity platform. This enables passing through the credentials to ensure the search only returns files the logged-in user can access.\n\n```javascript\nconst axios = require('axios');\nconst qs = require('querystring');\n\nasync function getOboToken(userAccessToken) {\n\u00a0\u00a0\u00a0\u00a0const { TENANT_ID, CLIENT_ID, MICROSOFT_PROVIDER_AUTHENTICATION_SECRET } = process.env;\n\u00a0\u00a0\u00a0\u00a0const params = {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0client_id: CLIENT_ID,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0client_secret: MICROSOFT_PROVIDER_AUTHENTICATION_SECRET,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0assertion: userAccessToken,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0requested_token_use: 'on_behalf_of',\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0scope: 'https://graph.microsoft.com/.default'\n\u00a0\u00a0\u00a0\u00a0};\n\n\u00a0\u00a0\u00a0\u00a0const url = `https\\://login.microsoftonline.com/${TENANT_ID}/oauth2/v2.0/token`;\n\u00a0\u00a0\u00a0\u00a0try {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const response = await axios.post(url, qs.stringify(params), {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0headers: { 'Content-Type': 'application/x-www-form-urlencoded' }\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0});\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return response.data.access\\_token;\n\u00a0\u00a0\u00a0\u00a0} catch (error) {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0console.error('Error obtaining OBO token:', error.response?.data || error.message);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0throw error;\n\u00a0\u00a0\u00a0\u00a0}\n}\n```\n\n#### Retrieving Content from O365 / SharePoint Items\n\nThis function fetches the content of drive items, converts it to a base64 string, and restructures to match the `openaiFileResponse` format."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: c7495575-337a-4e4d-aaaf-b13a99388f7c
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb", "title": "GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)", "tokens": 4540, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"c7495575-337a-4e4d-aaaf-b13a99388f7c\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"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\": \"f8e76820-fce1-4d88-bab9-2784d99832f3\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"44d7328e4b5dce8556b9ba5a13491cc0c5403634e0e06500d6162de7f3cc9f20\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"df609fa9-8745-404c-9a3d-f6e79f20a6a0\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"f82efdec559fb9467d9c44926942d0f462aaf67983ecddc7b012e428c89797fb\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"31768d71-edab-44e0-85eb-a2fe51e8f0e2\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"4938b5c03c6fa5a7a2c2b52ae6043e6e7fc2daf7327352fc674fde37ce3deabc\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 6240, \"end_char_idx\": 9420, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "ref_doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "chroma:document": "```javascript\nconst { Client } = require('@microsoft/microsoft-graph-client');\n\nfunction initGraphClient(accessToken) {\n    return Client.init({\n        authProvider: (done) => {\n            done(null, accessToken);\n        }\n    });\n}\n```\n\n##### Obtaining an On-Behalf-Of (OBO) Token\n\nThis function uses an existing bearer token to request an OBO token from Microsoft's identity platform. This enables passing through the credentials to ensure the search only returns files the logged-in user can access.\n\n```javascript\nconst axios = require('axios');\nconst qs = require('querystring');\n\nasync function getOboToken(userAccessToken) {\n\u00a0\u00a0\u00a0\u00a0const { TENANT_ID, CLIENT_ID, MICROSOFT_PROVIDER_AUTHENTICATION_SECRET } = process.env;\n\u00a0\u00a0\u00a0\u00a0const params = {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0client_id: CLIENT_ID,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0client_secret: MICROSOFT_PROVIDER_AUTHENTICATION_SECRET,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0assertion: userAccessToken,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0requested_token_use: 'on_behalf_of',\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0scope: 'https://graph.microsoft.com/.default'\n\u00a0\u00a0\u00a0\u00a0};\n\n\u00a0\u00a0\u00a0\u00a0const url = `https\\://login.microsoftonline.com/${TENANT_ID}/oauth2/v2.0/token`;\n\u00a0\u00a0\u00a0\u00a0try {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const response = await axios.post(url, qs.stringify(params), {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0headers: { 'Content-Type': 'application/x-www-form-urlencoded' }\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0});\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return response.data.access\\_token;\n\u00a0\u00a0\u00a0\u00a0} catch (error) {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0console.error('Error obtaining OBO token:', error.response?.data || error.message);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0throw error;\n\u00a0\u00a0\u00a0\u00a0}\n}\n```\n\n#### Retrieving Content from O365 / SharePoint Items\n\nThis function fetches the content of drive items, converts it to a base64 string, and restructures to match the `openaiFileResponse` format.\n```javascript\nconst getDriveItemContent = async (client, driveId, itemId, name) => {\n\u00a0\u00a0\u00a0try\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const filePath = `/drives/${driveId}/items/${itemId}`;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const downloadPath = filePath + `/content`\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0// this is where we get the contents and convert to base64\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const fileStream = await client.api(downloadPath).getStream();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0let chunks = [];\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0for await (let chunk of fileStream) {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0chunks.push(chunk);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const base64String = Buffer.concat(chunks).toString('base64');\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0// this is where we get the other metadata to include in response\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const file = await client.api(filePath).get();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const mime_type = file.file.mimeType;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const name = file.name;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return {\"name\":name, \"mime_type\":mime_type, \"content\":base64String}\n\u00a0\u00a0\u00a0} catch (error) {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0console.error('Error fetching drive content:', error);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0throw new Error(`Failed to fetch content for ${name}: ${error.message}`);\n\u00a0\u00a0\u00a0}\n```\n\n#### Creating the Azure Function to Handle Requests\n\nNow that we have all these helper functions, the Azure Function will orchestrate the flow, by authenticating the user, performing the search, and iterating through the search results to extract the text and retrieve the relevant parts of the text to the GPT.\n\n**Handling HTTP Requests:** The function starts by extracting the query and searchTerm from the HTTP request. It checks if the Authorization header is present and extracts the bearer token."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 31768d71-edab-44e0-85eb-a2fe51e8f0e2
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb", "title": "GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)", "tokens": 4540, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"31768d71-edab-44e0-85eb-a2fe51e8f0e2\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"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\": \"f8e76820-fce1-4d88-bab9-2784d99832f3\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"44d7328e4b5dce8556b9ba5a13491cc0c5403634e0e06500d6162de7f3cc9f20\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"c7495575-337a-4e4d-aaaf-b13a99388f7c\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"a465afd983581991f057bb5bbcf8e257f9891486ccbc58bb8061432724f14130\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"181d2338-73a1-43e4-a200-4216e57ad4c0\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"7db814d396dcc8e6ee55df676c6bb3bd6db91b0492137bfde266e988f624d8bb\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 7935, \"end_char_idx\": 10597, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "ref_doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "chroma:document": "```javascript\nconst getDriveItemContent = async (client, driveId, itemId, name) => {\n\u00a0\u00a0\u00a0try\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const filePath = `/drives/${driveId}/items/${itemId}`;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const downloadPath = filePath + `/content`\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0// this is where we get the contents and convert to base64\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const fileStream = await client.api(downloadPath).getStream();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0let chunks = [];\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0for await (let chunk of fileStream) {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0chunks.push(chunk);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const base64String = Buffer.concat(chunks).toString('base64');\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0// this is where we get the other metadata to include in response\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const file = await client.api(filePath).get();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const mime_type = file.file.mimeType;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const name = file.name;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return {\"name\":name, \"mime_type\":mime_type, \"content\":base64String}\n\u00a0\u00a0\u00a0} catch (error) {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0console.error('Error fetching drive content:', error);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0throw new Error(`Failed to fetch content for ${name}: ${error.message}`);\n\u00a0\u00a0\u00a0}\n```\n\n#### Creating the Azure Function to Handle Requests\n\nNow that we have all these helper functions, the Azure Function will orchestrate the flow, by authenticating the user, performing the search, and iterating through the search results to extract the text and retrieve the relevant parts of the text to the GPT.\n\n**Handling HTTP Requests:** The function starts by extracting the query and searchTerm from the HTTP request. It checks if the Authorization header is present and extracts the bearer token.\n\n**Authentication:** Using the bearer token, it obtains an OBO token from Microsoft's identity platform using getOboToken defined above.\n\n**Initializing the Graph Client:** With the OBO token, it initializes the Microsoft Graph client using initGraphClient defined above.\n\n**Document Search:** It constructs a search query and sends it to the Microsoft Graph API to find documents based on the searchTerm.\n\n**Document Processing**: For each document returned by the search:\n\n- It retrieves the document content using getDriveItemContent.\n\n- It converts the document to base64 string and restructures it to match the `openaiFileResponse` structure.\n\n**Response**: The function sends them back in the HTTP response.\n```javascript\nmodule.exports = async function (context, req) {\n   // const query = req.query.query || (req.body && req.body.query);\n   const searchTerm = req.query.searchTerm || (req.body && req.body.searchTerm);\n   if (!req.headers.authorization) {\n       context.res = {\n           status: 400,\n           body: 'Authorization header is missing'\n       };\n       return;\n   }\n   /// The below takes the token passed to the function, to use to get an OBO token."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 181d2338-73a1-43e4-a200-4216e57ad4c0
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb", "title": "GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)", "tokens": 4540, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"181d2338-73a1-43e4-a200-4216e57ad4c0\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"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\": \"f8e76820-fce1-4d88-bab9-2784d99832f3\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"44d7328e4b5dce8556b9ba5a13491cc0c5403634e0e06500d6162de7f3cc9f20\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"31768d71-edab-44e0-85eb-a2fe51e8f0e2\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"1146db340ffb799d6ea5139bbc43707e228ac9d080ba851b216bad10f6e7344c\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"8629812f-e020-4a28-a63e-b99a2236daed\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"33d7e4d8119d1ad5d98e5b33283c58f314f50b8bab21a98a4d791cb812724687\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 9231, \"end_char_idx\": 11568, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "ref_doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "chroma:document": "**Handling HTTP Requests:** The function starts by extracting the query and searchTerm from the HTTP request. It checks if the Authorization header is present and extracts the bearer token.\n\n**Authentication:** Using the bearer token, it obtains an OBO token from Microsoft's identity platform using getOboToken defined above.\n\n**Initializing the Graph Client:** With the OBO token, it initializes the Microsoft Graph client using initGraphClient defined above.\n\n**Document Search:** It constructs a search query and sends it to the Microsoft Graph API to find documents based on the searchTerm.\n\n**Document Processing**: For each document returned by the search:\n\n- It retrieves the document content using getDriveItemContent.\n\n- It converts the document to base64 string and restructures it to match the `openaiFileResponse` structure.\n\n**Response**: The function sends them back in the HTTP response.\n```javascript\nmodule.exports = async function (context, req) {\n   // const query = req.query.query || (req.body && req.body.query);\n   const searchTerm = req.query.searchTerm || (req.body && req.body.searchTerm);\n   if (!req.headers.authorization) {\n       context.res = {\n           status: 400,\n           body: 'Authorization header is missing'\n       };\n       return;\n   }\n   /// The below takes the token passed to the function, to use to get an OBO token.\n   const bearerToken = req.headers.authorization.split(' ')[1];\n   let accessToken;\n   try {\n       accessToken = await getOboToken(bearerToken);\n   } catch (error) {\n       context.res = {\n           status: 500,\n           body: `Failed to obtain OBO token: ${error.message}`\n       };\n       return;\n   }\n   // Initialize the Graph Client using the initGraphClient function defined above\n   let client = initGraphClient(accessToken);\n   // this is the search body to be used in the Microsft Graph Search API: https://learn.microsoft.com/en-us/graph/search-concept-files\n   const requestBody = {\n       requests: [\n           {\n               entityTypes: ['driveItem'],\n               query: {\n                   queryString: searchTerm\n               },\n               from: 0,\n               // the below is set to summarize the top 10 search results from the Graph API, but can configure based on your documents.\n               size: 10\n           }\n       ]\n   };"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 8629812f-e020-4a28-a63e-b99a2236daed
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb", "title": "GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)", "tokens": 4540, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"8629812f-e020-4a28-a63e-b99a2236daed\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"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\": \"f8e76820-fce1-4d88-bab9-2784d99832f3\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"44d7328e4b5dce8556b9ba5a13491cc0c5403634e0e06500d6162de7f3cc9f20\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"181d2338-73a1-43e4-a200-4216e57ad4c0\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"27a4b0314a22444216322032223f48b34d1240b851918078bf300702442bd8ee\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"8301a6d5-efb4-4a2b-8a1a-4e6fa7953f18\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"d6bc1de29bb1b4e65039297ca5c50478d93fad34849cb001480d93da08a7db9f\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 9694, \"end_char_idx\": 14970, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "ref_doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "chroma:document": "**Document Search:** It constructs a search query and sends it to the Microsoft Graph API to find documents based on the searchTerm.\n\n**Document Processing**: For each document returned by the search:\n\n- It retrieves the document content using getDriveItemContent.\n\n- It converts the document to base64 string and restructures it to match the `openaiFileResponse` structure.\n\n**Response**: The function sends them back in the HTTP response.\n```javascript\nmodule.exports = async function (context, req) {\n   // const query = req.query.query || (req.body && req.body.query);\n   const searchTerm = req.query.searchTerm || (req.body && req.body.searchTerm);\n   if (!req.headers.authorization) {\n       context.res = {\n           status: 400,\n           body: 'Authorization header is missing'\n       };\n       return;\n   }\n   /// The below takes the token passed to the function, to use to get an OBO token.\n   const bearerToken = req.headers.authorization.split(' ')[1];\n   let accessToken;\n   try {\n       accessToken = await getOboToken(bearerToken);\n   } catch (error) {\n       context.res = {\n           status: 500,\n           body: `Failed to obtain OBO token: ${error.message}`\n       };\n       return;\n   }\n   // Initialize the Graph Client using the initGraphClient function defined above\n   let client = initGraphClient(accessToken);\n   // this is the search body to be used in the Microsft Graph Search API: https://learn.microsoft.com/en-us/graph/search-concept-files\n   const requestBody = {\n       requests: [\n           {\n               entityTypes: ['driveItem'],\n               query: {\n                   queryString: searchTerm\n               },\n               from: 0,\n               // the below is set to summarize the top 10 search results from the Graph API, but can configure based on your documents.\n               size: 10\n           }\n       ]\n   };\n\n\n   try {\n       // This is where we are doing the search\n       const list = await client.api('/search/query').post(requestBody);\n       const processList = async () => {\n           // This will go through and for each search response, grab the contents of the file and summarize with gpt-3.5-turbo\n           const results = [];\n           await Promise.all(list.value[0].hitsContainers.map(async (container) => {\n               for (const hit of container.hits) {\n                   if (hit.resource[\"@odata.type\"] === \"#microsoft.graph.driveItem\") {\n                       const { name, id } = hit.resource;\n                       // The below is where the file lives\n                       const driveId = hit.resource.parentReference.driveId;\n                       // we use the helper function we defined above to get the contents, convert to base64, and restructure it\n                       const contents = await getDriveItemContent(client, driveId, id, name);\n                       results.push(contents)\n               }\n           }));\n           return results;\n       };\n       let results;\n       if (list.value[0].hitsContainers[0].total == 0) {\n           // Return no results found to the API if the Microsoft Graph API returns no results\n           results = 'No results found';\n       } else {\n           // If the Microsoft Graph API does return results, then run processList to iterate through.\n           results = await processList();\n           // this is where we structure the response so ChatGPT knows they are files\n           results = {'openaiFileResponse': results}\n       }\n       context.res = {\n           status: 200,\n           body: results\n       };\n   } catch (error) {\n       context.res = {\n           status: 500,\n           body: `Error performing search or processing results: ${error.message}`,\n       };\n   }\n};\n```\n### Customizations\n\nBelow are some potential areas to customize.\u00a0\n\n- You can customize the GPT prompt to search again a certain amount of times if nothing is found.\n\n- You can customize the code to only search through specific SharePoint sites or O365 Drives by customizing the search query. This will help focus the search and improve the retrieval. The function as setup now looks through all files the logged-in user can access.\n\n- You can update the code to only return certain types of files. For example, only return structured data / CSVs.\u00a0\n\n- You can customize the amount of files it searches through within the call to Microsoft Graph. Note that you should only put a maximum of 10 files based on the documentation [here](https://platform.openai.com/docs/actions/getting-started).\u00a0\n\n### Considerations\n\nNote that all the same limitations of Actions apply here, with regards to returning 100K characters or less and the [45 second timeout](https://platform.openai.com/docs/actions/production/timeouts).\n\n- Make sure you read the documentation here around [returning files](https://platform.openai.com/docs/actions/sending-files) and [file uploads](https://help.openai.com/en/articles/8555545-file-uploads-faq), as those limitations apply here.\n\n## ChatGPT Steps\n\n### Custom GPT Instructions \n\nOnce you've created a Custom GPT, copy the text below in the Instructions panel. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 8301a6d5-efb4-4a2b-8a1a-4e6fa7953f18
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb", "title": "GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)", "tokens": 4540, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"8301a6d5-efb4-4a2b-8a1a-4e6fa7953f18\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"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\": \"f8e76820-fce1-4d88-bab9-2784d99832f3\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"44d7328e4b5dce8556b9ba5a13491cc0c5403634e0e06500d6162de7f3cc9f20\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"8629812f-e020-4a28-a63e-b99a2236daed\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"5f90dc8e6e6778ed989f356dba8514c32d855e25e802cc8f0515a561ef55a127\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"22550505-1aee-4654-9a11-79030f5ebc43\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"239ad5ff878a9dde46688b3b0d0a27073511141f13099a810a28471167ce0fec\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 14973, \"end_char_idx\": 18814, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "ref_doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "chroma:document": "```python\nYou are a Q&A helper that helps answer users questions. You have access to a documents repository through your API action. When a user asks a question, you pass in the \"searchTerm\" a single keyword or term you think you should use for the search.\n\n****\n\nScenario 1: There are answers\n\nIf your action returns results, then you take the results from the action and try to answer the users question.\u00a0\n\n****\n\nScenario 2: No results found\n\nIf the response you get from the action is \"No results found\", stop there and let the user know there were no results and that you are going to try a different search term, and explain why. You must always let the user know before conducting another search.\n\nExample:\n\n****\n\nI found no results for \"DEI\". I am now going to try [insert term] because [insert explanation]\n\n****\n\nThen, try a different searchTerm that is similar to the one you tried before, with a single word.\u00a0\n\nTry this three times. After the third time, then let the user know you did not find any relevant documents to answer the question, and to check SharePoint. \nBe sure to be explicit about what you are searching for at each step.\n\n****\n\nIn either scenario, try to answer the user's question. If you cannot answer the user's question based on the knowledge you find, let the user know and ask them to go check the HR Docs in SharePoint.\u00a0\n```\n\n### OpenAPI Schema \n\nOnce you've created a Custom GPT, copy the text below in the Actions panel. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\nThis expects a response that matches the file retrieval structure in our doc [here](https://platform.openai.com/docs/actions/sending-files) and passes in a `searchTerm` parameter to inform the search.\n>Make sure to switch the function app name, function name and code based on link copied in screenshot above\n\n\n```python\nopenapi: 3.1.0\ninfo:\n  title: SharePoint Search API\n  description: API for searching SharePoint documents.\n  version: 1.0.0\nservers:\n  - url: https://{your_function_app_name}.azurewebsites.net/api\n    description: SharePoint Search API server\npaths:\n  /{your_function_name}?code={enter your specific endpoint id here}:\n    post:\n      operationId: searchSharePoint\n      summary: Searches SharePoint for documents matching a query and term.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                searchTerm:\n                  type: string\n                  description: A specific term to search for within the documents.\n      responses:\n        '200':\n          description: A CSV file of query results encoded in base64.\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  openaiFileResponseData:\n                    type: array\n                    items:\n                      type: object\n                      properties:\n                        name:\n                          type: string\n                          description: The name of the file.\n                        mime_type:\n                          type: string\n                          description: The MIME type of the file.\n                        content:\n                          type: string\n                          format: byte\n                          description: The base64 encoded contents of the file.\n        '400':\n          description: Bad request when the SQL query parameter is missing.\n        '413':\n          description: Payload too large if the response exceeds the size limit.\n        '500':\n          description: Server error when there are issues executing the query or encoding the results."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 22550505-1aee-4654-9a11-79030f5ebc43
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb", "title": "GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)", "tokens": 4540, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"22550505-1aee-4654-9a11-79030f5ebc43\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"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\": \"f8e76820-fce1-4d88-bab9-2784d99832f3\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"44d7328e4b5dce8556b9ba5a13491cc0c5403634e0e06500d6162de7f3cc9f20\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"8301a6d5-efb4-4a2b-8a1a-4e6fa7953f18\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"5e234e326775f0b4eb6ab673355c3596e6138b1d72973d3121ddd88d9097b096\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f84c6d94-f492-46d3-a8ee-dee3c0344401\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"b13c8625b9d2d7684307167b38be391b31451b3645dcb08ae4cc7d001b551ee3\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 16896, \"end_char_idx\": 20548, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "ref_doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "chroma:document": "```python\nopenapi: 3.1.0\ninfo:\n  title: SharePoint Search API\n  description: API for searching SharePoint documents.\n  version: 1.0.0\nservers:\n  - url: https://{your_function_app_name}.azurewebsites.net/api\n    description: SharePoint Search API server\npaths:\n  /{your_function_name}?code={enter your specific endpoint id here}:\n    post:\n      operationId: searchSharePoint\n      summary: Searches SharePoint for documents matching a query and term.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                searchTerm:\n                  type: string\n                  description: A specific term to search for within the documents.\n      responses:\n        '200':\n          description: A CSV file of query results encoded in base64.\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  openaiFileResponseData:\n                    type: array\n                    items:\n                      type: object\n                      properties:\n                        name:\n                          type: string\n                          description: The name of the file.\n                        mime_type:\n                          type: string\n                          description: The MIME type of the file.\n                        content:\n                          type: string\n                          format: byte\n                          description: The base64 encoded contents of the file.\n        '400':\n          description: Bad request when the SQL query parameter is missing.\n        '413':\n          description: Payload too large if the response exceeds the size limit.\n        '500':\n          description: Server error when there are issues executing the query or encoding the results.\n```\n\n## Authentication Instructions\n\nBelow are instructions on setting up authentication with this 3rd party application. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n*See above and on the [Azure Function cookbook](https://cookbook.openai.com/examples/chatgpt/gpt_actions_library/gpt_middleware_azure_function) for more detailed instructions on authentication.*\n\n## FAQ & Troubleshooting\n\n- Why are you using the Microsoft Graph API in your code instead of the [SharePoint API](https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service?tabs=csom)?\n\n  - The SharePoint API is legacy - per the Microsoft documentation [here](https://learn.microsoft.com/en-us/sharepoint/dev/apis/sharepoint-rest-graph), \u201cFor SharePoint Online, innovation using a REST API against SharePoint is driven via the Microsoft Graph REST API's.\u201d The Graph API gives us more flexibility, and the SharePoint API still runs into the same file issues listed in the [Why is this necessary instead of interacting with the Microsoft Graph API directly?](#why-is-this-necessary-instead-of-interacting-with-the-microsoft-api-directly) section.\n\n- What types of files does this support?\n\n  It follows the same guidelines as the documentation [here](https://help.openai.com/en/articles/8555545-file-uploads-faq) about file uploads.\u00a0\n\n- Why do I need to request an OBO token?\n\n  - When you try to use the same token to authenticate to the Graph API as the one you use to authenticate into the Azure Function, you get an \u201cinvalid audience\u201d token. This is because the audience for the token can only be user\\_impersonation."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: f84c6d94-f492-46d3-a8ee-dee3c0344401
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb", "title": "GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)", "tokens": 4540, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f84c6d94-f492-46d3-a8ee-dee3c0344401\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"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\": \"f8e76820-fce1-4d88-bab9-2784d99832f3\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"44d7328e4b5dce8556b9ba5a13491cc0c5403634e0e06500d6162de7f3cc9f20\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"22550505-1aee-4654-9a11-79030f5ebc43\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_sharepoint_doc.ipynb\", \"title\": \"GPT Action Library: Sharepoint (Return file for Data Analysis / Document Summarization)\", \"tokens\": 4540, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"5c352afb12ac9c7a7bd437a1fb9c093783ec1a6da223932a34f37a0d63a72db8\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 18705, \"end_char_idx\": 21307, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "ref_doc_id": "f8e76820-fce1-4d88-bab9-2784d99832f3", "chroma:document": "'500':\n          description: Server error when there are issues executing the query or encoding the results.\n```\n\n## Authentication Instructions\n\nBelow are instructions on setting up authentication with this 3rd party application. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n*See above and on the [Azure Function cookbook](https://cookbook.openai.com/examples/chatgpt/gpt_actions_library/gpt_middleware_azure_function) for more detailed instructions on authentication.*\n\n## FAQ & Troubleshooting\n\n- Why are you using the Microsoft Graph API in your code instead of the [SharePoint API](https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service?tabs=csom)?\n\n  - The SharePoint API is legacy - per the Microsoft documentation [here](https://learn.microsoft.com/en-us/sharepoint/dev/apis/sharepoint-rest-graph), \u201cFor SharePoint Online, innovation using a REST API against SharePoint is driven via the Microsoft Graph REST API's.\u201d The Graph API gives us more flexibility, and the SharePoint API still runs into the same file issues listed in the [Why is this necessary instead of interacting with the Microsoft Graph API directly?](#why-is-this-necessary-instead-of-interacting-with-the-microsoft-api-directly) section.\n\n- What types of files does this support?\n\n  It follows the same guidelines as the documentation [here](https://help.openai.com/en/articles/8555545-file-uploads-faq) about file uploads.\u00a0\n\n- Why do I need to request an OBO token?\n\n  - When you try to use the same token to authenticate to the Graph API as the one you use to authenticate into the Azure Function, you get an \u201cinvalid audience\u201d token. This is because the audience for the token can only be user\\_impersonation.\n\n  - To address this, the function requests a new token scoped to Files.Read.All within the app using the [On Behalf Of flow](https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-on-behalf-of-flow). This will inherit the permissions of the logged in user, meaning this function will only search through files the logged-in user has access to.\u00a0\n\n  - We are purposefully requesting a new On Behalf Of token with each request, because Azure Function Apps are meant to be stateless. You could potentially integrate this with Azure Key Vault to store the secret and retrieve programmatically.\u00a0\n\n*Are there integrations that you\u2019d like us to prioritize? Are there errors in our integrations? File a PR or issue in our github, and we\u2019ll take a look.*"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 49e13756-307e-49b0-b9eb-9be6c95b280b
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"49e13756-307e-49b0-b9eb-9be6c95b280b\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"6efb3b20-4ce5-4e05-9a05-7cec3cd5a986\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"bed520f537ed22339b08d0cc0bf67a427e10edf39956af066092607a6b2f047b\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 0, \"end_char_idx\": 2472, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "# GPT Action Library: Notion\n\n## Introduction\n\nThis page provides an instruction & guide for developers building a GPT Action for a specific application. Before you proceed, make sure to first familiarize yourself with the following information: \n- [Introduction to GPT Actions](https://platform.openai.com/docs/actions)\n- [Introduction to GPT Actions Library](https://platform.openai.com/docs/actions/actions-library)\n- [Example of Buliding a GPT Action from Scratch](https://platform.openai.com/docs/actions/getting-started)\n\nThis particular GPT Action provides an overview of how to connect to **Notion**. This Action takes a user\u2019s question, scans the relevant Notion pages using Notions search functionality, and then returns information on the matching pages.\n\n### Value + Example Business Use Cases\n\n**Value**: Users can now harness ChatGPT\u2019s natural language capabilities to directly connect to, query, and synthesize their knowledge within Notion. Administrators can explicitly share pages with the integration to manage access.\n\n**Example Use Cases**: \n- A new employee seeks quick how-to information on setting up a new system\n- A support agent needs to quickly retrieve information from Notion without reading the entire document\n- Users want to synthesize information and create summaries or transformations for use in other aspects of their work\n\n## Application Information\n\n### Application Key Links\n\nCheck out these links from the application before you get started:\n- Application Website: https://www.notion.so/\n- Application API Documentation: https://developers.notion.com/reference/intro\n- Notion Authorization Approach: https://developers.notion.com/docs/authorization\n    - NOTE:  Notion only allows OAuth with \"Public Integrations.\"  Refer to the linked documentation to determine what is best suited for your needs\n\n### Application Prerequisites\n\nBefore you get started, make sure you go through the following steps in your application environment:\n- Set up a notion workspace with populated pages\n- Sharing pages through notion works best with specific Wikis.  Consider organizing your knowledge base into a wiki or set of wikis\n\n## ChatGPT Steps\n\n### Custom GPT Instructions \n\nOnce you've created a Custom GPT, copy the text below in the Instructions panel. Have questions? Check out [Getting Started Example](https://cookbook.openai.com/examples/chatgpt/gpt_actions_library/.gpt_action_getting_started) to see how this step works in more detail."}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 6efb3b20-4ce5-4e05-9a05-7cec3cd5a986
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"6efb3b20-4ce5-4e05-9a05-7cec3cd5a986\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"49e13756-307e-49b0-b9eb-9be6c95b280b\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"37bf860309c5c70c9d67a064d311dc74673d0f94b24da2b3bd6b3eb6eece03a8\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"84ca468d-3b77-47f6-a588-9d3d8a10c78b\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"66c35c790a2904897b0a130b703b058ba22b3189ed11d1b6b253d9606e20d265\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 2475, \"end_char_idx\": 4929, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "```python\n**Context**: You are a helpful chatbot focussed on retrieving information from a company's Notion. An administrator has given you access to a number of useful Notion pages.  You are to act similar to a librarian and be helpful answering and finding answers for users' questions.\n\n**Instructions**:\n1. Use the search functionality to find the most relevant page or pages.\n- Display the top 3 pages.  Include a formatted list containing: Title, Last Edit Date, Author.\n- The Title should be a link to that page.\n1.a. If there are no relevant pages, reword the search and try again (up to 3x)\n1.b. If there are no relevant pages after retries, return \"I'm sorry, I cannot find the right info to help you with that question\"\n2. Open the most relevant article, retrieve and read all of the contents (including any relevant linked pages or databases), and provide a 3 sentence summary.  Always provide a quick summary before moving to the next step.\n3. Ask the user if they'd like to see more detail.  If yes, provide it and offer to explore more relevant pages.\n\n**Additional Notes**: \n- If the user says \"Let's get started\", introduce yourself as a librarian for the Notion workspace, explain that the user can provide a topic or question, and that you will help to look for relevant pages.\n- If there is a database on the page.  Always read the database when looking at page contents.\n```\n\n### OpenAPI Schema \n\nOnce you've created a Custom GPT, copy the text below in the Actions panel. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n\n\n```python\nopenapi: 3.1.0\ninfo:\n  title: Notion API\n  description: API for interacting with Notion's pages, databases, and users.\n  version: 1.0.0\nservers:\n  - url: https://api.notion.com/v1\n    description: Main Notion API server\npaths:\n  /users:\n    get:\n      operationId: listAllUsers\n      summary: List all users\n      parameters:\n        - name: Notion-Version\n          in: header\n          required: true\n          schema:\n            type: string\n          example: 2022-06-28\n          constant: 2022-06-28\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  results:\n                    type: array\n                    items:"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 84ca468d-3b77-47f6-a588-9d3d8a10c78b
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"84ca468d-3b77-47f6-a588-9d3d8a10c78b\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"6efb3b20-4ce5-4e05-9a05-7cec3cd5a986\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"850965786b85a08e0801fffdc30947e7f014a3e74e6de934632d23a755b2977a\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f0a32d17-dcd0-422f-b1f9-7a25d17ac434\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"7fd11e7220967e47e07941fc3e86b83ab60a2b7baabb10474f5a1f759b9b1374\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 4124, \"end_char_idx\": 5528, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "```python\nopenapi: 3.1.0\ninfo:\n  title: Notion API\n  description: API for interacting with Notion's pages, databases, and users.\n  version: 1.0.0\nservers:\n  - url: https://api.notion.com/v1\n    description: Main Notion API server\npaths:\n  /users:\n    get:\n      operationId: listAllUsers\n      summary: List all users\n      parameters:\n        - name: Notion-Version\n          in: header\n          required: true\n          schema:\n            type: string\n          example: 2022-06-28\n          constant: 2022-06-28\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  results:\n                    type: array\n                    items:\n                      type: object\n                      properties:\n                        id:\n                          type: string\n                        name:\n                          type: string\n                        avatar_url:\n                          type: string\n                        type:\n                          type: string\n  /blocks/{block_id}/children:\n    get:\n      operationId: retrieveBlockChildren\n      summary: Retrieve block children\n      parameters:\n        - name: block_id\n          in: path\n          required: true\n          schema:\n            type: string"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: f0a32d17-dcd0-422f-b1f9-7a25d17ac434
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f0a32d17-dcd0-422f-b1f9-7a25d17ac434\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"84ca468d-3b77-47f6-a588-9d3d8a10c78b\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"6a1aca7916c2e3435940988b1d79e0598b938ca3544a3823748289866220966b\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c646ba9e-ded2-4549-b76c-64f09ef65c9b\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"0a6970664a8e48766097d7f807a0e4aad9967e09ef3f65c070b800ea76224340\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 4897, \"end_char_idx\": 6126, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "array\n                    items:\n                      type: object\n                      properties:\n                        id:\n                          type: string\n                        name:\n                          type: string\n                        avatar_url:\n                          type: string\n                        type:\n                          type: string\n  /blocks/{block_id}/children:\n    get:\n      operationId: retrieveBlockChildren\n      summary: Retrieve block children\n      parameters:\n        - name: block_id\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: Notion-Version\n          in: header\n          required: true\n          schema:\n            type: string\n          example: 2022-06-28\n          constant: 2022-06-28\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  object:\n                    type: string\n                  results:\n                    type: array\n                    items:\n                      type: object\n                      properties:"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: c646ba9e-ded2-4549-b76c-64f09ef65c9b
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"c646ba9e-ded2-4549-b76c-64f09ef65c9b\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f0a32d17-dcd0-422f-b1f9-7a25d17ac434\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"1b42342e8cd29a970a7353578b8a1823b2b775994757711b644b238a0c82bc53\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"c5b23eac-f397-4d3b-be1e-5fcb782a2bf8\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"9d46fc19f42da06934cba48f98e89e8eb0c2504757bdef9a96a4ae7a6643de55\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 5481, \"end_char_idx\": 6776, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "true\n          schema:\n            type: string\n        - name: Notion-Version\n          in: header\n          required: true\n          schema:\n            type: string\n          example: 2022-06-28\n          constant: 2022-06-28\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  object:\n                    type: string\n                  results:\n                    type: array\n                    items:\n                      type: object\n                      properties:\n                        id:\n                          type: string\n                        type:\n                          type: string\n                        has_children:\n                          type: boolean\n  /comments:\n    get:\n      operationId: retrieveComments\n      summary: Retrieve comments\n      parameters:\n        - name: Notion-Version\n          in: header\n          required: true\n          schema:\n            type: string\n          example: 2022-06-28\n          constant: 2022-06-28\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: c5b23eac-f397-4d3b-be1e-5fcb782a2bf8
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"c5b23eac-f397-4d3b-be1e-5fcb782a2bf8\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"c646ba9e-ded2-4549-b76c-64f09ef65c9b\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"7d54770284f0643306c710c229b8134f7074df80cdea570eb85454af336c00ad\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f2f33a0b-f806-4812-bad8-d48aeba2324b\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"e729d1d54adc9ff622da4bea315f70f8b5b1827ffc972d1804efe5b540820128\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 6115, \"end_char_idx\": 7281, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "properties:\n                        id:\n                          type: string\n                        type:\n                          type: string\n                        has_children:\n                          type: boolean\n  /comments:\n    get:\n      operationId: retrieveComments\n      summary: Retrieve comments\n      parameters:\n        - name: Notion-Version\n          in: header\n          required: true\n          schema:\n            type: string\n          example: 2022-06-28\n          constant: 2022-06-28\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  results:\n                    type: array\n                    items:\n                      type: object\n                      properties:\n                        id:\n                          type: string\n                        text:\n                          type: string\n                        created_time:\n                          type: string\n                          format: date-time\n                        created_by:"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: f2f33a0b-f806-4812-bad8-d48aeba2324b
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f2f33a0b-f806-4812-bad8-d48aeba2324b\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"c5b23eac-f397-4d3b-be1e-5fcb782a2bf8\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"0711b3976be72728215fcd85f258ad0440770c393060e2ddf6be54b63a36f448\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"bea0882e-aa75-4faa-b366-6ef057e51d69\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"34f4164f26b243fc472db8c714c531040ec82994c30a47648b6d7956f6370d23\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 6737, \"end_char_idx\": 7913, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "application/json:\n              schema:\n                type: object\n                properties:\n                  results:\n                    type: array\n                    items:\n                      type: object\n                      properties:\n                        id:\n                          type: string\n                        text:\n                          type: string\n                        created_time:\n                          type: string\n                          format: date-time\n                        created_by:\n                          type: object\n                          properties:\n                            id:\n                              type: string\n                            name:\n                              type: string\n  /pages/{page_id}/properties/{property_id}:\n    get:\n      operationId: retrievePagePropertyItem\n      summary: Retrieve a page property item\n      parameters:\n        - name: page_id\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: property_id\n          in: path\n          required: true\n          schema:\n            type: string\n        - name:"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: bea0882e-aa75-4faa-b366-6ef057e51d69
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"bea0882e-aa75-4faa-b366-6ef057e51d69\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f2f33a0b-f806-4812-bad8-d48aeba2324b\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"e3a65102601846ce9bf58855a510edd6edcd95245323e846fb1cc495a07c3495\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"88abebac-5bab-4aa0-addf-f4968dc624fd\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"fff3c5057dc2186b344fbbca2ce99c72f6b47070dabf50c2425ff89af1596740\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 7236, \"end_char_idx\": 8477, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "date-time\n                        created_by:\n                          type: object\n                          properties:\n                            id:\n                              type: string\n                            name:\n                              type: string\n  /pages/{page_id}/properties/{property_id}:\n    get:\n      operationId: retrievePagePropertyItem\n      summary: Retrieve a page property item\n      parameters:\n        - name: page_id\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: property_id\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: Notion-Version\n          in: header\n          required: true\n          schema:\n            type: string\n          example: 2022-06-28\n          constant: 2022-06-28\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  id:\n                    type: string\n                  type:\n                    type: string\n                  title:\n                    type: array\n                    items:"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 88abebac-5bab-4aa0-addf-f4968dc624fd
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"88abebac-5bab-4aa0-addf-f4968dc624fd\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"bea0882e-aa75-4faa-b366-6ef057e51d69\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"1900cd3af8048fe324f6d5917fd039caaf35947df77963439625c1433eefa6ef\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"f0a8162c-a947-4a08-8aba-4dc27731de27\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"274f1e73348cc833652d26892a952e58a2c7fada581defb85e8491e70ee367ec\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 7865, \"end_char_idx\": 9096, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "schema:\n            type: string\n        - name: Notion-Version\n          in: header\n          required: true\n          schema:\n            type: string\n          example: 2022-06-28\n          constant: 2022-06-28\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  id:\n                    type: string\n                  type:\n                    type: string\n                  title:\n                    type: array\n                    items:\n                      type: object\n                      properties:\n                        type:\n                          type: string\n                        text:\n                          type: object\n                          properties:\n                            content:\n                              type: string\n  /databases/{database_id}/query:\n    post:\n      operationId: queryDatabase\n      summary: Query a database\n      parameters:\n        - name: database_id\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: Notion-Version\n          in: header"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: f0a8162c-a947-4a08-8aba-4dc27731de27
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"f0a8162c-a947-4a08-8aba-4dc27731de27\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"88abebac-5bab-4aa0-addf-f4968dc624fd\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"3f3a76c34afc6e0e888468ab0e1ad8d0d3a4533d8e56853da040b0d51a9c76e9\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"4c914717-a8dc-4a9a-9764-0241a811264f\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"c64c8a2cc9f3aa924d96188e3245654bdf540d2f6bf98ef17c404e66d497e4b5\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 8471, \"end_char_idx\": 9703, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "items:\n                      type: object\n                      properties:\n                        type:\n                          type: string\n                        text:\n                          type: object\n                          properties:\n                            content:\n                              type: string\n  /databases/{database_id}/query:\n    post:\n      operationId: queryDatabase\n      summary: Query a database\n      parameters:\n        - name: database_id\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: Notion-Version\n          in: header\n          required: true\n          schema:\n            type: string\n          example: 2022-06-28\n          constant: 2022-06-28\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                filter:\n                  type: object\n                sorts:\n                  type: array\n                  items:\n                    type: object\n                start_cursor:\n                  type: string\n                page_size:\n                  type: integer\n      responses:\n        '200':"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 4c914717-a8dc-4a9a-9764-0241a811264f
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"4c914717-a8dc-4a9a-9764-0241a811264f\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"f0a8162c-a947-4a08-8aba-4dc27731de27\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"eedfde6fd21bc29ec1f4655760d4f1e01869792f16e9f634652ed16b2a426bf3\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"e66548f1-a93d-44aa-ab0e-279a8f0488f3\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"9a8f4f221f7a817972f529e9af9e192c4c9774db3fb6545e199bdd5c3e342ad9\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 9053, \"end_char_idx\": 10319, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "- name: Notion-Version\n          in: header\n          required: true\n          schema:\n            type: string\n          example: 2022-06-28\n          constant: 2022-06-28\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                filter:\n                  type: object\n                sorts:\n                  type: array\n                  items:\n                    type: object\n                start_cursor:\n                  type: string\n                page_size:\n                  type: integer\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  object:\n                    type: string\n                  results:\n                    type: array\n                    items:\n                      type: object\n                  next_cursor:\n                    type: string\n                  has_more:\n                    type: boolean\n  /search:\n    post:\n      operationId: search\n      summary: Search\n      parameters:\n        - name: Notion-Version\n          in: header"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: e66548f1-a93d-44aa-ab0e-279a8f0488f3
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"e66548f1-a93d-44aa-ab0e-279a8f0488f3\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"4c914717-a8dc-4a9a-9764-0241a811264f\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ed49bd0ed30bb4c922f2d82443ddf843a8567450e06a5ffa969603448b663146\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"13f92fc3-288f-48cf-b950-acae7e32fb5b\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"0ef1a75cf24aaaf285fd383508bef1c55ec942489b1720ef0f5e5254a18cce3c\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 9658, \"end_char_idx\": 10896, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "type: integer\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  object:\n                    type: string\n                  results:\n                    type: array\n                    items:\n                      type: object\n                  next_cursor:\n                    type: string\n                  has_more:\n                    type: boolean\n  /search:\n    post:\n      operationId: search\n      summary: Search\n      parameters:\n        - name: Notion-Version\n          in: header\n          required: true\n          schema:\n            type: string\n          example: 2022-06-28\n          constant: 2022-06-28\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                query:\n                  type: string\n                filter:\n                  type: object\n                  properties:\n                    value:\n                      type: string\n                    property:\n                      type: string\n                sort:"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: 13f92fc3-288f-48cf-b950-acae7e32fb5b
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"13f92fc3-288f-48cf-b950-acae7e32fb5b\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"e66548f1-a93d-44aa-ab0e-279a8f0488f3\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"32999a538f00ffe456e51c69ab68b8e85e3ac72d9d0d4708dc107b9fef486863\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"b9ea94ee-5082-4271-96b0-5fa7e214c1b7\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"3245172da508a585039745b5a759ca4bd2465c265e408bec8d9fabb234af189e\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 10276, \"end_char_idx\": 11472, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "- name: Notion-Version\n          in: header\n          required: true\n          schema:\n            type: string\n          example: 2022-06-28\n          constant: 2022-06-28\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                query:\n                  type: string\n                filter:\n                  type: object\n                  properties:\n                    value:\n                      type: string\n                    property:\n                      type: string\n                sort:\n                  type: object\n                  properties:\n                    direction:\n                      type: string\n                    timestamp:\n                      type: string\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  object:\n                    type: string\n                  results:\n                    type: array\n                    items:\n                      type: object"}


created_at: 2024-08-26 20:31:29
topic: persistent://default/default/47f0afae-77ee-4e4a-bcd4-0b050f4de62c
id: b9ea94ee-5082-4271-96b0-5fa7e214c1b7
encoding: FLOAT32
metadata:
{"url": "https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb", "title": "GPT Action Library: Notion", "tokens": 2577, "retrieve_doc": true, "source": "openai_cookbooks", "_node_content": "{\"id_\": \"b9ea94ee-5082-4271-96b0-5fa7e214c1b7\", \"embedding\": null, \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"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\": \"aaff4c3f-363a-4c5a-af5e-0b389ce78a0c\", \"node_type\": \"4\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"ae60ddb2fce497ae81bb82ff3e96665499472ec115611458fb760a9186304e58\", \"class_name\": \"RelatedNodeInfo\"}, \"2\": {\"node_id\": \"13f92fc3-288f-48cf-b950-acae7e32fb5b\", \"node_type\": \"1\", \"metadata\": {\"url\": \"https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_notion.ipynb\", \"title\": \"GPT Action Library: Notion\", \"tokens\": 2577, \"retrieve_doc\": true, \"source\": \"openai_cookbooks\"}, \"hash\": \"d33430e7d788c83614ee01cae47a6b6c828055b905afb1328a357b48f6e3b571\", \"class_name\": \"RelatedNodeInfo\"}, \"3\": {\"node_id\": \"17f8c7ce-1c1c-40d4-88a5-88a17351c61a\", \"node_type\": \"1\", \"metadata\": {}, \"hash\": \"5afdf0547b1a660027b54010b5405481ee798e3b9539f8bcc6df3dab6422237a\", \"class_name\": \"RelatedNodeInfo\"}}, \"text\": \"\", \"mimetype\": \"text/plain\", \"start_char_idx\": 10862, \"end_char_idx\": 11918, \"text_template\": \"{metadata_str}\\n\\n{content}\", \"metadata_template\": \"{key}: {value}\", \"metadata_seperator\": \"\\n\", \"class_name\": \"TextNode\"}", "_node_type": "TextNode", "document_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "ref_doc_id": "aaff4c3f-363a-4c5a-af5e-0b389ce78a0c", "chroma:document": "type: string\n                sort:\n                  type: object\n                  properties:\n                    direction:\n                      type: string\n                    timestamp:\n                      type: string\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  object:\n                    type: string\n                  results:\n                    type: array\n                    items:\n                      type: object\n                      properties:\n                        id:\n                          type: string\n                        title:\n                          type: array\n                          items:\n                            type: object\n                            properties:\n                              type:\n                                type: string\n                              text:\n                                type: object"}


