mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-17 08:29:28 +00:00
fix: create_plaintext_block
This commit is contained in:
parent
a6686d7c4f
commit
8d8a61ab3b
@ -1273,10 +1273,11 @@ def create_plaintext_block(
|
|||||||
block = PlainTextContentBlock(
|
block = PlainTextContentBlock(
|
||||||
type="text-plain",
|
type="text-plain",
|
||||||
mime_type="text/plain",
|
mime_type="text/plain",
|
||||||
text=text,
|
|
||||||
id=_ensure_id(id),
|
id=_ensure_id(id),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if text is not None:
|
||||||
|
block["text"] = text
|
||||||
if url is not None:
|
if url is not None:
|
||||||
block["url"] = url
|
block["url"] = url
|
||||||
if base64 is not None:
|
if base64 is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user