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

hotfix:remove all llama_index.legacy by replacing with llama_index.core #510

Merged
merged 4 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions modelscope_agent/rag/emb.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
from typing import Any, List, Optional

import dashscope
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.embeddings.base import (DEFAULT_EMBED_BATCH_SIZE,
BaseEmbedding)
from llama_index.core.base.embeddings.base import BaseEmbedding

# Enums for validation and type safety
DashscopeModelName = [
Expand Down
7 changes: 3 additions & 4 deletions modelscope_agent/rag/emb/dashscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
from typing import Any, List, Optional

import dashscope
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.embeddings.base import (DEFAULT_EMBED_BATCH_SIZE,
BaseEmbedding)
from llama_index.core.base.embeddings.base import (DEFAULT_EMBED_BATCH_SIZE,
BaseEmbedding)
from llama_index.core.callbacks import CallbackManager

# Enums for validation and type safety
DashscopeModelName = [
Expand Down
2 changes: 1 addition & 1 deletion modelscope_agent/rag/knowledge.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import fsspec
from llama_index.core import SimpleDirectoryReader, VectorStoreIndex
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.graph_stores.types import GraphStore
from llama_index.core.indices.base import BaseIndex
from llama_index.core.llama_pack.base import BaseLlamaPack
Expand All @@ -21,7 +22,6 @@
from llama_index.core.vector_stores.types import (BasePydanticVectorStore,
MetadataFilter,
MetadataFilters)
from llama_index.legacy.core.embeddings.base import BaseEmbedding
from modelscope_agent.llm import get_chat_model
from modelscope_agent.llm.base import BaseChatModel
from modelscope_agent.rag.emb import DashscopeEmbedding
Expand Down
Loading