testing thinking
This commit is contained in:
parent
6c05ab0611
commit
ba5fbffbe2
@ -183,13 +183,12 @@ class Pipeline:
|
|||||||
|
|
||||||
# Handle reasoning content (Chain of Thought)
|
# Handle reasoning content (Chain of Thought)
|
||||||
if "reasoningContent" in delta and "text" in delta["reasoningContent"]:
|
if "reasoningContent" in delta and "text" in delta["reasoningContent"]:
|
||||||
if '"<details type="reasoning" done="false">' in delta["reasoningContent"]["text"]:
|
print(f"Reasoning content: {delta['reasoningContent']}")
|
||||||
yield "<thinking>"
|
yield delta["reasoningContent"]["text"]
|
||||||
yield delta["reasoningContent"]["text"]
|
|
||||||
|
|
||||||
# Handle regular response text
|
# Handle regular response text
|
||||||
if "text" in delta:
|
if "text" in delta:
|
||||||
yield delta["text"]
|
yield delta["text"]
|
||||||
|
|
||||||
def get_completion(self, model_id: str, payload: dict) -> str:
|
def get_completion(self, model_id: str, payload: dict) -> str:
|
||||||
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-runtime/client/converse.html
|
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-runtime/client/converse.html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user