Skip to content

[langfun] lf.Message to automatically inject modalities that does not appear in the text#687

Merged
copybara-service[bot] merged 1 commit intomainfrom
test_887067562
Mar 21, 2026
Merged

[langfun] lf.Message to automatically inject modalities that does not appear in the text#687
copybara-service[bot] merged 1 commit intomainfrom
test_887067562

Conversation

@copybara-service
Copy link
Copy Markdown

@copybara-service copybara-service bot commented Mar 21, 2026

[langfun] lf.Message to automatically inject modalities that does not appear in the text

Example:

m = lf.Message(
    'hello world',
    referred_modalities=[lf.Image.from_uri('...')]
)
# IMG_HASH is the content-based hash for the image.
assert m.text == 'hello world\n<<[[IMG_HASH]]>>' 

@copybara-service copybara-service bot force-pushed the test_887067562 branch 4 times, most recently from aba81db to a6e86ec Compare March 21, 2026 01:56
…ot appear in the text

Example:
```python
m = lf.Message(
    'hello world',
    referred_modalities=[lf.Image.from_uri('...')]
)
# IMG_HASH is the content-based hash for the image.
assert m.text == 'hello world\n<<[[IMG_HASH]]>>'
```
PiperOrigin-RevId: 887079166
@copybara-service copybara-service bot merged commit 44efd4c into main Mar 21, 2026
@copybara-service copybara-service bot deleted the test_887067562 branch March 21, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant