<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shaurya Tiwari</title>
    <description>The latest articles on DEV Community by Shaurya Tiwari (@shazam6565).</description>
    <link>https://dev.to/shazam6565</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2736260%2Ffab611a1-e285-4ce7-82d0-bb4eb40f57ac.jpeg</url>
      <title>DEV Community: Shaurya Tiwari</title>
      <link>https://dev.to/shazam6565</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shazam6565"/>
    <language>en</language>
    <item>
      <title>Help me with this setup hurrdle please, I have tried the conventional upgrade commands and even opaenai upgrade with migrate.</title>
      <dc:creator>Shaurya Tiwari</dc:creator>
      <pubDate>Mon, 20 Jan 2025 03:06:53 +0000</pubDate>
      <link>https://dev.to/shazam6565/help-me-with-this-setup-hurrdle-please-i-have-tried-the-conventional-upgrade-commands-and-even-474</link>
      <guid>https://dev.to/shazam6565/help-me-with-this-setup-hurrdle-please-i-have-tried-the-conventional-upgrade-commands-and-even-474</guid>
      <description>&lt;p&gt;APIRemovedInV1                            Traceback (most recent call last)&lt;br&gt;
Cell In[5], line 1&lt;br&gt;
----&amp;gt; 1 get_completion("What is 1+1?")&lt;/p&gt;

&lt;p&gt;Cell In[3], line 3&lt;br&gt;
      1 def get_completion(prompt, model="gpt-3.5-turbo"):&lt;br&gt;
      2     messages = [{"role": "user", "content": prompt}]&lt;br&gt;
----&amp;gt; 3     response = openai.ChatCompletion.create(&lt;br&gt;
      4         model=model,&lt;br&gt;
      5         messages=messages,&lt;br&gt;
      6         temperature=0, &lt;br&gt;
      7     )&lt;br&gt;
      8     return response.choices[0].message["content"]&lt;/p&gt;

&lt;p&gt;File ~/Desktop/AI_agents/agents/lib/python3.11/site-packages/openai/lib/&lt;em&gt;old_api.py:39, in APIRemovedInV1Proxy.&lt;/em&gt;&lt;em&gt;call&lt;/em&gt;&lt;em&gt;(self, &lt;em&gt;_args, *&lt;/em&gt;_kwargs)&lt;br&gt;
     38 def __call&lt;/em&gt;_(self, &lt;em&gt;_args: Any, *&lt;/em&gt;_kwargs: Any) -&amp;gt; Any:&lt;br&gt;
---&amp;gt; 39     raise APIRemovedInV1(symbol=self._symbol)&lt;/p&gt;

&lt;p&gt;APIRemovedInV1: &lt;/p&gt;

&lt;p&gt;You tried to access openai.ChatCompletion, but this is no longer supported in openai&amp;gt;=1.0.0 - see the README at &lt;a href="https://github.com/openai/openai-python" rel="noopener noreferrer"&gt;https://github.com/openai/openai-python&lt;/a&gt; for the API.&lt;/p&gt;

&lt;p&gt;You can run &lt;code&gt;openai migrate&lt;/code&gt; to automatically upgrade your codebase to use the 1.0.0 interface. &lt;/p&gt;

&lt;p&gt;Alternatively, you can pin your installation to the old version, e.g. &lt;code&gt;pip install openai==0.28&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;A detailed migration guide is available here: &lt;a href="https://github.com/openai/openai-python/discussions/742" rel="noopener noreferrer"&gt;https://github.com/openai/openai-python/discussions/742&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>openai</category>
      <category>langchain</category>
    </item>
  </channel>
</rss>
