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: llama index #415

Merged
merged 23 commits into from
Jun 6, 2024
Merged

feat: llama index #415

merged 23 commits into from
Jun 6, 2024

Conversation

suluyana
Copy link
Collaborator

No description provided.

modelscope_agent/rag/knowledge.py Outdated Show resolved Hide resolved
def get_transformations(self, **kwargs) -> Optional[List[TransformComponent]]:
return None

def get_retriever_tools(self, documents: List[Document], cache_dir: str) -> List[BaseRetriever]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cache_dr: str = None

modelscope_agent/rag/knowledge.py Outdated Show resolved Hide resolved

return retriever_tools

def get_postprocessors(self, **kwargs) -> BaseNodePostprocessor:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this function get object to process?

modelscope_agent/rag/knowledge.py Outdated Show resolved Hide resolved
modelscope_agent/rag/knowledge.py Show resolved Hide resolved
tests/test_memory.py Outdated Show resolved Hide resolved
tests/test_memory.py Outdated Show resolved Hide resolved
tests/test_memory.py Outdated Show resolved Hide resolved
modelscope_agent/rag/emb/dashscope.py Outdated Show resolved Hide resolved
modelscope_agent/rag/emb/dashscope.py Outdated Show resolved Hide resolved
class DashscopeEmbedding(BaseEmbedding):
"""DashscopeEmbedding uses the dashscope API to generate embeddings for text."""

def __init__(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用户如果想要使用其他llama index的embedding的话,有没有快捷的办法,还是说必须要这么一个文件写完才能接入?

modelscope_agent/rag/best_match/knowledge.py Outdated Show resolved Hide resolved
@suluyana suluyana changed the title [WIP] feat: llama index feat: llama index Jun 4, 2024

def __init__(
self,
llm: DashScopeLLM,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

support convertible llm

@zzhangpurdue zzhangpurdue merged commit 4a201f9 into master Jun 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants