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
3 changes: 3 additions & 0 deletions crates/aisix-gateway/src/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ pub struct ChatDelta {
pub role: Option<Role>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tool_calls: Option<Vec<serde_json::Value>>,
}

// ─── Embeddings ──────────────────────────────────────────────────────────────
Expand Down Expand Up @@ -675,6 +677,7 @@ mod tests {
delta: ChatDelta {
role: None,
content: Some("hello".into()),
tool_calls: None,
},
finish_reason: None,
usage: None,
Expand Down
5 changes: 3 additions & 2 deletions crates/aisix-provider-anthropic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pub use bridge::{AnthropicBridge, ANTHROPIC_DEFAULT_BASE, ANTHROPIC_VERSION};
/// - [`AnthropicSseEncoder`] re-encodes the bridge's `ChatChunk`
/// stream as Anthropic typed SSE events.
pub use wire::{
chat_response_into_anthropic_json, parse_inbound_request, AnthropicInboundError,
AnthropicSseEncoder, AnthropicSseEvent,
chat_response_into_anthropic_json, parse_inbound_request,
translate_anthropic_tool_choice_to_openai, translate_anthropic_tools_to_openai,
AnthropicInboundError, AnthropicSseEncoder, AnthropicSseEvent,
};
Loading
Loading