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
1ac2e378
Unverified
Commit
1ac2e378
authored
1 year ago
by
kadereub
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
bugfix: fix ServiceContext reference (#7528)
parent
2e2d0986
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
docs/core_modules/model_modules/embeddings/usage_pattern.md
+1
-1
1 addition, 1 deletion
docs/core_modules/model_modules/embeddings/usage_pattern.md
with
1 addition
and
1 deletion
docs/core_modules/model_modules/embeddings/usage_pattern.md
+
1
−
1
View file @
1ac2e378
...
...
@@ -11,7 +11,7 @@ from llama_index import ServiceContext, VectorStoreIndex, SimpleDirectoryReader
from
llama_index.embeddings
import
OpenAIEmbedding
embed_model
=
OpenAIEmbedding
()
service_context
=
s
erviceContext
.
from_defaults
(
embed_model
=
embed_model
)
service_context
=
S
erviceContext
.
from_defaults
(
embed_model
=
embed_model
)
# optionally set a global service context to avoid passing it into other objects every time
from
llama_index
import
set_global_service_context
...
...
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