Skip to content

Commit 48d504d

Browse files
authored
Merge pull request #61 from MetaGLM/feature/jsonformat-1118
【jsonformat】支持jsonformat
2 parents 9bfb486 + eac1f1c commit 48d504d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

zhipuai/api_resource/chat/completions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def create(
4747
extra_headers: Headers | None = None,
4848
extra_body: Body | None = None,
4949
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
50+
response_format : object | None = None
5051
) -> Completion | StreamResponse[ChatCompletionChunk]:
5152
logger.debug(f"temperature:{temperature}, top_p:{top_p}")
5253
if temperature is not None and temperature != NOT_GIVEN:
@@ -90,6 +91,7 @@ def create(
9091
"tool_choice": tool_choice,
9192
"meta": meta,
9293
"extra": maybe_transform(extra, code_geex_params.CodeGeexExtra),
94+
"response_format": response_format
9395
})
9496
return self._post(
9597
"/chat/completions",

0 commit comments

Comments
 (0)