{"id":374,"date":"2023-11-25T06:27:43","date_gmt":"2023-11-25T04:27:43","guid":{"rendered":"https:\/\/celilsemi.erkiner.com\/blog\/?p=374"},"modified":"2023-12-02T04:24:30","modified_gmt":"2023-12-02T02:24:30","slug":"guide-start-your-journey-with-openais-new-assistants-api","status":"publish","type":"post","link":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/","title":{"rendered":"Guide: Start Your Journey with OpenAI&#8217;s New Assistants API"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Welcome to the exciting world of OpenAI&#8217;s recently <a href=\"https:\/\/celilsemi.erkiner.com\/blog\/openai-devday-2023-pioneering-the-new-ai-landscape\/\" target=\"_blank\" rel=\"noopener\" title=\"OpenAI DevDay 2023: Pioneering the New AI Landscape\">announced<\/a> Assistants API. This groundbreaking API allows developers to create intelligent and conversational assistants that can understand and respond to human language. Whether you&#8217;re an experienced developer or a curious beginner, this hello world project is perfect for anyone who wants to dive into the capabilities of the Assistants API and it&#8217;s time to explore the possibilities to change how we interact with Open AI API. Let&#8217;s get started!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Essential Resources:<\/p>\n\n\n\n<ul class=\"has-small-font-size wp-block-list\">\n<li>NodeJS<\/li>\n\n\n\n<li>OpenAI npm version 4.16.1 or later (installable via <code>npm install openai<\/code>)<\/li>\n\n\n\n<li>dotenv npm (installable via <code>npm install dotenv<\/code>)<\/li>\n\n\n\n<li>An active OpenAPI key<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">I highly recommend delving into the <a href=\"https:\/\/platform.openai.com\/docs\/assistants\/overview\" target=\"_blank\" rel=\"noopener\" title=\"OpenAI Assistants API documentation\">OpenAI Assistants API documentation<\/a> because this documentation introduces several new and crucial concepts that are fundamental to understanding and effectively utilizing the API.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step-by-Step Coding Guide:<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">1. Start by creating a \u201c.env\u201d file. <\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">In this file, you need to include your specific OpenAI API key, which you can obtain from your OpenAI developer account. Format it as follows: <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text\/javascript&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}\">OPENAI_API_KEY=&quot;YOUR OPENAI API KEY&quot;<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">2. Next, create a script file.<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">For instance, create <code>mathAssistant.js<\/code> and insert the following NodeJS code into this file:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text\/javascript&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}\">\/\/ Import the required dependencies\nrequire(&quot;dotenv&quot;).config();\nconst OpenAI = require(&quot;openai&quot;);\n\n\/\/ Create an OpenAI connection with the API key from the environment variables \nconst openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });\n\n\/\/ Define an asynchronous function to prompt the user for input\nasync function askQuestion(question) { \n    process.stdout.write(question);\n    return new Promise((resolve) =&gt; {\n        process.stdin.once('data', data =&gt; resolve(data.toString().trim()));\n    });\n}\n\n\/\/ Define the main asynchronous function\nasync function main() { \n    try { \n        \/\/ Print the first greeting for User\n        process.stdout.write(&quot;\\nAssistant: Hello there, I'm your personal math tutor assistant.\\n&quot;);\n\n        \/\/ Create a new AI assistant instance using the OpenAI API\n        const assistant = await openai.beta.assistants.create({\n            name: &quot;Math Tutor&quot;,\n            instructions: &quot;You are a personal math tutor. Answer math questions.&quot;,\n            model: &quot;gpt-3.5-turbo-1106&quot;,\n        });\n\n        \/\/ Create a new conversation thread for interacting with the assistant\n        const thread = await openai.beta.threads.create(); \n\n        \/\/ Enter a loop to continue asking questions as long as the flag is true\n        let keepAsking = true;\n        while (keepAsking) {\n            \/\/ Prompt the user to input a question\n            const userQuestion = await askQuestion(&quot;\\nAssistant: What is your question?\\n\\nYou: &quot;);\n\n            \/\/ Print the assistant's thinking message\n            process.stdout.write(`\\nAssistant: Thinking...\\n`);\n\n            \/\/ Add the user's question to the conversation thread\n            await openai.beta.threads.messages.create(thread.id, { \n                role: &quot;user&quot;,\n                content: userQuestion,\n            });\n\n            \/\/ Initiate a run to get the assistant's response\n            const run = await openai.beta.threads.runs.create(thread.id, { \n                assistant_id: assistant.id,\n            });\n\n            \/\/ Use a polling mechanism to check if the run is completed\n            let runStatus;\n            do  { \n                await new Promise((resolve) =&gt; setTimeout(resolve, 2000));\n                runStatus = await openai.beta.threads.runs.retrieve(thread.id, run.id);\n            } while (runStatus.status !== &quot;completed&quot;)\n\n            \/\/ Retrieve the list of messages in the conversation thread\n            const messages = await openai.beta.threads.messages.list(thread.id); \n\n            \/\/ Filter and reverse the messages to get the assistant's response from the current run\n            const assistantMessages = messages.data \n                .filter(\n                    (message) =&gt; message.run_id === run.id &amp;&amp; message.role === &quot;assistant&quot;\n                ).reverse();\n\n            \/\/ Remove assistant's thinking message\n            process.stdout.moveCursor(0, -2);\n            process.stdout.clearLine(1);\n\n            \/\/ Loop through the assistant messages and print them\n            assistantMessages.forEach(assistantMessage =&gt; {\n                process.stdout.write(`\\nAssistant: ${assistantMessage.content[0].text.value}\\n`);\n            });\n\n            \/\/ Then ask if the user wants to ask another question\n            const continueAsking = await askQuestion(&quot;\\nAssistant: Do you want to ask another question? (yes\/no)\\n\\nYou: &quot;);\n            keepAsking = continueAsking.toLowerCase() === &quot;yes&quot;;\n\n            \/\/ Display an ending message if the user does not want to ask another question\n            if (!keepAsking) {\n                process.stdout.write(&quot;\\nAssistant: Thanks, I hope you learned something!\\n\\n\\n&quot;);\n            }\n        }\n\n        process.exit();\n    } catch (error) { \n        \/\/ Catch any potential errors thrown within the try block\n        console.error(error);\n    }\n}\n\n\/\/ Call the main function\nmain(); <\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This code, although put together swiftly and explained briefly in the comments, serves as a solid foundation. It has potential for enhancements, particularly in the polling mechanism, which is a crucial aspect of such interactive applications.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3. Executing Your Code:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">To run your script, open your terminal, navigate to the directory where your files are, and execute the <code>mathAssistant.js<\/code> file using the command:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text\/javascript&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}\">node mathAssistant.js<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">4. Recap<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">This is the result:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"500\" src=\"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3-1024x500.png\" alt=\"\" class=\"wp-image-379\" srcset=\"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3-1024x500.png 1024w, https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3-300x146.png 300w, https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3-768x375.png 768w, https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3-1536x749.png 1536w, https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3-2048x999.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To recap, this JavaScript code sets up a communication interface with the OpenAI service to create an AI assistant for answering math questions. Here&#8217;s a breakdown of the code:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Dependencies<\/strong>: The <code>dotenv<\/code> and <code>openai<\/code> packages are imported to manage environment variables and interact with the OpenAI API.<\/li>\n\n\n\n<li><strong>OpenAI Connection<\/strong>: An instance of the OpenAI client is created with the API key retrieved from the environment variables.<\/li>\n\n\n\n<li><strong>Asynchronous User Input<\/strong>: An asynchronous function <code>askQuestion<\/code> is defined to prompt the user for input. It uses <code>process.stdin.once<\/code> to capture the user&#8217;s response.<\/li>\n\n\n\n<li><strong>Main Function<\/strong>: The <code>main<\/code> function is defined as the entry point. It starts by greeting the user and then creates an AI assistant instance using the OpenAI API.<\/li>\n\n\n\n<li><strong>Conversation Thread<\/strong>: A new conversation thread is created for interacting with the AI assistant.<\/li>\n\n\n\n<li><strong>Asking Questions Loop<\/strong>: Inside a loop, the user is prompted to input a question, and the assistant&#8217;s thinking message is displayed. The user&#8217;s question is added to the conversation thread, and a run is initiated to get the assistant&#8217;s response.<\/li>\n\n\n\n<li><strong>Polling Mechanism<\/strong>: The code uses a polling mechanism to check if the run is completed before retrieving the assistant&#8217;s response.<\/li>\n\n\n\n<li><strong>Display Assistant&#8217;s Response<\/strong>: The assistant&#8217;s responses are filtered, reversed, and printed to the console.<\/li>\n\n\n\n<li><strong>User Interaction<\/strong>: After each interaction, the user is asked if they want to ask another question. The loop continues until the user indicates they do not want to ask another question.<\/li>\n\n\n\n<li><strong>Error Handling<\/strong>: Any errors that occur within the <code>try<\/code> block are caught and logged to the console.<\/li>\n\n\n\n<li><strong>Function Invocation<\/strong>: Finally, the <code>main<\/code> function is called to start the interaction with the AI assistant.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The code demonstrates an interactive session where the user can ask math-related questions, and the AI assistant provides answers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Whether you&#8217;re an experienced developer or a curious beginner, this hello world example is perfect for anyone who wants to dive into the capabilities of the Assistants API. <\/p>\n","protected":false},"author":1,"featured_media":379,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[54,8],"tags":[],"class_list":["post-374","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-back-end"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"Whether you&#039;re an experienced developer or a curious beginner, this hello world example is perfect for anyone who wants to dive into the capabilities of the Assistants API.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Celilsemi Sam Erkiner\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Celilsemi Sam Erkiner - Blog\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Guide: Start Your Journey with OpenAI\u2019s New Assistants API\" \/>\n\t\t<meta property=\"og:description\" content=\"Whether you&#039;re an experienced developer or a curious beginner, this hello world example is perfect for anyone who wants to dive into the capabilities of the Assistants API.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"2402\" \/>\n\t\t<meta property=\"og:image:height\" content=\"1172\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-11-25T04:27:43+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-12-02T02:24:30+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Guide: Start Your Journey with OpenAI\u2019s New Assistants API\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Whether you&#039;re an experienced developer or a curious beginner, this hello world example is perfect for anyone who wants to dive into the capabilities of the Assistants API.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/#blogposting\",\"name\":\"Guide: Start Your Journey with OpenAI\\u2019s New Assistants API\",\"headline\":\"Guide: Start Your Journey with OpenAI&#8217;s New Assistants API\",\"author\":{\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/author\\\/cerkiner\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/image-3.png\",\"width\":2402,\"height\":1172},\"datePublished\":\"2023-11-25T06:27:43+02:00\",\"dateModified\":\"2023-12-02T04:24:30+02:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/#webpage\"},\"articleSection\":\"AI Engineering, Back End Engineering\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/category\\\/engineering\\\/#listItem\",\"name\":\"Engineering\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/category\\\/engineering\\\/#listItem\",\"position\":2,\"name\":\"Engineering\",\"item\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/category\\\/engineering\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/category\\\/engineering\\\/software\\\/#listItem\",\"name\":\"Software Engineering\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/category\\\/engineering\\\/software\\\/#listItem\",\"position\":3,\"name\":\"Software Engineering\",\"item\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/category\\\/engineering\\\/software\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/category\\\/engineering\\\/software\\\/back-end\\\/#listItem\",\"name\":\"Back End Engineering\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/category\\\/engineering\\\/#listItem\",\"name\":\"Engineering\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/category\\\/engineering\\\/software\\\/back-end\\\/#listItem\",\"position\":4,\"name\":\"Back End Engineering\",\"item\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/category\\\/engineering\\\/software\\\/back-end\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/#listItem\",\"name\":\"Guide: Start Your Journey with OpenAI&#8217;s New Assistants API\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/category\\\/engineering\\\/software\\\/#listItem\",\"name\":\"Software Engineering\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/#listItem\",\"position\":5,\"name\":\"Guide: Start Your Journey with OpenAI&#8217;s New Assistants API\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/category\\\/engineering\\\/software\\\/back-end\\\/#listItem\",\"name\":\"Back End Engineering\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/#organization\",\"name\":\"Celilsemi Sam Erkiner\",\"description\":\"Blog\",\"url\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/appicon.png\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/#organizationLogo\",\"width\":1024,\"height\":1024,\"caption\":\"Icon of Celilsemi Sam Erkiner\"},\"image\":{\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/author\\\/cerkiner\\\/#author\",\"url\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/author\\\/cerkiner\\\/\",\"name\":\"Celilsemi Sam Erkiner\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/#authorImage\",\"url\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/0c0a56fe50d80138ca959da76bd58688.jpg?ver=1793310866\",\"width\":96,\"height\":96,\"caption\":\"Celilsemi Sam Erkiner\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/#webpage\",\"url\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/\",\"name\":\"Guide: Start Your Journey with OpenAI\\u2019s New Assistants API\",\"description\":\"Whether you're an experienced developer or a curious beginner, this hello world example is perfect for anyone who wants to dive into the capabilities of the Assistants API.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/author\\\/cerkiner\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/author\\\/cerkiner\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/image-3.png\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/#mainImage\",\"width\":2402,\"height\":1172},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/guide-start-your-journey-with-openais-new-assistants-api\\\/#mainImage\"},\"datePublished\":\"2023-11-25T06:27:43+02:00\",\"dateModified\":\"2023-12-02T04:24:30+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/\",\"name\":\"Celilsemi Sam Erkiner\",\"description\":\"Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/celilsemi.erkiner.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Guide: Start Your Journey with OpenAI\u2019s New Assistants API","description":"Whether you're an experienced developer or a curious beginner, this hello world example is perfect for anyone who wants to dive into the capabilities of the Assistants API.","canonical_url":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/#blogposting","name":"Guide: Start Your Journey with OpenAI\u2019s New Assistants API","headline":"Guide: Start Your Journey with OpenAI&#8217;s New Assistants API","author":{"@id":"https:\/\/celilsemi.erkiner.com\/blog\/author\/cerkiner\/#author"},"publisher":{"@id":"https:\/\/celilsemi.erkiner.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3.png","width":2402,"height":1172},"datePublished":"2023-11-25T06:27:43+02:00","dateModified":"2023-12-02T04:24:30+02:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/#webpage"},"isPartOf":{"@id":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/#webpage"},"articleSection":"AI Engineering, Back End Engineering"},{"@type":"BreadcrumbList","@id":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/celilsemi.erkiner.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/celilsemi.erkiner.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/#listItem","name":"Engineering"}},{"@type":"ListItem","@id":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/#listItem","position":2,"name":"Engineering","item":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/","nextItem":{"@type":"ListItem","@id":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/software\/#listItem","name":"Software Engineering"},"previousItem":{"@type":"ListItem","@id":"https:\/\/celilsemi.erkiner.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/software\/#listItem","position":3,"name":"Software Engineering","item":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/software\/","nextItem":{"@type":"ListItem","@id":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/software\/back-end\/#listItem","name":"Back End Engineering"},"previousItem":{"@type":"ListItem","@id":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/#listItem","name":"Engineering"}},{"@type":"ListItem","@id":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/software\/back-end\/#listItem","position":4,"name":"Back End Engineering","item":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/software\/back-end\/","nextItem":{"@type":"ListItem","@id":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/#listItem","name":"Guide: Start Your Journey with OpenAI&#8217;s New Assistants API"},"previousItem":{"@type":"ListItem","@id":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/software\/#listItem","name":"Software Engineering"}},{"@type":"ListItem","@id":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/#listItem","position":5,"name":"Guide: Start Your Journey with OpenAI&#8217;s New Assistants API","previousItem":{"@type":"ListItem","@id":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/software\/back-end\/#listItem","name":"Back End Engineering"}}]},{"@type":"Organization","@id":"https:\/\/celilsemi.erkiner.com\/blog\/#organization","name":"Celilsemi Sam Erkiner","description":"Blog","url":"https:\/\/celilsemi.erkiner.com\/blog\/","logo":{"@type":"ImageObject","url":"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2020\/05\/appicon.png","@id":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/#organizationLogo","width":1024,"height":1024,"caption":"Icon of Celilsemi Sam Erkiner"},"image":{"@id":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/celilsemi.erkiner.com\/blog\/author\/cerkiner\/#author","url":"https:\/\/celilsemi.erkiner.com\/blog\/author\/cerkiner\/","name":"Celilsemi Sam Erkiner","image":{"@type":"ImageObject","@id":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/#authorImage","url":"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/litespeed\/avatar\/0c0a56fe50d80138ca959da76bd58688.jpg?ver=1793310866","width":96,"height":96,"caption":"Celilsemi Sam Erkiner"}},{"@type":"WebPage","@id":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/#webpage","url":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/","name":"Guide: Start Your Journey with OpenAI\u2019s New Assistants API","description":"Whether you're an experienced developer or a curious beginner, this hello world example is perfect for anyone who wants to dive into the capabilities of the Assistants API.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/celilsemi.erkiner.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/#breadcrumblist"},"author":{"@id":"https:\/\/celilsemi.erkiner.com\/blog\/author\/cerkiner\/#author"},"creator":{"@id":"https:\/\/celilsemi.erkiner.com\/blog\/author\/cerkiner\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3.png","@id":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/#mainImage","width":2402,"height":1172},"primaryImageOfPage":{"@id":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/#mainImage"},"datePublished":"2023-11-25T06:27:43+02:00","dateModified":"2023-12-02T04:24:30+02:00"},{"@type":"WebSite","@id":"https:\/\/celilsemi.erkiner.com\/blog\/#website","url":"https:\/\/celilsemi.erkiner.com\/blog\/","name":"Celilsemi Sam Erkiner","description":"Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/celilsemi.erkiner.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Celilsemi Sam Erkiner - Blog","og:type":"article","og:title":"Guide: Start Your Journey with OpenAI\u2019s New Assistants API","og:description":"Whether you're an experienced developer or a curious beginner, this hello world example is perfect for anyone who wants to dive into the capabilities of the Assistants API.","og:url":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/","og:image":"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3.png","og:image:secure_url":"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3.png","og:image:width":2402,"og:image:height":1172,"article:published_time":"2023-11-25T04:27:43+00:00","article:modified_time":"2023-12-02T02:24:30+00:00","twitter:card":"summary_large_image","twitter:title":"Guide: Start Your Journey with OpenAI\u2019s New Assistants API","twitter:description":"Whether you're an experienced developer or a curious beginner, this hello world example is perfect for anyone who wants to dive into the capabilities of the Assistants API.","twitter:image":"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2023\/11\/image-3.png"},"aioseo_meta_data":{"post_id":"374","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-11-24 23:35:36","updated":"2025-07-29 07:19:21","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/celilsemi.erkiner.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/\" title=\"Engineering\">Engineering<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/software\/\" title=\"Software Engineering\">Software Engineering<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/software\/back-end\/\" title=\"Back End Engineering\">Back End Engineering<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tGuide: Start Your Journey with OpenAI\u2019s New Assistants API\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/celilsemi.erkiner.com\/blog\/"},{"label":"Engineering","link":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/"},{"label":"Software Engineering","link":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/software\/"},{"label":"Back End Engineering","link":"https:\/\/celilsemi.erkiner.com\/blog\/category\/engineering\/software\/back-end\/"},{"label":"Guide: Start Your Journey with OpenAI&#8217;s New Assistants API","link":"https:\/\/celilsemi.erkiner.com\/blog\/guide-start-your-journey-with-openais-new-assistants-api\/"}],"_links":{"self":[{"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts\/374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/comments?post=374"}],"version-history":[{"count":7,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts\/374\/revisions"}],"predecessor-version":[{"id":387,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts\/374\/revisions\/387"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/media\/379"}],"wp:attachment":[{"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/media?parent=374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/categories?post=374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/tags?post=374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}