Skip to content

Commit

Permalink
remove checking response.status_code (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
qbc2016 authored Mar 15, 2024
1 parent 1d4c6f9 commit c46a091
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/agentscope/models/openai_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,6 @@ def __call__(
**kwargs,
)

if response.status_code != 200:
raise RuntimeError(response.json())

# step4: record the api invocation if needed
self._save_model_invocation(
arguments={
Expand Down Expand Up @@ -312,9 +309,6 @@ def __call__(
)
raise e

if response.status_code != 200:
raise RuntimeError(response.json())

# step3: record the model api invocation if needed
self._save_model_invocation(
arguments={
Expand Down Expand Up @@ -399,9 +393,6 @@ def __call__(
**kwargs,
)

if response.status_code != 200:
raise RuntimeError(response.json())

# step3: record the model api invocation if needed
self._save_model_invocation(
arguments={
Expand Down

0 comments on commit c46a091

Please sign in to comment.