Merged
Conversation
content parts: text, image, audio
httpx 0.28.0 incompatibility fixed in respx 0.22.0
todo: add test
if content in last message is a list, return the text part if exists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
toolandarraykeywords for convenienceonly_loadoptioncachemethod).ensure_client_credentialsin constructor and load objinput_audiotype)$$reasoning_content$$/$$content$$) for storing reasoning tokensstream_chat_with_reasoningandastream_chat_with_reasoningfor streaming responses with reasoningChatPrompt: addresult_reasoningto get the reasoning content string from the last messageRunConfig.overwrite_if_exists: default do not overwrite already existing output pathsFixed
PromptConverter:msgs_replace_variables(): return a deep copy when notinplace. The previous behavior returns a shallow list copy, which may cause unexpected behavior when modifying the returned object.ChatPrompt: ensure result_str always return a str; if content in last message is a list, return the text part if existsChanged
PromptConverter.msgs2raw()(ChatPrompt dump): default usetoolandarraykeywords (instead oftype="tool_calls"andtype="content_array") in the dumped text. See above new feature of introducingtoolandarraykeywords.ChatPrompt.add_message(): now only accepts keyword argumentsRunConfig.on_chunk(): now must receive a typed dictChatChunkUnifiedwith keys:role,content,reasoning_content, andtool_callstream_chat_all()/astream_chat_all(): now also yield the typed dictChatChunkUnifiedDictProxydefinitions and change toTypedDict, please useTypedDictfor better type checking and editor support.