Skip to content

Commit

Permalink
feature 1.1.6 Assistant支持流式输出
Browse files Browse the repository at this point in the history
  • Loading branch information
guorutao committed May 7, 2024
1 parent 82eed9f commit cfa4400
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
19 changes: 14 additions & 5 deletions src/main/java/com/unfbx/chatgpt/entity/assistant/Assistant.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,24 @@ public class Assistant implements Serializable {
*/
@JsonProperty("tool_resources")
private ToolResources toolResources;
/**
* 附加到该助手的文件 ID 列表。助手最多可以附加 20 个文件。文件按其创建日期升序排列。
*/
@JsonProperty("file_ids")
private List<String> fileIds;
/**
* Set of 16 key-value pairs that can be attached to an object.
* This can be useful for storing additional information about the object in a structured format.
* Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
*/
private Map metadata;

private Double temperature;

@JsonProperty("top_p")
private Double topP;

/**
* `auto` is the default value
*/
@JsonProperty("response_format")
private Object responseFormat;



}
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ public class AssistantResponse implements Serializable {
* 助手上启用的工具列表。每个助手最多可以有 128 个工具。工具可以是 code_interpreter、retrieval或function。
*/
private List<Tool> tools;
/**
* 附加到该助手的文件 ID 列表。助手最多可以附加 20 个文件。文件按其创建日期升序排列。
*/
@JsonProperty("file_ids")
private List<String> fileIds;

@JsonProperty("tool_resources")
private ToolResources toolResources;

@JsonProperty("top_p")
private Double topP;

private Double temperature;
/**
* Set of 16 key-value pairs that can be attached to an object.
* This can be useful for storing additional information about the object in a structured format.
Expand All @@ -60,5 +63,8 @@ public class AssistantResponse implements Serializable {
@JsonProperty("created_at")
private Long createdAt;

@JsonProperty("response_format")
private Object responseFormat;


}

0 comments on commit cfa4400

Please sign in to comment.