Skip to content

Commit

Permalink
### 1.10.3
Browse files Browse the repository at this point in the history
- Fixed Bug:Fixed a bug where CreateChatCompletionRequest, CreateRunRequest, and CreateThreadAndRunRequest could not be
  properly requested when tools were not provided.
  • Loading branch information
WhiteMagic2014 committed Jun 7, 2024
1 parent fc78d39 commit 85eb424
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 22 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ new CreateChatCompletionRequest()

## Version

### 1.10.3

- Fixed Bug:Fixed a bug where CreateChatCompletionRequest, CreateRunRequest, and CreateThreadAndRunRequest could not be
properly requested when tools were not provided.

### 1.10.2

- Update: Changelog [Jun 6th, 2024](https://platform.openai.com/docs/changelog/jun-6th-2024)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<url>https://github.com/WhiteMagic2014/gpt-magic.git</url>
<groupId>io.github.whitemagic2014</groupId>
<artifactId>gpt-magic</artifactId>
<version>1.10.2</version>
<version>1.10.3</version>

<developers>
<developer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,13 @@ protected String sendHook() {
}
if (tools != null && !tools.isEmpty()) {
param.put("tools", tools);
if (toolChoice != null) {
param.put("tool_choice", toolChoice);
}
if (toolChoiceTemp != null) {
param.put("tool_choice", toolChoiceTemp);
}
param.put("parallel_tool_calls", parallelToolCalls);
}
if (metadata != null && !metadata.isEmpty()) {
param.put("metadata", metadata);
Expand All @@ -384,13 +391,6 @@ protected String sendHook() {
if (truncationStrategy != null) {
param.put("truncation_strategy", truncationStrategy);
}
if (toolChoice != null) {
param.put("tool_choice", toolChoice);
}
if (toolChoiceTemp != null) {
param.put("tool_choice", toolChoiceTemp);
}
param.put("parallel_tool_calls", parallelToolCalls);
if (responseFormat.equals("auto")) {
param.put("response_format", responseFormat);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,13 @@ protected String sendHook() {
}
if (tools != null && !tools.isEmpty()) {
param.put("tools", tools);
if (toolChoice != null) {
param.put("tool_choice", toolChoice);
}
if (toolChoiceTemp != null) {
param.put("tool_choice", toolChoiceTemp);
}
param.put("parallel_tool_calls", parallelToolCalls);
}
if (toolResources != null) {
param.put("tool_resources", toolResources);
Expand All @@ -405,13 +412,6 @@ protected String sendHook() {
if (truncationStrategy != null) {
param.put("truncation_strategy", truncationStrategy);
}
if (toolChoice != null) {
param.put("tool_choice", toolChoice);
}
if (toolChoiceTemp != null) {
param.put("tool_choice", toolChoiceTemp);
}
param.put("parallel_tool_calls", parallelToolCalls);
if (responseFormat.equals("auto")) {
param.put("response_format", responseFormat);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,14 @@ protected String sendHook() {
}
if (tools != null && !tools.isEmpty()) {
param.put("tools", tools);
if (toolChoice != null) {
param.put("tool_choice", toolChoice);
}
if (toolChoiceTemp != null) {
param.put("tool_choice", toolChoiceTemp);
}
param.put("parallel_tool_calls", parallelToolCalls);
}
if (toolChoice != null) {
param.put("tool_choice", toolChoice);
}
if (toolChoiceTemp != null) {
param.put("tool_choice", toolChoiceTemp);
}
param.put("parallel_tool_calls", parallelToolCalls);
if (user != null) {
param.put("user", user);
}
Expand Down

0 comments on commit 85eb424

Please sign in to comment.