Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Llama Index
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
run-llama
Llama Index
Commits
0928dc25
Unverified
Commit
0928dc25
authored
1 year ago
by
Joel Rorseth
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add CallbackManager to MultiModalLLM (#13400)
parent
78bf6117
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llama-index-core/llama_index/core/multi_modal_llms/base.py
+12
-4
12 additions, 4 deletions
llama-index-core/llama_index/core/multi_modal_llms/base.py
with
12 additions
and
4 deletions
llama-index-core/llama_index/core/multi_modal_llms/base.py
+
12
−
4
View file @
0928dc25
...
...
@@ -17,7 +17,8 @@ from llama_index.core.base.query_pipeline.query import (
QueryComponent
,
validate_and_convert_stringable
,
)
from
llama_index.core.bridge.pydantic
import
BaseModel
,
Field
from
llama_index.core.bridge.pydantic
import
BaseModel
,
Field
,
validator
from
llama_index.core.callbacks
import
CallbackManager
from
llama_index.core.constants
import
(
DEFAULT_CONTEXT_WINDOW
,
DEFAULT_NUM_INPUT_FILES
,
...
...
@@ -70,15 +71,22 @@ class MultiModalLLMMetadata(BaseModel):
)
# TODO add callback functionality
class
MultiModalLLM
(
ChainableMixin
,
BaseComponent
):
"""
Multi-Modal LLM interface.
"""
callback_manager
:
CallbackManager
=
Field
(
default_factory
=
CallbackManager
,
exclude
=
True
)
class
Config
:
arbitrary_types_allowed
=
True
@validator
(
"
callback_manager
"
,
pre
=
True
)
def
_validate_callback_manager
(
cls
,
v
:
CallbackManager
)
->
CallbackManager
:
if
v
is
None
:
return
CallbackManager
([])
return
v
@property
@abstractmethod
def
metadata
(
self
)
->
MultiModalLLMMetadata
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment