Skip to content

AutoGen 0.4 autogen-openaiext-client client is outdated - No module named 'autogen_core.base' #5077

Open
@sridharratna

Description

What happened?

I am trying to use Gemini and Groq auto completion in the following code.
I have installed the following dependencies

pip install autogen yfinance matplotlib pytz numpy pandas python-dotenv requests bs4 autogen-agentchat autogen-openaiext-client
And code fragment is

`from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_agentchat.ui import Console
from autogen_core.tools import FunctionTool
from autogen_openaiext_client import GeminiChatCompletionClient
import asyncio
#from autogen_ext.models.openai import OpenAIChatCompletionClient

#!pip install yfinance matplotlib pytz numpy pandas python-dotenv requests bs4

api_key = "1049563224239-mof990o87plmj0qqral581f04a7jh9pp.apps.googleusercontent.com"

client = GeminiChatCompletionClient(model="gemini-1.5-flash", api_key=api_key)

`

Getting error as
from autogen_openaiext_client import GeminiChatCompletionClient File "C:\Users\Sridhar\AppData\Local\Programs\Python\Python312\Lib\site-packages\autogen_openaiext_client\__init__.py", line 1, in <module> from autogen_openaiext_client.client import ( File "C:\Users\Sridhar\AppData\Local\Programs\Python\Python312\Lib\site-packages\autogen_openaiext_client\client.py", line 18, in <module> from autogen_core.base import CancellationToken ModuleNotFoundError: No module named 'autogen_core.base'

Checked all dependencies are properly installed

What did you expect to happen?

Supposed execute this standard example code and produce response as per example code

How can we reproduce it (as minimally and precisely as possible)?

Test.txt

Execute the attached code

AutoGen version

0.4

Which package was this bug in

Core

Model used

Gemini

Python version

3.12

Operating system

Windows 11

Any additional info you think would be helpful for fixing this bug

No response

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions