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.9.0</version>
<version>0.10.0</version>
</dependency>
```

### Gradle

```groovy
implementation 'com.volcengine:ark-runtime:0.9.0'
implementation 'com.volcengine:ark-runtime:0.10.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.9.0
0.10.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.9.0</version>
<version>0.10.0</version>
<packaging>jar</packaging>

<name>ark-runtime</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
@JsonSubTypes.Type(value = ContentBlockStartContentBlockWebSearchToolResult.class, name = "web_search_tool_result"),
})

@com.volcengine.ark.runtime.utils.UnknownVariantFallback(UnknownContentBlockStartContentBlock.class)
public interface ContentBlockStartContentBlock {
public ContentBlockStartContentBlockType getType();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
*/
public enum ContentBlockStartContentBlockType {

// SDK-only sentinel; original unknown wire value lives on UnknownVariant.
UNKNOWN("__ark_unknown_variant__"),

SERVER_TOOL_USE("server_tool_use"),

TEXT("text"),
Expand Down Expand Up @@ -54,6 +57,7 @@ public String toString() {
@JsonCreator
public static ContentBlockStartContentBlockType fromValue(String value) {
for (ContentBlockStartContentBlockType b : ContentBlockStartContentBlockType.values()) {
if (b == UNKNOWN) continue;
if (b.value.equalsIgnoreCase(value)) {
return b;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
@JsonSubTypes.Type(value = MessagesResponseContentBlockDeltaThinking.class, name = "thinking_delta"),
})

@com.volcengine.ark.runtime.utils.UnknownVariantFallback(UnknownMessagesResponseContentBlockDelta.class)
public interface MessagesResponseContentBlockDelta {
public MessagesResponseContentBlockDeltaType getType();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
*/
public enum MessagesResponseContentBlockDeltaType {

// SDK-only sentinel; original unknown wire value lives on UnknownVariant.
UNKNOWN("__ark_unknown_variant__"),

INPUT_JSON_DELTA("input_json_delta"),

SIGNATURE_DELTA("signature_delta"),
Expand Down Expand Up @@ -52,6 +55,7 @@ public String toString() {
@JsonCreator
public static MessagesResponseContentBlockDeltaType fromValue(String value) {
for (MessagesResponseContentBlockDeltaType b : MessagesResponseContentBlockDeltaType.values()) {
if (b == UNKNOWN) continue;
if (b.value.equalsIgnoreCase(value)) {
return b;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
@JsonSubTypes.Type(value = MessagesResponseContentPartWebSearchToolResult.class, name = "web_search_tool_result"),
})

@com.volcengine.ark.runtime.utils.UnknownVariantFallback(UnknownMessagesResponseContentPart.class)
public interface MessagesResponseContentPart {
public MessagesResponseContentPartType getType();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
*/
public enum MessagesResponseContentPartType {

// SDK-only sentinel; original unknown wire value lives on UnknownVariant.
UNKNOWN("__ark_unknown_variant__"),

SERVER_TOOL_USE("server_tool_use"),

TEXT("text"),
Expand Down Expand Up @@ -54,6 +57,7 @@ public String toString() {
@JsonCreator
public static MessagesResponseContentPartType fromValue(String value) {
for (MessagesResponseContentPartType b : MessagesResponseContentPartType.values()) {
if (b == UNKNOWN) continue;
if (b.value.equalsIgnoreCase(value)) {
return b;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
@JsonSubTypes.Type(value = MessagesResponseStreamMessageStop.class, name = "message_stop"),
})

@com.volcengine.ark.runtime.utils.UnknownVariantFallback(UnknownMessagesStreamEvent.class)
public interface MessagesStreamEvent {
public MessagesStreamEventType getType();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
*/
public enum MessagesStreamEventType {

// SDK-only sentinel; original unknown wire value lives on UnknownVariant.
UNKNOWN("__ark_unknown_variant__"),

CONTENT_BLOCK_DELTA("content_block_delta"),

CONTENT_BLOCK_START("content_block_start"),
Expand Down Expand Up @@ -58,6 +61,7 @@ public String toString() {
@JsonCreator
public static MessagesStreamEventType fromValue(String value) {
for (MessagesStreamEventType b : MessagesStreamEventType.values()) {
if (b == UNKNOWN) continue;
if (b.value.equalsIgnoreCase(value)) {
return b;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
// SPDX-License-Identifier: Apache-2.0

/*
* Ark Messages API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

package com.volcengine.ark.runtime.models.messages;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.volcengine.ark.runtime.utils.UnknownVariantSupport;
import java.io.IOException;

/** Generated by ark-apis unknown_response_variants; retained future ContentBlockStartContentBlock payload. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NONE)
@JsonDeserialize(using = UnknownContentBlockStartContentBlock.Deserializer.class)
@JsonSerialize(using = UnknownVariantSupport.Serializer.class)
public final class UnknownContentBlockStartContentBlock extends UnknownVariantSupport implements ContentBlockStartContentBlock {
public UnknownContentBlockStartContentBlock(JsonNode rawJson) {
super("type", rawJson);
}

@Override
public ContentBlockStartContentBlockType getType() {
return ContentBlockStartContentBlockType.UNKNOWN;
}

public static final class Deserializer extends JsonDeserializer<UnknownContentBlockStartContentBlock> {
@Override
public UnknownContentBlockStartContentBlock deserialize(JsonParser parser, DeserializationContext context) throws IOException {
JsonNode node = parser.getCodec().readTree(parser);
if (!UnknownVariantSupport.hasDiscriminator(node, "type")) {
return (UnknownContentBlockStartContentBlock) context.handleUnexpectedToken(UnknownContentBlockStartContentBlock.class, parser);
}
return new UnknownContentBlockStartContentBlock(node);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
// SPDX-License-Identifier: Apache-2.0

/*
* Ark Messages API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

package com.volcengine.ark.runtime.models.messages;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.volcengine.ark.runtime.utils.UnknownVariantSupport;
import java.io.IOException;

/** Generated by ark-apis unknown_response_variants; retained future MessagesResponseContentBlockDelta payload. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NONE)
@JsonDeserialize(using = UnknownMessagesResponseContentBlockDelta.Deserializer.class)
@JsonSerialize(using = UnknownVariantSupport.Serializer.class)
public final class UnknownMessagesResponseContentBlockDelta extends UnknownVariantSupport implements MessagesResponseContentBlockDelta {
public UnknownMessagesResponseContentBlockDelta(JsonNode rawJson) {
super("type", rawJson);
}

@Override
public MessagesResponseContentBlockDeltaType getType() {
return MessagesResponseContentBlockDeltaType.UNKNOWN;
}

public static final class Deserializer extends JsonDeserializer<UnknownMessagesResponseContentBlockDelta> {
@Override
public UnknownMessagesResponseContentBlockDelta deserialize(JsonParser parser, DeserializationContext context) throws IOException {
JsonNode node = parser.getCodec().readTree(parser);
if (!UnknownVariantSupport.hasDiscriminator(node, "type")) {
return (UnknownMessagesResponseContentBlockDelta) context.handleUnexpectedToken(UnknownMessagesResponseContentBlockDelta.class, parser);
}
return new UnknownMessagesResponseContentBlockDelta(node);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
// SPDX-License-Identifier: Apache-2.0

/*
* Ark Messages API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

package com.volcengine.ark.runtime.models.messages;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.volcengine.ark.runtime.utils.UnknownVariantSupport;
import java.io.IOException;

/** Generated by ark-apis unknown_response_variants; retained future MessagesResponseContentPart payload. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NONE)
@JsonDeserialize(using = UnknownMessagesResponseContentPart.Deserializer.class)
@JsonSerialize(using = UnknownVariantSupport.Serializer.class)
public final class UnknownMessagesResponseContentPart extends UnknownVariantSupport implements MessagesResponseContentPart {
public UnknownMessagesResponseContentPart(JsonNode rawJson) {
super("type", rawJson);
}

@Override
public MessagesResponseContentPartType getType() {
return MessagesResponseContentPartType.UNKNOWN;
}

public static final class Deserializer extends JsonDeserializer<UnknownMessagesResponseContentPart> {
@Override
public UnknownMessagesResponseContentPart deserialize(JsonParser parser, DeserializationContext context) throws IOException {
JsonNode node = parser.getCodec().readTree(parser);
if (!UnknownVariantSupport.hasDiscriminator(node, "type")) {
return (UnknownMessagesResponseContentPart) context.handleUnexpectedToken(UnknownMessagesResponseContentPart.class, parser);
}
return new UnknownMessagesResponseContentPart(node);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
// SPDX-License-Identifier: Apache-2.0

/*
* Ark Messages API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

package com.volcengine.ark.runtime.models.messages;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.volcengine.ark.runtime.utils.UnknownVariantSupport;
import java.io.IOException;

/** Generated by ark-apis unknown_response_variants; retained future MessagesStreamEvent payload. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NONE)
@JsonDeserialize(using = UnknownMessagesStreamEvent.Deserializer.class)
@JsonSerialize(using = UnknownVariantSupport.Serializer.class)
public final class UnknownMessagesStreamEvent extends UnknownVariantSupport implements MessagesStreamEvent {
public UnknownMessagesStreamEvent(JsonNode rawJson) {
super("type", rawJson);
}

@Override
public MessagesStreamEventType getType() {
return MessagesStreamEventType.UNKNOWN;
}

public static final class Deserializer extends JsonDeserializer<UnknownMessagesStreamEvent> {
@Override
public UnknownMessagesStreamEvent deserialize(JsonParser parser, DeserializationContext context) throws IOException {
JsonNode node = parser.getCodec().readTree(parser);
if (!UnknownVariantSupport.hasDiscriminator(node, "type")) {
return (UnknownMessagesStreamEvent) context.handleUnexpectedToken(UnknownMessagesStreamEvent.class, parser);
}
return new UnknownMessagesStreamEvent(node);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
@JsonSubTypes.Type(value = UrlCitation.class, name = "url_citation"),
})

@com.volcengine.ark.runtime.utils.UnknownVariantFallback(UnknownAnnotation.class)
public interface Annotation {
public AnnotationType getType();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
*/
public enum AnnotationType {

// SDK-only sentinel; original unknown wire value lives on UnknownVariant.
UNKNOWN("__ark_unknown_variant__"),

DOC_CITATION("doc_citation"),

URL_CITATION("url_citation");
Expand All @@ -48,6 +51,7 @@ public String toString() {
@JsonCreator
public static AnnotationType fromValue(String value) {
for (AnnotationType b : AnnotationType.values()) {
if (b == UNKNOWN) continue;
if (b.value.equalsIgnoreCase(value)) {
return b;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
@JsonSubTypes.Type(value = ClearToolUsesResponse.class, name = "clear_tool_uses"),
})

@com.volcengine.ark.runtime.utils.UnknownVariantFallback(UnknownAppliedEdit.class)
public interface AppliedEdit {
public AppliedEditType getType();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
*/
public enum AppliedEditType {

// SDK-only sentinel; original unknown wire value lives on UnknownVariant.
UNKNOWN("__ark_unknown_variant__"),

CLEAR_THINKING("clear_thinking"),

CLEAR_TOOL_USES("clear_tool_uses");
Expand All @@ -48,6 +51,7 @@ public String toString() {
@JsonCreator
public static AppliedEditType fromValue(String value) {
for (AppliedEditType b : AppliedEditType.values()) {
if (b == UNKNOWN) continue;
if (b.value.equalsIgnoreCase(value)) {
return b;
}
Expand Down
Loading
Loading