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

refine readme #170

Merged
merged 1 commit into from
Mar 29, 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
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@

## 🤺RagFlow vs. other RAG applications

| Feature | RagFlow | Langchain-Chatchat | Dify.AI | Assistants API | QAnythig | LangChain |
|---------|:---------:|:----------------:|:-----------:|:-----------:|:-----------:|:-----------:|
| **Well-Founded Answer** | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
| **Trackable Chunking** | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
| **Chunking Method** | Rich Variety | Naive | Naive | Naive | Naive | Naive |
| **Table Structure Recognition** | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
| Feature | RagFlow | Langchain-Chatchat | Assistants API | QAnythig | LangChain |
|---------|:---------:|:----------------:|:-----------:|:-----------:|:-----------:|
| **Well-Founded Answer** | :white_check_mark: | :x: | :x: | :x: | :x: |
| **Trackable Chunking** | :white_check_mark: | :x: | :x: | :x: | :x: |
| **Chunking Method** | Rich Variety | Naive | Naive | | Naive | Naive |
| **Table Structure Recognition** | :white_check_mark: | :x: | | :x: | :x: | :x: |
| **Structured Data Lookup** | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
| **Programming Approach** | API-oriented | API-oriented | API-oriented | API-oriented | API-oriented | Python Code-oriented |
| **RAG Engine** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| **Prompt IDE** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| **Supported LLMs** | Rich Variety | Rich Variety | Rich Variety | OpenAI-only | QwenLLM | Rich Variety |
| **Local Deployment** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: |
| **Ecosystem Strategy** | Open Source | Open Source | Open Source | Close Source | Open Source | Open Source |
| **Programming Approach** | API-oriented | API-oriented | API-oriented | API-oriented | Python Code-oriented |
| **RAG Engine** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| **Prompt IDE** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| **Supported LLMs** | Rich Variety | Rich Variety | OpenAI-only | QwenLLM | Rich Variety |
| **Local Deployment** | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: |
| **Ecosystem Strategy** | Open Source | Open Source | Close Source | Open Source | Open Source |

## 🔎 System Architecture

Expand Down
4 changes: 2 additions & 2 deletions api/db/services/llm_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def model_instance(cls, tenant_id, llm_type,
if model_config["llm_factory"] not in EmbeddingModel:
return
return EmbeddingModel[model_config["llm_factory"]](
model_config["api_key"], model_config["llm_name"], model_config["api_base"])
model_config["api_key"], model_config["llm_name"], base_url=model_config["api_base"])

if llm_type == LLMType.IMAGE2TEXT.value:
if model_config["llm_factory"] not in CvModel:
Expand All @@ -98,7 +98,7 @@ def model_instance(cls, tenant_id, llm_type,
if model_config["llm_factory"] not in ChatModel:
return
return ChatModel[model_config["llm_factory"]](
model_config["api_key"], model_config["llm_name"], model_config["api_base"])
model_config["api_key"], model_config["llm_name"], base_url=model_config["api_base"])

@classmethod
@DB.connection_context()
Expand Down
2 changes: 1 addition & 1 deletion rag/llm/embedding_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def encode_queries(self, text: str):


class HuEmbedding(Base):
def __init__(self, **kwargs):
def __init__(self, *args, **kwargs):
"""
If you have trouble downloading HuggingFace models, -_^ this might help!!

Expand Down