update: fmt + memoryに用いる言語の構成
This commit is contained in:
@@ -316,7 +316,8 @@ impl AnthropicScheme {
|
||||
});
|
||||
match &raw.content_block {
|
||||
ContentBlock::Thinking {
|
||||
thinking, signature,
|
||||
thinking,
|
||||
signature,
|
||||
} => {
|
||||
state.pending_thinking = Some(PendingThinking {
|
||||
text: thinking.clone(),
|
||||
@@ -372,10 +373,7 @@ impl AnthropicScheme {
|
||||
}
|
||||
AnthropicEventType::ContentBlockStop => {
|
||||
let raw: ContentBlockStopEvent = serde_json::from_str(data)?;
|
||||
let block_type = state
|
||||
.current_block_type
|
||||
.take()
|
||||
.unwrap_or(BlockType::Text);
|
||||
let block_type = state.current_block_type.take().unwrap_or(BlockType::Text);
|
||||
emitted.push(Event::BlockStop(BlockStop {
|
||||
index: raw.index,
|
||||
block_type,
|
||||
|
||||
@@ -458,7 +458,10 @@ pub(crate) fn parse_sse(
|
||||
"response.reasoning_text.delta" => {
|
||||
let ev: ReasoningTextDelta = from_json(data)?;
|
||||
// round-trip 用に蓄積
|
||||
state.ensure_reasoning(ev.output_index).text.push_str(&ev.delta);
|
||||
state
|
||||
.ensure_reasoning(ev.output_index)
|
||||
.text
|
||||
.push_str(&ev.delta);
|
||||
Ok(ensure_and_delta(
|
||||
state,
|
||||
SlotKey::ContentPart {
|
||||
|
||||
Reference in New Issue
Block a user