ChatGPT Assistant Integration (API version v1)

ChatGPT Assistant Integration

What is a ChatGPT Assistant?

A ChatGPT assistant is an artificial intelligence model developed by OpenAI. It's designed to generate human-like text based on the input it's given. GPT stands for "Generative Pretrained Transformer", which is a type of language processing AI model. The model has been trained on a diverse range of internet text, but it doesn't know specific documents or sources it was trained on. It's a tool that can be used for a variety of tasks, such as drafting emails, writing code, creating written content, answering questions, tutoring, translating languages, simulating characters for video games, and much more.

Example Assistant Integrations in this Flow

Create Assistant: This flow creates a new assistant. It starts with an inject node that sets the assistant's name, instructions, tools, and model. The HTTP request node then sends a POST request to the OpenAI API to create the assistant. The assistant's ID is stored in the flow context for later use.

List Assistants: This flow lists all the assistants that have been created. It starts with an inject node that triggers the flow. The HTTP request node sends a GET request to the OpenAI API to retrieve the list of assistants. The results are then displayed in the debug node.

Delete Assistant: This flow deletes an assistant. It starts with an inject node that sets the assistant's ID. The template node constructs the URL for the HTTP request node, which sends a DELETE request to the OpenAI API to delete the assistant. The results are then displayed in the debug node.

Adjust Assistant Instructions and Models: This flow adjusts the instructions and model of an assistant. It starts with an inject node that sets the assistant's ID, new instructions, and new model. The change node prepares the payload for the HTTP request node, which sends a POST request to the OpenAI API to update the assistant. The results are then displayed in the debug node.

Create Thread and Run: This flow creates a new thread and runs it. It starts with an inject node that sets the assistant's ID and the message to be sent. The subflow node then handles the creation of the thread, sending of the message, and retrieval of the response. The results are then displayed in the debug node.

Please note that you need to provide your OpenAI API key in each of the HTTP request nodes for these flows to work.

ChatGPT Assistant API Documentation

