Skip to content

Commit 18fceed

Browse files
author
jinhaiyang
committed
【翻译api】翻译api-test
1 parent e2d7e8a commit 18fceed

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/integration_tests/test_assistant.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def test_translate_api(logging_conf) -> None:
8888
}]
8989
}
9090
],
91-
stream=False,
91+
stream=True,
9292
attachments=None,
9393
metadata=None,
9494
request_id="request_1790291013237211136",
@@ -100,7 +100,9 @@ def test_translate_api(logging_conf) -> None:
100100
}
101101
}
102102
)
103-
print(translate_response)
103+
for chunk in translate_response:
104+
print(chunk.choices[0].delta)
105+
#print(translate_response)
104106
except zhipuai.core._errors.APIRequestFailedError as err:
105107
print(err)
106108
except zhipuai.core._errors.APIInternalError as err:

0 commit comments

Comments
 (0)