Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'NoneType' object has no attribute 'prompt_tokens' #1579

Closed
Compstudent opened this issue Feb 7, 2024 · 2 comments · Fixed by #1599
Closed

'NoneType' object has no attribute 'prompt_tokens' #1579

Compstudent opened this issue Feb 7, 2024 · 2 comments · Fixed by #1599

Comments

@Compstudent
Copy link

Compstudent commented Feb 7, 2024

Describe the bug

Their a problem with Autogen with OperRouter. 'NoneType' object has no attribute 'prompt_tokens'
config_list = [
{
"model": "cognitivecomputations/dolphin-mixtral-8x7b",
"api_key": "Key",
"base_url": "https://openrouter.ai/api/v1",
}

AutoGen Version: v0.2.11

Steps to reproduce

config_list = [
{
"model": "cognitivecomputations/dolphin-mixtral-8x7b",
"api_key": "Key",
"base_url": "https://openrouter.ai/api/v1",
}

Expected Behavior

no error

Screenshots and logs

openrouter

Additional Information

No response

@Compstudent Compstudent added the bug label Feb 7, 2024
@sonichi
Copy link
Contributor

sonichi commented Feb 7, 2024

@olgavrou could you take a look at this? Or find someone who can?

@olgavrou
Copy link
Member

olgavrou commented Feb 8, 2024

this seems to be an incompatibility with OpenAI's chat completion object see here, and openrouter's see here I'll add a check to the code to check for usage being available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants