Skip to content

Commit 906299c

Browse files
authored
fix: remove unused options from ZhiPu model (#3669)
Auto-cherry-pick to 1.0.x Fixes #3669 Signed-off-by: YunKui Lu <luyunkui95@gmail.com>
1 parent 53f8f17 commit 906299c

File tree

3 files changed

+0
-25
lines changed

3 files changed

+0
-25
lines changed

models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiChatModel.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -568,16 +568,6 @@ else if (mediaContentData instanceof String text) {
568568
}
569569
}
570570

571-
private ChatOptions buildRequestOptions(ZhiPuAiApi.ChatCompletionRequest request) {
572-
return ChatOptions.builder()
573-
.model(request.model())
574-
.maxTokens(request.maxTokens())
575-
.stopSequences(request.stop())
576-
.temperature(request.temperature())
577-
.topP(request.topP())
578-
.build();
579-
}
580-
581571
public void setObservationConvention(ChatModelObservationConvention observationConvention) {
582572
this.observationConvention = observationConvention;
583573
}

models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiChatOptions.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ public class ZhiPuAiChatOptions implements ToolCallingChatOptions {
7878
* provide a list of functions the model may generate JSON inputs for.
7979
*/
8080
private @JsonProperty("tools") List<ZhiPuAiApi.FunctionTool> tools;
81-
82-
private @JsonProperty("tools1") List<ZhiPuAiApi.Foo> foos;
83-
8481
/**
8582
* Controls which (if any) function is called by the model. none means the model will not call a
8683
* function and instead generates a message. auto means the model can pick between generating a message or calling a

models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/api/ZhiPuAiApi.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -314,18 +314,6 @@ public String getValue() {
314314
}
315315
}
316316

317-
public class Foo {
318-
319-
String foo;
320-
321-
public Foo() {
322-
323-
}
324-
public Foo(String foo) {
325-
this.foo = foo;
326-
}
327-
}
328-
329317

330318
/**
331319
* Represents a tool the model may call. Currently, only functions are supported as a tool.

0 commit comments

Comments
 (0)