Skip to content

Commit

Permalink
Support CharacterGLM
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzhhui committed Jun 6, 2024
1 parent b22cdb2 commit bb0a901
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Api/Chatglm/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function chat(
array $stop = [],
array $tools = [],
bool $stream = false,
array $meta = [],
): ChatCompletionResponse {
$messagesArr = [];
foreach ($messages as $message) {
Expand All @@ -65,6 +66,9 @@ public function chat(
'model' => $model,
'temperature' => $temperature,
];
if ($meta) {
$json['meta'] = $meta;
}
if ($maxTokens) {
$json['max_tokens'] = $maxTokens;
}
Expand Down

0 comments on commit bb0a901

Please sign in to comment.