Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(templates): extract text from multimodal requests #3866

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

mudler
Copy link
Owner

@mudler mudler commented Oct 17, 2024

Description

When offloading template construction to the backend, we want to keep text around in case of multimodal requests.

This pull request to core/backend/llm.go includes changes to support multimodal content in the ModelInference function by handling []interface{} types and converting them to strings.

Notes for Reviewers

Part of #3670

Signed commits

  • Yes, I signed my commits.

When offloading template construction to the backend, we want to keep
text around in case of multimodal requests.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Copy link

netlify bot commented Oct 17, 2024

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 79b076a
🔍 Latest deploy log https://app.netlify.com/sites/localai/deploys/671120597e7d840008ea5691
😎 Deploy Preview https://deploy-preview-3866--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

resultData := []struct {
Text string `json:"text"`
}{}
json.Unmarshal(data, &resultData)

Check warning

Code scanning / gosec

Errors unhandled. Warning

Errors unhandled.
@mudler mudler merged commit d5da8c3 into master Oct 17, 2024
30 of 32 checks passed
@mudler mudler deleted the feat/templated_tokenizer branch October 17, 2024 15:33
@mudler mudler added the enhancement New feature or request label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant