{"id":3650,"date":"2025-03-26T09:28:23","date_gmt":"2025-03-26T03:58:23","guid":{"rendered":"https:\/\/www.rangakrish.com\/?p=3650"},"modified":"2025-03-26T09:28:23","modified_gmt":"2025-03-26T03:58:23","slug":"exploring-openai-agent-sdk","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2025\/03\/26\/exploring-openai-agent-sdk\/","title":{"rendered":"Exploring OpenAI Agent SDK"},"content":{"rendered":"<p><em><strong>OpenAI<\/strong><\/em> recently released its open-source <a href=\"https:\/\/openai.github.io\/openai-agents-python\/\" target=\"_blank\" rel=\"noopener\"><em><strong>Agents SDK<\/strong><\/em><\/a>. The documentation looked interesting, so I decided to give it a try.<\/p>\n<p>The SDK supports multiple agents working together using <em><strong>\u201chandoffs\u201d<\/strong><\/em>. The example I am using in today\u2019s article involves 3 agents:<\/p>\n<p style=\"text-align: left; padding-left: 40px;\">1) Agent who specializes in answering questions on <em><strong>Planetary<\/strong><\/em> positions<\/p>\n<p style=\"text-align: left; padding-left: 40px;\">2) Agent who handles everything else<\/p>\n<p style=\"text-align: left; padding-left: 40px;\">3) Agent who routes incoming queries between the above two<\/p>\n<p>I am using the <a href=\"https:\/\/www.kerykeion.net\" target=\"_blank\" rel=\"noopener\"><em><strong>\u201ckerykeion\u201d<\/strong><\/em><\/a>\u00a0Python library for calculating <em><strong>Planetary<\/strong><\/em> positions. In this context, I am taking advantage of the SDK\u2019s support for <em><strong>\u201coutput_type\u201d<\/strong><\/em>, basically a <em><strong>\u201cstructured output\u201d<\/strong><\/em>. See the following code fragment:<\/p>\n<figure id=\"attachment_3651\" aria-describedby=\"caption-attachment-3651\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code1-1.png?ssl=1\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"3651\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2025\/03\/26\/exploring-openai-agent-sdk\/code1-13\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code1-1.png\" data-orig-size=\"1690,684\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Using Structured Output\" data-image-description=\"&lt;p&gt;Using Structured Output&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Using Structured Output&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code1-1-1024x414.png\" class=\"wp-image-3651\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code1-1.png?resize=550%2C223&#038;ssl=1\" alt=\"Using Structured Output\" width=\"550\" height=\"223\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code1-1.png?resize=300%2C121&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code1-1.png?resize=1024%2C414&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code1-1.png?resize=768%2C311&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code1-1.png?resize=1536%2C622&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code1-1.png?w=1690&amp;ssl=1 1690w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-3651\" class=\"wp-caption-text\"><strong>Using Structured Output<\/strong><\/figcaption><\/figure>\n<p>In the above, the class <em><strong>\u201cEphContext\u201d<\/strong><\/em>, derived from <em><strong>Pydantic\u2019s<\/strong> <strong>\u201cBaseModel\u201d<\/strong><\/em>, defines the structure of the output I need in response to any user question on Planet position. I then call the function <em><strong>\u201cget_ephemeris()\u201d<\/strong><\/em> and get the planet position using the passed context.<\/p>\n<p>The three agents I mentioned earlier are shown below:<\/p>\n<figure id=\"attachment_3652\" aria-describedby=\"caption-attachment-3652\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code2-1.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"3652\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2025\/03\/26\/exploring-openai-agent-sdk\/code2-16\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code2-1.png\" data-orig-size=\"1616,868\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Three Agents\" data-image-description=\"&lt;p&gt;Three Agents&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Three Agents&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code2-1-1024x550.png\" class=\"wp-image-3652\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code2-1.png?resize=550%2C295&#038;ssl=1\" alt=\"Three Agents\" width=\"550\" height=\"295\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code2-1.png?resize=300%2C161&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code2-1.png?resize=1024%2C550&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code2-1.png?resize=768%2C413&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code2-1.png?resize=1536%2C825&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code2-1.png?w=1616&amp;ssl=1 1616w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-3652\" class=\"wp-caption-text\"><strong>Three Agents<\/strong><\/figcaption><\/figure>\n<p>The <em><strong>\u201ceph_agent\u201d<\/strong> <\/em>is the <em><strong>Agent<\/strong><\/em> that handles queries on Planet position and bundles the given details into an <em><strong>\u201cEphContext\u201d<\/strong><\/em> object as specified in the <em><strong>\u201coutput_type\u201d<\/strong><\/em> parameter.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>The <em><strong>\u201cmain_agent\u201d<\/strong><\/em> acts as the orchestrating agent, receiving all queries, and then <em><strong>\u201chanding off\u201d<\/strong><\/em> the task to either <em><strong>\u201cother_tasks_agent\u201d<\/strong><\/em> or <em><strong>\u201ceph_agent\u201d<\/strong><\/em>.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>The program runs in a loop, reading user input and then responding accordingly. Here is the code:<\/p>\n<figure id=\"attachment_3653\" aria-describedby=\"caption-attachment-3653\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code3.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"3653\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2025\/03\/26\/exploring-openai-agent-sdk\/code3-8\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code3.png\" data-orig-size=\"1192,686\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Main Program Loop\" data-image-description=\"&lt;p&gt;Main Program Loop&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Main Program Loop&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code3-1024x589.png\" class=\"wp-image-3653\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code3.png?resize=500%2C288&#038;ssl=1\" alt=\"Main Program Loop\" width=\"500\" height=\"288\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code3.png?resize=300%2C173&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code3.png?resize=1024%2C589&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code3.png?resize=768%2C442&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code3.png?w=1192&amp;ssl=1 1192w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-3653\" class=\"wp-caption-text\"><strong>Main Program Loop<\/strong><\/figcaption><\/figure>\n<p>Here is a sample output:<\/p>\n<figure id=\"attachment_3654\" aria-describedby=\"caption-attachment-3654\" style=\"width: 450px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/output-1.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3654\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2025\/03\/26\/exploring-openai-agent-sdk\/output-13\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/output-1.png\" data-orig-size=\"1322,704\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Program Output\" data-image-description=\"&lt;p&gt;Program Output&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Program Output&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/output-1-1024x545.png\" class=\"wp-image-3654\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/output-1.png?resize=450%2C240&#038;ssl=1\" alt=\"Program Output\" width=\"450\" height=\"240\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/output-1.png?resize=300%2C160&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/output-1.png?resize=1024%2C545&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/output-1.png?resize=768%2C409&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/output-1.png?w=1322&amp;ssl=1 1322w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><figcaption id=\"caption-attachment-3654\" class=\"wp-caption-text\"><strong>Program Output<\/strong><\/figcaption><\/figure>\n<p>Overall, the SDK is quite functional. I would have liked it if, in addition to the <em><strong>\u201coutput_type\u201d<\/strong><\/em> parameter passed to the <em><strong>\u201ceph_agent\u201d<\/strong><\/em>, there was an option to also pass my <em><strong>\u201cget_ephemeris()\u201d<\/strong><\/em> function as a <em><strong>\u201ctool\u201d<\/strong><\/em> so that the LLM would automatically pass the synthesized structured output to this function and invoke it. Unfortunately, that is not supported. That is why I have to call the function explicitly in my \u201cmain()\u201d after checking the return type.<\/p>\n<p>That is it for today. Have a great week!<\/p>\n<p>You can download the code <a href=\"https:\/\/www.rangakrish.com\/downloads\/Agent.py\" target=\"_blank\" rel=\"noopener\"><em><strong>here<\/strong><\/em><\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenAI recently released its open-source Agents SDK. The documentation looked interesting, so I decided to give it a try. The SDK supports multiple agents working together using \u201chandoffs\u201d. The example I am using in today\u2019s article involves 3 agents: 1) Agent who specializes in answering questions on Planetary positions 2) Agent who handles everything else [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[388,17,103],"tags":[417,418],"class_list":["post-3650","post","type-post","status-publish","format-standard","hentry","category-openai","category-programming","category-python","tag-agents","tag-openai-agents-sdk"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-WS","jetpack-related-posts":[{"id":3638,"url":"https:\/\/www.rangakrish.com\/index.php\/2025\/03\/12\/getting-started-with-huggingface-smolagents\/","url_meta":{"origin":3650,"position":0},"title":"Getting Started with HuggingFace Smolagents","author":"admin","date":"March 12, 2025","format":false,"excerpt":"Agents and Agent frameworks are hot topics these days. LangChain, crewAI, LangGraph, Microsoft Semantic Kernel, and Microsoft Autogen are some of the popular agent frameworks. Smolagents is a relatively new entry in this arena. It is a lightweight agent framework from the well-known HuggingFace platform. In today\u2019s article, I want\u2026","rel":"","context":"In &quot;Agents&quot;","block_context":{"text":"Agents","link":"https:\/\/www.rangakrish.com\/index.php\/category\/agents\/"},"img":{"alt_text":"Defining Tools","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code1-300x201.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code1-300x201.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/03\/code1-300x201.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3626,"url":"https:\/\/www.rangakrish.com\/index.php\/2025\/02\/21\/using-openai-from-mathematica-part-3\/","url_meta":{"origin":3650,"position":1},"title":"Using OpenAI from Mathematica: Part-3","author":"admin","date":"February 21, 2025","format":false,"excerpt":"Let us continue our discussion on using Mathematica to interact with OpenAI (you may want to go through the earlier article as well). The simplest function to interact with the LLM is LLMSynthesize[]. As you might have guessed, this is a \u201csync\u201d (non-streaming) call. What if you expect a long\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Basic LLMSynthesize","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/02\/fig1-300x21.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/02\/fig1-300x21.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/02\/fig1-300x21.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3614,"url":"https:\/\/www.rangakrish.com\/index.php\/2025\/02\/04\/interacting-with-openai-api-using-golang\/","url_meta":{"origin":3650,"position":2},"title":"Interacting with OpenAI API using Golang","author":"admin","date":"February 4, 2025","format":false,"excerpt":"I normally use Python\u2019s LangChain framework to communicate with OpenAI API. For a change, I wanted to see if Go has any libraries to access OpenAI and other LLMs. Interestingly I found that LangChainGo\u00a0is a port of LangChain for Golang! I decided to implement a simple Completetion request in both\u2026","rel":"","context":"In &quot;Golang&quot;","block_context":{"text":"Golang","link":"https:\/\/www.rangakrish.com\/index.php\/category\/golang\/"},"img":{"alt_text":"Non-streaming Mode","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/02\/code1-300x227.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/02\/code1-300x227.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/02\/code1-300x227.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3599,"url":"https:\/\/www.rangakrish.com\/index.php\/2025\/01\/20\/using-openai-from-allegro-common-lisp\/","url_meta":{"origin":3650,"position":3},"title":"Using OpenAI from Allegro Common Lisp","author":"admin","date":"January 20, 2025","format":false,"excerpt":"Allegro Common Lisp ver 11.0\u00a0introduced support for OpenAI LLMs. In this article, let us look at some of the functions for interacting with OpenAI. First we need to specify basic parameters such as the API key, LLM to use, Temperature, etc. I have defined a convenient function configure-openai to do\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"Configuring the LLM","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/01\/fig1-300x101.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1460,"url":"https:\/\/www.rangakrish.com\/index.php\/2019\/02\/17\/identifying-emotions-from-text\/","url_meta":{"origin":3650,"position":4},"title":"Identifying Emotions from Text","author":"admin","date":"February 17, 2019","format":false,"excerpt":"Identifying the predominant sentiment in unstructured text is used widely these days. There are several REST API services that allow you to submit a piece of text and get back the corresponding sentiment analysis. Meaningcloud, Aylien, Google's Cloud Natural Language API, and\u00a0 IBM Natural Language Understanding\u00a0Service are just a few.\u2026","rel":"","context":"In &quot;Natural Language Processing&quot;","block_context":{"text":"Natural Language Processing","link":"https:\/\/www.rangakrish.com\/index.php\/category\/natural-language-processing\/"},"img":{"alt_text":"Program to Dump Emotions","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/02\/Code.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/02\/Code.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/02\/Code.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3381,"url":"https:\/\/www.rangakrish.com\/index.php\/2024\/05\/20\/using-openai-from-mathematica\/","url_meta":{"origin":3650,"position":5},"title":"Using OpenAI from Mathematica","author":"admin","date":"May 20, 2024","format":false,"excerpt":"Mathematica was among the first to integrate with OpenAI. The functionality is nicely exposed in terms of a few pre-defined functions. Let us explore some of the functionality in today\u2019s article. The simplest way to get started is to use LLMSynthesize\u00a0function: It can take a few seconds before you get\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"LLMSynthesize Function","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/05\/Example1-300x27.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/05\/Example1-300x27.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/05\/Example1-300x27.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/3650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/comments?post=3650"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/3650\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=3650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=3650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=3650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}