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 .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
},
"enable-wire-tests": true
},
"originGitCommit": "335af96251466afae7a9f71badb65c630a48626e",
"originGitCommit": "14c0ca94fcd0279d99570389d7b688dc3a18ea41",
"originGitCommitIsDirty": true,
"invokedBy": "manual",
"sdkVersion": "0.6.0"
"sdkVersion": "0.6.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public String getMessage() {
* <ul>
* <li><code>default</code> — The agent speaks only if neither the user nor the agent is mid-turn. If a turn is in progress, the server replies with <code>InjectionRefused</code>.</li>
* <li><code>queue</code> — The message is appended after any already-queued <code>ConversationText</code> without interrupting the current agent turn or think response. If nothing is queued, the message plays immediately.</li>
* <li><code>interrupt</code> — The agent immediately speaks. If the agent was already speaking, it interrupts the current speech and replaces it with the new message. If the user is speaking, the agent interrupts with the new message, but the user's continued speech triggers <code>UserStartedSpeaking</code>, which quickly interrupts the agent.</li>
* </ul>
*/
@JsonProperty("behavior")
Expand Down Expand Up @@ -114,6 +115,7 @@ public interface _FinalStage {
* <ul>
* <li><code>default</code> — The agent speaks only if neither the user nor the agent is mid-turn. If a turn is in progress, the server replies with <code>InjectionRefused</code>.</li>
* <li><code>queue</code> — The message is appended after any already-queued <code>ConversationText</code> without interrupting the current agent turn or think response. If nothing is queued, the message plays immediately.</li>
* <li><code>interrupt</code> — The agent immediately speaks. If the agent was already speaking, it interrupts the current speech and replaces it with the new message. If the user is speaking, the agent interrupts with the new message, but the user's continued speech triggers <code>UserStartedSpeaking</code>, which quickly interrupts the agent.</li>
* </ul>
*/
_FinalStage behavior(Optional<AgentV1InjectAgentMessageBehavior> behavior);
Expand Down Expand Up @@ -156,6 +158,7 @@ public _FinalStage message(@NotNull String message) {
* <ul>
* <li><code>default</code> — The agent speaks only if neither the user nor the agent is mid-turn. If a turn is in progress, the server replies with <code>InjectionRefused</code>.</li>
* <li><code>queue</code> — The message is appended after any already-queued <code>ConversationText</code> without interrupting the current agent turn or think response. If nothing is queued, the message plays immediately.</li>
* <li><code>interrupt</code> — The agent immediately speaks. If the agent was already speaking, it interrupts the current speech and replaces it with the new message. If the user is speaking, the agent interrupts with the new message, but the user's continued speech triggers <code>UserStartedSpeaking</code>, which quickly interrupts the agent.</li>
* </ul>
* @return Reference to {@code this} so that method calls can be chained together.
*/
Expand All @@ -170,6 +173,7 @@ public _FinalStage behavior(AgentV1InjectAgentMessageBehavior behavior) {
* <ul>
* <li><code>default</code> — The agent speaks only if neither the user nor the agent is mid-turn. If a turn is in progress, the server replies with <code>InjectionRefused</code>.</li>
* <li><code>queue</code> — The message is appended after any already-queued <code>ConversationText</code> without interrupting the current agent turn or think response. If nothing is queued, the message plays immediately.</li>
* <li><code>interrupt</code> — The agent immediately speaks. If the agent was already speaking, it interrupts the current speech and replaces it with the new message. If the user is speaking, the agent interrupts with the new message, but the user's continued speech triggers <code>UserStartedSpeaking</code>, which quickly interrupts the agent.</li>
* </ul>
*/
@java.lang.Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ public final class AgentV1InjectAgentMessageBehavior {
public static final AgentV1InjectAgentMessageBehavior DEFAULT =
new AgentV1InjectAgentMessageBehavior(Value.DEFAULT, "default");

public static final AgentV1InjectAgentMessageBehavior INTERRUPT =
new AgentV1InjectAgentMessageBehavior(Value.INTERRUPT, "interrupt");

public static final AgentV1InjectAgentMessageBehavior QUEUE =
new AgentV1InjectAgentMessageBehavior(Value.QUEUE, "queue");

Expand Down Expand Up @@ -48,6 +51,8 @@ public <T> T visit(Visitor<T> visitor) {
switch (value) {
case DEFAULT:
return visitor.visitDefault();
case INTERRUPT:
return visitor.visitInterrupt();
case QUEUE:
return visitor.visitQueue();
case UNKNOWN:
Expand All @@ -61,6 +66,8 @@ public static AgentV1InjectAgentMessageBehavior valueOf(String value) {
switch (value) {
case "default":
return DEFAULT;
case "interrupt":
return INTERRUPT;
case "queue":
return QUEUE;
default:
Expand All @@ -73,6 +80,8 @@ public enum Value {

QUEUE,

INTERRUPT,

UNKNOWN
}

Expand All @@ -81,6 +90,8 @@ public interface Visitor<T> {

T visitQueue();

T visitInterrupt();

T visitUnknown(String unknownType);
}
}
Loading
Loading