[{"id":"18231139adb8c392","type":"comment","z":"d6806d6af8278d8b","name":"API Key","info":"You will have to get an API key from OpenAI \nand enter in each of the http requests nodes ","x":880,"y":80,"wires":[]},{"id":"a467ecb63b254f57","type":"group","z":"d6806d6af8278d8b","name":"List Assistants","style":{"label":true},"nodes":["ce8acaff298be0de","3a8a33224c376d4d","ba5edf680a4b81f7"],"x":174,"y":259,"w":532,"h":82},{"id":"ce8acaff298be0de","type":"inject","z":"d6806d6af8278d8b","g":"a467ecb63b254f57","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":280,"y":300,"wires":[["3a8a33224c376d4d"]]},{"id":"3a8a33224c376d4d","type":"http request","z":"d6806d6af8278d8b","g":"a467ecb63b254f57","name":"G /v1/assistants","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.openai.com/v1/assistants","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[{"keyType":"Content-Type","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"Accept","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"other","keyValue":"OpenAI-Beta","valueType":"other","valueValue":"assistants=v1"}],"x":440,"y":300,"wires":[["ba5edf680a4b81f7"]]},{"id":"ba5edf680a4b81f7","type":"debug","z":"d6806d6af8278d8b","g":"a467ecb63b254f57","name":"debug 24","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":600,"y":300,"wires":[]},{"id":"e4a78a28c5908e1a","type":"group","z":"d6806d6af8278d8b","name":"Create Assistant","style":{"label":true},"nodes":["b92c9d87d49b295b","08c85555e6770b29","b044351163082088","868590b221743995","d908d3004e358b58"],"x":174,"y":159,"w":912,"h":82},{"id":"b92c9d87d49b295b","type":"http request","z":"d6806d6af8278d8b","g":"e4a78a28c5908e1a","name":"P /v1/assistants","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://api.openai.com/v1/assistants","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[{"keyType":"Content-Type","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"Accept","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"other","keyValue":"OpenAI-Beta","valueType":"other","valueValue":"assistants=v1"}],"x":600,"y":200,"wires":[["08c85555e6770b29"]]},{"id":"08c85555e6770b29","type":"change","z":"d6806d6af8278d8b","g":"e4a78a28c5908e1a","name":"","rules":[{"t":"set","p":"assistant_id","pt":"flow","to":"payload.id","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":200,"wires":[["b044351163082088"]]},{"id":"b044351163082088","type":"debug","z":"d6806d6af8278d8b","g":"e4a78a28c5908e1a","name":"debug 23","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":980,"y":200,"wires":[]},{"id":"868590b221743995","type":"change","z":"d6806d6af8278d8b","g":"e4a78a28c5908e1a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"payload.instructions","pt":"msg","to":"instructions","tot":"msg"},{"t":"set","p":"payload.name","pt":"msg","to":"name","tot":"msg"},{"t":"set","p":"payload.tools","pt":"msg","to":"[{\"type\": \"code_interpreter\"}]","tot":"json"},{"t":"set","p":"payload.model","pt":"msg","to":"model","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":200,"wires":[["b92c9d87d49b295b"]]},{"id":"d908d3004e358b58","type":"inject","z":"d6806d6af8278d8b","g":"e4a78a28c5908e1a","name":"","props":[{"p":"instructions","v":"You are a personal math tutor. When asked a question, write and run Python code to answer the question.","vt":"str"},{"p":"name","v":"Math Tutor 2","vt":"str"},{"p":"tools","v":"[{\"type\": \"code_interpreter\"}]","vt":"json"},{"p":"model","v":"gpt-4","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":270,"y":200,"wires":[["868590b221743995"]]},{"id":"f72221f3027eb85d","type":"group","z":"d6806d6af8278d8b","name":"Delete Assistant","style":{"label":true},"nodes":["9e08bb503ee68f98","48cef23cd5b24ae5","a1f98c834e3a7cce","20babcdb1b3f1a45"],"x":174,"y":359,"w":772,"h":82},{"id":"9e08bb503ee68f98","type":"inject","z":"d6806d6af8278d8b","g":"f72221f3027eb85d","name":"","props":[{"p":"assistant_id","v":"asst_xMsqqPTsgssO3SXgRsmdrYJx","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":270,"y":400,"wires":[["20babcdb1b3f1a45"]]},{"id":"48cef23cd5b24ae5","type":"http request","z":"d6806d6af8278d8b","g":"f72221f3027eb85d","name":"Delete /v1/assistants/{assistant_id}","method":"DELETE","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[{"keyType":"Content-Type","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"Accept","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"other","keyValue":"OpenAI-Beta","valueType":"other","valueValue":"assistants=v1"}],"x":620,"y":400,"wires":[["a1f98c834e3a7cce"]]},{"id":"a1f98c834e3a7cce","type":"debug","z":"d6806d6af8278d8b","g":"f72221f3027eb85d","name":"debug 25","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":840,"y":400,"wires":[]},{"id":"20babcdb1b3f1a45","type":"template","z":"d6806d6af8278d8b","g":"f72221f3027eb85d","name":"","field":"url","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"https://api.openai.com/v1/assistants/{{assistant_id}}","output":"str","x":400,"y":400,"wires":[["48cef23cd5b24ae5"]]},{"id":"afd75a0c387a2495","type":"group","z":"d6806d6af8278d8b","name":"Create Thread and Run ","style":{"label":true},"nodes":["3db1e7a083fb85fe","4760427e297e7cd6","6cfec667b7117e6f"],"x":174,"y":559,"w":572,"h":82},{"id":"c67b9cc1d861cdbf","type":"subflow","name":"Subflow 2","info":"","in":[{"x":560,"y":240,"wires":[{"id":"6eb7df2eeeab06a7"}]}],"out":[{"x":1660,"y":780,"wires":[{"id":"f3330fc281544259","port":0}]}],"status":{"x":1660,"y":400,"wires":[{"id":"91d73f7b0a6e6008","port":0},{"id":"770bb187b096a1b3","port":0},{"id":"b05e12cb2729af52","port":0},{"id":"120d5ed2846e721d","port":0},{"id":"60fa27bda3c48bec","port":0},{"id":"38a90d6290c0cf80","port":0}]}},{"id":"6eb7df2eeeab06a7","type":"http request","z":"c67b9cc1d861cdbf","g":"e4516372d4eb7b49","name":"P v1/threads","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://api.openai.com/v1/threads","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[{"keyType":"Content-Type","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"Accept","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"other","keyValue":"OpenAI-Beta","valueType":"other","valueValue":"assistants=v1"}],"x":790,"y":240,"wires":[["674cce04775beeda"]]},{"id":"b46a01eb6293830d","type":"http request","z":"c67b9cc1d861cdbf","g":"bef73895f43aa857","name":"P v1/threads/thread_id/messages","method":"POST","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[{"keyType":"Content-Type","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"Accept","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"other","keyValue":"OpenAI-Beta","valueType":"other","valueValue":"assistants=v1"}],"x":940,"y":360,"wires":[["770bb187b096a1b3","22678cb717e870e3"]]},{"id":"6ce2dcb77d02a8f7","type":"template","z":"c67b9cc1d861cdbf","g":"bef73895f43aa857","name":"","field":"url","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"https://api.openai.com/v1/threads/{{payload.id}}/messages","output":"str","x":400,"y":360,"wires":[["67a63a0a97eb15b6"]]},{"id":"0760c23c2d39bb30","type":"string","z":"c67b9cc1d861cdbf","g":"bef73895f43aa857","name":"","methods":[{"name":"decodeHTMLEntities","params":[]}],"prop":"payload.content","propout":"payload.content","object":"msg","objectout":"msg","x":730,"y":360,"wires":[["b46a01eb6293830d"]]},{"id":"bf852c5c298ac429","type":"http request","z":"c67b9cc1d861cdbf","g":"0d752b795c40d617","name":"G v1/threads/thread_id/runs","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[{"keyType":"Content-Type","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"Accept","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"other","keyValue":"OpenAI-Beta","valueType":"other","valueValue":"assistants=v1"}],"x":460,"y":480,"wires":[["ecde1eba42e4f6e2"]]},{"id":"cc2aa6929302b2a2","type":"template","z":"c67b9cc1d861cdbf","g":"0d752b795c40d617","name":"","field":"url","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"https://api.openai.com/v1/threads/{{thread}}/runs","output":"str","x":240,"y":480,"wires":[["bf852c5c298ac429"]]},{"id":"674cce04775beeda","type":"change","z":"c67b9cc1d861cdbf","g":"e4516372d4eb7b49","name":"","rules":[{"t":"set","p":"thread","pt":"msg","to":"payload.id","tot":"msg"},{"t":"set","p":"assistant","pt":"msg","to":"assistant_id","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":240,"wires":[["91d73f7b0a6e6008","01818dc70a295263"]]},{"id":"bbe24f48643f8777","type":"http request","z":"c67b9cc1d861cdbf","g":"0d752b795c40d617","name":"P /v1/threads/{thread_id}/runs","method":"POST","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[{"keyType":"Content-Type","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"Accept","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"other","keyValue":"OpenAI-Beta","valueType":"other","valueValue":"assistants=v1"}],"x":950,"y":480,"wires":[["83ae1099e23c0a08","b05e12cb2729af52"]]},{"id":"b7b9ed88dfec1bcf","type":"http request","z":"c67b9cc1d861cdbf","g":"e038a90c5e31e217","name":"G  /v1/threads/{thread_ID}/runs/{run_id}","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[{"keyType":"Content-Type","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"Accept","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"other","keyValue":"OpenAI-Beta","valueType":"other","valueValue":"assistants=v1"}],"x":810,"y":660,"wires":[["700ee122747c81ae"]]},{"id":"700ee122747c81ae","type":"switch","z":"c67b9cc1d861cdbf","g":"e038a90c5e31e217","name":"","property":"payload.status","propertyType":"msg","rules":[{"t":"eq","v":"in_progress","vt":"str"},{"t":"eq","v":"completed","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":1030,"y":660,"wires":[["e5676280d77d712c","60fa27bda3c48bec"],["9710ac9e37b4a232"],["38a90d6290c0cf80"]]},{"id":"e5676280d77d712c","type":"delay","z":"c67b9cc1d861cdbf","g":"e038a90c5e31e217","name":"Random Timer","pauseType":"random","timeout":"4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"2","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":920,"y":600,"wires":[["b7b9ed88dfec1bcf"]]},{"id":"83ae1099e23c0a08","type":"template","z":"c67b9cc1d861cdbf","g":"e038a90c5e31e217","name":"","field":"url","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"https://api.openai.com/v1/threads/{{thread}}/runs/{{payload.id}}","output":"str","x":580,"y":660,"wires":[["b7b9ed88dfec1bcf"]]},{"id":"f3330fc281544259","type":"http request","z":"c67b9cc1d861cdbf","g":"5ff9aba947e50aeb","name":"G /v1/threads/{thread_id}/messages","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[{"keyType":"Content-Type","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"Accept","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"other","keyValue":"OpenAI-Beta","valueType":"other","valueValue":"assistants=v1"}],"x":940,"y":780,"wires":[["120d5ed2846e721d"]]},{"id":"9710ac9e37b4a232","type":"template","z":"c67b9cc1d861cdbf","g":"5ff9aba947e50aeb","name":"","field":"url","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"https://api.openai.com/v1/threads/{{thread}}/messages","output":"str","x":720,"y":780,"wires":[["f3330fc281544259"]]},{"id":"91d73f7b0a6e6008","type":"change","z":"c67b9cc1d861cdbf","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Create Thread","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1380,"y":260,"wires":[[]]},{"id":"770bb187b096a1b3","type":"change","z":"c67b9cc1d861cdbf","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Passed Message","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1380,"y":360,"wires":[[]]},{"id":"b05e12cb2729af52","type":"change","z":"c67b9cc1d861cdbf","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Run","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1380,"y":460,"wires":[[]]},{"id":"120d5ed2846e721d","type":"change","z":"c67b9cc1d861cdbf","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Done","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1380,"y":740,"wires":[[]]},{"id":"60fa27bda3c48bec","type":"change","z":"c67b9cc1d861cdbf","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Waiting for Result","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1380,"y":580,"wires":[[]]},{"id":"67a63a0a97eb15b6","type":"change","z":"c67b9cc1d861cdbf","g":"bef73895f43aa857","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"payload.role","pt":"msg","to":"user","tot":"str"},{"t":"set","p":"payload.content","pt":"msg","to":"message","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":360,"wires":[["0760c23c2d39bb30"]]},{"id":"ecde1eba42e4f6e2","type":"change","z":"c67b9cc1d861cdbf","g":"0d752b795c40d617","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"payload.assistant_id","pt":"msg","to":"assistant","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":480,"wires":[["bbe24f48643f8777"]]},{"id":"38a90d6290c0cf80","type":"change","z":"c67b9cc1d861cdbf","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Error","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1380,"y":660,"wires":[[]]},{"id":"67a914a7e48af706","type":"comment","z":"c67b9cc1d861cdbf","name":"API Key","info":"You will have to get an API key from OpenAI \nand enter in each of the http requests nodes ","x":960,"y":80,"wires":[]},{"id":"01818dc70a295263","type":"junction","z":"c67b9cc1d861cdbf","x":120,"y":360,"wires":[["6ce2dcb77d02a8f7"]]},{"id":"22678cb717e870e3","type":"junction","z":"c67b9cc1d861cdbf","x":120,"y":440,"wires":[["cc2aa6929302b2a2"]]},{"id":"e4516372d4eb7b49","type":"group","z":"c67b9cc1d861cdbf","name":"Create Thread","style":{"label":true},"nodes":["6eb7df2eeeab06a7","674cce04775beeda"],"x":694,"y":199,"w":412,"h":82},{"id":"bef73895f43aa857","type":"group","z":"c67b9cc1d861cdbf","name":"Create Message","style":{"label":true},"nodes":["b46a01eb6293830d","6ce2dcb77d02a8f7","0760c23c2d39bb30","67a63a0a97eb15b6"],"x":314,"y":319,"w":792,"h":82},{"id":"0d752b795c40d617","type":"group","z":"c67b9cc1d861cdbf","name":"List Runs and Starts Runs","style":{"label":true},"nodes":["bf852c5c298ac429","cc2aa6929302b2a2","bbe24f48643f8777","ecde1eba42e4f6e2"],"x":154,"y":439,"w":952,"h":82},{"id":"e038a90c5e31e217","type":"group","z":"c67b9cc1d861cdbf","name":"Check for Results","style":{"label":true},"nodes":["b7b9ed88dfec1bcf","700ee122747c81ae","e5676280d77d712c","83ae1099e23c0a08"],"x":494,"y":559,"w":612,"h":149.5},{"id":"5ff9aba947e50aeb","type":"group","z":"c67b9cc1d861cdbf","name":"Show Results","style":{"label":true},"nodes":["f3330fc281544259","9710ac9e37b4a232"],"x":634,"y":739,"w":472,"h":82},{"id":"3db1e7a083fb85fe","type":"inject","z":"d6806d6af8278d8b","g":"afd75a0c387a2495","name":"","props":[{"p":"message","v":"Do you like Cheese?","vt":"str"},{"p":"assistant_id","v":"asst_dzyhO8BZ04bDEznqoZHaAule","vt":"str"},{"p":"instructions","v":"Can you provide me with additonal info?","vt":"str"},{"p":"model","v":"gpt-4","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":270,"y":600,"wires":[["4760427e297e7cd6"]]},{"id":"4760427e297e7cd6","type":"subflow:c67b9cc1d861cdbf","z":"d6806d6af8278d8b","g":"afd75a0c387a2495","name":"Call Chat GPT Assistant","x":450,"y":600,"wires":[["6cfec667b7117e6f"]]},{"id":"6cfec667b7117e6f","type":"debug","z":"d6806d6af8278d8b","g":"afd75a0c387a2495","name":"debug 21","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":640,"y":600,"wires":[]},{"id":"dcc8a10a55054250","type":"group","z":"d6806d6af8278d8b","name":"Adjust Assistant Instructions and Models","style":{"label":true},"nodes":["b43e4e1fb64dc573","6cf649a2fafc2a71","58d6754ad54c3a5c","3a2879f5fc93d63c","3e990a0f8a7f9e27"],"x":174,"y":459,"w":1052,"h":82},{"id":"b43e4e1fb64dc573","type":"http request","z":"d6806d6af8278d8b","g":"dcc8a10a55054250","name":"P https://api.openai.com/v1/assistants/{assistant_id}","method":"POST","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[{"keyType":"Content-Type","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"Accept","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"other","keyValue":"OpenAI-Beta","valueType":"other","valueValue":"assistants=v1"}],"x":850,"y":500,"wires":[["3a2879f5fc93d63c"]]},{"id":"6cf649a2fafc2a71","type":"template","z":"d6806d6af8278d8b","g":"dcc8a10a55054250","name":"","field":"url","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"https://api.openai.com/v1/assistants/{{assistant}}","output":"str","x":580,"y":500,"wires":[["b43e4e1fb64dc573"]]},{"id":"58d6754ad54c3a5c","type":"inject","z":"d6806d6af8278d8b","g":"dcc8a10a55054250","name":"","props":[{"p":"instructions","v":"This is a potatoe 2","vt":"str"},{"p":"model","v":"gpt-3.5-turbo","vt":"str"},{"p":"assistant","v":"asst_C1ZsUViEPIp6ymXSTdfGJQ66","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":270,"y":500,"wires":[["3e990a0f8a7f9e27"]]},{"id":"3a2879f5fc93d63c","type":"debug","z":"d6806d6af8278d8b","g":"dcc8a10a55054250","name":"debug 26","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1120,"y":500,"wires":[]},{"id":"3e990a0f8a7f9e27","type":"change","z":"d6806d6af8278d8b","g":"dcc8a10a55054250","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"payload.instructions","pt":"msg","to":"instructions","tot":"msg"},{"t":"set","p":"payload.model","pt":"msg","to":"model","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":500,"wires":[["6cf649a2fafc2a71"]]}]

Flow Info

Created 6 months, 1 week ago
Rating: 5 3

Owner

Actions

Rate:

Node Types

Core
  • change (x12)
  • comment (x2)
  • debug (x5)
  • delay (x1)
  • http request (x10)
  • inject (x5)
  • switch (x1)
  • template (x6)
Other
  • group (x10)
  • junction (x2)
  • string (x1)
  • subflow (x1)
  • subflow:c67b9cc1d861cdbf (x1)

Tags

  • chatgpt
  • flowfuse
  • openai
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option