You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: interpreter/core/respond.py
+23-6Lines changed: 23 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -118,14 +118,31 @@ def respond(interpreter):
118
118
and ("exceeded"instr(e).lower() or
119
119
"insufficient_quota"instr(e).lower())
120
120
):
121
-
display_markdown_message(
122
-
f""" > You ran out of current quota for OpenAI's API, please check your plan and billing details. You can either wait for the quota to reset or upgrade your plan.
121
+
model=getattr(interpreter.llm, "model", "") or""
122
+
# Derive provider name from model prefix (e.g. "groq/llama3" → "Groq")
123
+
if"/"inmodel:
124
+
provider=model.split("/")[0].title()
125
+
ifprovider.lower() =="openai":
126
+
provider="OpenAI"
127
+
else:
128
+
provider="OpenAI"
123
129
124
-
To check your current usage and billing details, visit the [OpenAI billing page](https://platform.openai.com/settings/organization/billing/overview).
130
+
ifprovider=="OpenAI":
131
+
display_markdown_message(
132
+
f""" > You ran out of current quota for OpenAI's API, please check your plan and billing details. You can either wait for the quota to reset or upgrade your plan.
125
133
126
-
You can also use `interpreter --max_budget [higher USD amount]` to set a budget for your sessions.
127
-
"""
128
-
)
134
+
To check your current usage and billing details, visit the [OpenAI billing page](https://platform.openai.com/settings/organization/billing/overview).
135
+
136
+
You can also use `interpreter --max_budget [higher USD amount]` to set a budget for your sessions.
137
+
"""
138
+
)
139
+
else:
140
+
display_markdown_message(
141
+
f""" > You have exceeded your quota for {provider}'s API. Please check your plan and billing details with {provider}, or wait for the quota to reset.
142
+
143
+
You can also use `interpreter --max_budget [higher USD amount]` to set a budget for your sessions.
144
+
"""
145
+
)
129
146
130
147
elif (
131
148
interpreter.offline==Falseand"not have access"instr(e).lower()
0 commit comments