Replies: 1 comment
-
To set the embedding of from llama_index.core.indices.vector_store.base import VectorStoreIndex
from llama_index.embeddings.dashscope import DashScopeEmbedding
from llama_index.core.objects.base import ObjectIndex
# Initialize your custom embedding
custom_embedding = DashScopeEmbedding(model_name='text-embedding-v2', api_key=DASHSCOPE_API_KEY)
# Create the VectorStoreIndex with the custom embedding
vector_store_index = VectorStoreIndex(embed_model=custom_embedding)
# Use ObjectIndex.from_objects with the created VectorStoreIndex
object_index = ObjectIndex.from_objects(
objects=table_schema_objs,
object_mapping=table_node_mapping,
index_cls=VectorStoreIndex,
embed_model=custom_embedding
) In this example, replace |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i want to set VectorStoreIndex.embed_model as DashScopeEmbedding(
model_name='text-embedding-v2',
api_key=DASHSCOPE_API_KEY
)
Beta Was this translation helpful? Give feedback.
All reactions