patdev commited on
Commit
4ec1ec8
·
verified ·
1 Parent(s): 15ab63b

pont : signature_delta aussi au passage thinking->texte

Browse files
Files changed (1) hide show
  1. anthropic_proxy.py +4 -0
anthropic_proxy.py CHANGED
@@ -601,6 +601,10 @@ async def stream_anthropic(payload: dict, req_model: str):
601
 
602
  if delta.get("content"):
603
  if think_open:
 
 
 
 
604
  yield _sse("content_block_stop",
605
  {"type": "content_block_stop", "index": idx})
606
  think_open = False
 
601
 
602
  if delta.get("content"):
603
  if think_open:
604
+ yield _sse("content_block_delta", {
605
+ "type": "content_block_delta", "index": idx,
606
+ "delta": {"type": "signature_delta",
607
+ "signature": "vllm-" + uuid.uuid4().hex[:16]}})
608
  yield _sse("content_block_stop",
609
  {"type": "content_block_stop", "index": idx})
610
  think_open = False