Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ The official Java library for accessing ModelArk on Volcengine and BytePlus. It
<dependency>
<groupId>com.volcengine</groupId>
<artifactId>ark-runtime</artifactId>
<version>0.15.0</version>
<version>0.16.0</version>
</dependency>
```

### Gradle

```groovy
implementation 'com.volcengine:ark-runtime:0.15.0'
implementation 'com.volcengine:ark-runtime:0.16.0'
```

## Choose Volcengine or BytePlus
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.15.0
0.16.0
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.volcengine</groupId>
<artifactId>ark-runtime</artifactId>
<version>0.15.0</version>
<version>0.16.0</version>
<packaging>jar</packaging>

<name>ark-runtime</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public AudioURL url(@javax.annotation.Nonnull String url) {
}

/**
* Public HTTP(S) URL, speaker://&lt;id&gt;, file://&lt;file_id&gt; for registered reference audio, or data:audio/{wav,mp3};base64,&lt;payload&gt;. Decoded base64 audio is limited to 15 MiB for reference generation; separation uses a 90 MiB source-audio limit. A speaker reference cannot be used for separation.
* Public HTTP(S) URL, speaker://&lt;id&gt; for a preset speaker, file://&lt;file_id&gt; for a custom voice registered through the Files API, or data:audio/{wav,mp3};base64,&lt;payload&gt;. Voice-cloning speaker IDs are not supported. Decoded base64 audio is limited to 15 MiB for reference generation; separation uses a 90 MiB source-audio limit. A speaker reference cannot be used for separation.
* @return url
*/
@javax.annotation.Nonnull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public VideoURL url(@javax.annotation.Nonnull String url) {
}

/**
* Public HTTP(S) URL or tos://&lt;bucket&gt;/&lt;key&gt;. Base64 and speaker references are not supported. Media properties and size are validated by the server.
* Public HTTP(S) URL or tos://&lt;bucket&gt;/&lt;key&gt;. Supported video resolutions: 360p, 480p, 720p and 1080p; minimum total pixel count (width * height): 172800. Base64 and speaker references are not supported. Media properties and size are validated by the server.
* @return url
*/
@javax.annotation.Nonnull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
FunctionTool.JSON_PROPERTY_NAME,
FunctionTool.JSON_PROPERTY_PARAMETERS,
FunctionTool.JSON_PROPERTY_TYPE,
FunctionTool.JSON_PROPERTY_DESCRIPTION
FunctionTool.JSON_PROPERTY_DESCRIPTION,
FunctionTool.JSON_PROPERTY_DEFER_LOADING
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0")
public class FunctionTool implements Tool {
public class FunctionTool implements Tool, ToolSearchResultTool {
public static final String JSON_PROPERTY_NAME = "name";
@javax.annotation.Nonnull
private String name;
Expand All @@ -50,6 +51,10 @@ public class FunctionTool implements Tool {
@javax.annotation.Nullable
private String description;

public static final String JSON_PROPERTY_DEFER_LOADING = "defer_loading";
@javax.annotation.Nullable
private Boolean deferLoading;

public FunctionTool() {
}

Expand Down Expand Up @@ -161,6 +166,31 @@ public void setDescription(@javax.annotation.Nullable String description) {
this.description = description;
}

public FunctionTool deferLoading(@javax.annotation.Nullable Boolean deferLoading) {

this.deferLoading = deferLoading;
return this;
}

/**
* Defer the full schema until tool_search loads this function. Defaults to false.
* @return deferLoading
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_DEFER_LOADING, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public Boolean getDeferLoading() {
return deferLoading;
}


@JsonProperty(value = JSON_PROPERTY_DEFER_LOADING, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDeferLoading(@javax.annotation.Nullable Boolean deferLoading) {
this.deferLoading = deferLoading;
}


@Override
public boolean equals(Object o) {
Expand All @@ -174,12 +204,13 @@ public boolean equals(Object o) {
return Objects.equals(this.name, functionTool.name) &&
Objects.equals(this.parameters, functionTool.parameters) &&
Objects.equals(this.type, functionTool.type) &&
Objects.equals(this.description, functionTool.description);
Objects.equals(this.description, functionTool.description) &&
Objects.equals(this.deferLoading, functionTool.deferLoading);
}

@Override
public int hashCode() {
return Objects.hash(name, parameters, type, description);
return Objects.hash(name, parameters, type, description, deferLoading);
}

@Override
Expand All @@ -190,6 +221,7 @@ public String toString() {
sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" deferLoading: ").append(toIndentedString(deferLoading)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down Expand Up @@ -230,6 +262,10 @@ public FunctionTool.Builder description(String description) {
this.instance.description = description;
return this;
}
public FunctionTool.Builder deferLoading(Boolean deferLoading) {
this.instance.deferLoading = deferLoading;
return this;
}


/**
Expand Down Expand Up @@ -267,7 +303,8 @@ public FunctionTool.Builder toBuilder() {
.name(getName())
.parameters(getParameters())
.type(getType())
.description(getDescription());
.description(getDescription())
.deferLoading(getDeferLoading());
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
@JsonSubTypes.Type(value = ItemFunctionMcpListTools.class, name = "mcp_list_tools"),
@JsonSubTypes.Type(value = ItemEasyMessage.class, name = "message"),
@JsonSubTypes.Type(value = ItemReasoning.class, name = "reasoning"),
@JsonSubTypes.Type(value = ItemToolSearchCall.class, name = "tool_search_call"),
@JsonSubTypes.Type(value = ItemToolSearchOutput.class, name = "tool_search_output"),
})

@com.volcengine.ark.runtime.utils.UnknownVariantFallback(UnknownInputItem.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
ItemFunctionToolCall.JSON_PROPERTY_ARGUMENTS,
ItemFunctionToolCall.JSON_PROPERTY_CALL_ID,
ItemFunctionToolCall.JSON_PROPERTY_NAME,
ItemFunctionToolCall.JSON_PROPERTY_NAMESPACE,
ItemFunctionToolCall.JSON_PROPERTY_STATUS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0")
Expand All @@ -54,6 +55,10 @@ public class ItemFunctionToolCall implements InputItem, OutputItem {
@javax.annotation.Nullable
private String name;

public static final String JSON_PROPERTY_NAMESPACE = "namespace";
@javax.annotation.Nullable
private String namespace;

public static final String JSON_PROPERTY_STATUS = "status";
@javax.annotation.Nullable
private ItemStatus status;
Expand Down Expand Up @@ -186,6 +191,31 @@ public void setName(@javax.annotation.Nullable String name) {
this.name = name;
}

public ItemFunctionToolCall namespace(@javax.annotation.Nullable String namespace) {

this.namespace = namespace;
return this;
}

/**
* Namespace of the called function, omitted for top-level functions.
* @return namespace
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_NAMESPACE, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public String getNamespace() {
return namespace;
}


@JsonProperty(value = JSON_PROPERTY_NAMESPACE, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setNamespace(@javax.annotation.Nullable String namespace) {
this.namespace = namespace;
}

public ItemFunctionToolCall status(@javax.annotation.Nullable ItemStatus status) {

this.status = status;
Expand Down Expand Up @@ -226,12 +256,13 @@ public boolean equals(Object o) {
Objects.equals(this.arguments, itemFunctionToolCall.arguments) &&
Objects.equals(this.callId, itemFunctionToolCall.callId) &&
Objects.equals(this.name, itemFunctionToolCall.name) &&
Objects.equals(this.namespace, itemFunctionToolCall.namespace) &&
Objects.equals(this.status, itemFunctionToolCall.status);
}

@Override
public int hashCode() {
return Objects.hash(id, type, arguments, callId, name, status);
return Objects.hash(id, type, arguments, callId, name, namespace, status);
}

@Override
Expand All @@ -243,6 +274,7 @@ public String toString() {
sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n");
sb.append(" callId: ").append(toIndentedString(callId)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append("}");
return sb.toString();
Expand Down Expand Up @@ -288,6 +320,10 @@ public ItemFunctionToolCall.Builder name(String name) {
this.instance.name = name;
return this;
}
public ItemFunctionToolCall.Builder namespace(String namespace) {
this.instance.namespace = namespace;
return this;
}
public ItemFunctionToolCall.Builder status(ItemStatus status) {
this.instance.status = status;
return this;
Expand Down Expand Up @@ -331,6 +367,7 @@ public ItemFunctionToolCall.Builder toBuilder() {
.arguments(getArguments())
.callId(getCallId())
.name(getName())
.namespace(getNamespace())
.status(getStatus());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* ItemFunctionToolCallOutput
*/
@JsonPropertyOrder({
ItemFunctionToolCallOutput.JSON_PROPERTY_NAMESPACE,
ItemFunctionToolCallOutput.JSON_PROPERTY_TYPE,
ItemFunctionToolCallOutput.JSON_PROPERTY_CALL_ID,
ItemFunctionToolCallOutput.JSON_PROPERTY_OUTPUT,
Expand All @@ -33,6 +34,10 @@
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0")
public class ItemFunctionToolCallOutput implements InputItem {
public static final String JSON_PROPERTY_NAMESPACE = "namespace";
@javax.annotation.Nullable
private String namespace;

public static final String JSON_PROPERTY_TYPE = "type";
@javax.annotation.Nonnull
private ItemType type = ItemType.FUNCTION_CALL_OUTPUT;
Expand All @@ -56,6 +61,31 @@ public class ItemFunctionToolCallOutput implements InputItem {
public ItemFunctionToolCallOutput() {
}

public ItemFunctionToolCallOutput namespace(@javax.annotation.Nullable String namespace) {

this.namespace = namespace;
return this;
}

/**
* Namespace of the function whose result is being supplied.
* @return namespace
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_NAMESPACE, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public String getNamespace() {
return namespace;
}


@JsonProperty(value = JSON_PROPERTY_NAMESPACE, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setNamespace(@javax.annotation.Nullable String namespace) {
this.namespace = namespace;
}

public ItemFunctionToolCallOutput type(@javax.annotation.Nonnull ItemType type) {

this.type = type;
Expand Down Expand Up @@ -191,7 +221,8 @@ public boolean equals(Object o) {
return false;
}
ItemFunctionToolCallOutput itemFunctionToolCallOutput = (ItemFunctionToolCallOutput) o;
return Objects.equals(this.type, itemFunctionToolCallOutput.type) &&
return Objects.equals(this.namespace, itemFunctionToolCallOutput.namespace) &&
Objects.equals(this.type, itemFunctionToolCallOutput.type) &&
Objects.equals(this.callId, itemFunctionToolCallOutput.callId) &&
Objects.equals(this.output, itemFunctionToolCallOutput.output) &&
Objects.equals(this.id, itemFunctionToolCallOutput.id) &&
Expand All @@ -200,13 +231,14 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(type, callId, output, id, status);
return Objects.hash(namespace, type, callId, output, id, status);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ItemFunctionToolCallOutput {\n");
sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" callId: ").append(toIndentedString(callId)).append("\n");
sb.append(" output: ").append(toIndentedString(output)).append("\n");
Expand Down Expand Up @@ -236,6 +268,10 @@ protected Builder(ItemFunctionToolCallOutput instance) {
this.instance = instance;
}

public ItemFunctionToolCallOutput.Builder namespace(String namespace) {
this.instance.namespace = namespace;
return this;
}
public ItemFunctionToolCallOutput.Builder type(ItemType type) {
this.instance.type = type;
return this;
Expand Down Expand Up @@ -290,6 +326,7 @@ public static ItemFunctionToolCallOutput.Builder builder() {
*/
public ItemFunctionToolCallOutput.Builder toBuilder() {
return new ItemFunctionToolCallOutput.Builder()
.namespace(getNamespace())
.type(getType())
.callId(getCallId())
.output(getOutput())
Expand Down
Loading
Loading