Code Monkey home page Code Monkey logo

win4r / graphrag4openwebui Goto Github PK

View Code? Open in Web Editor NEW
231.0 5.0 51.0 123 KB

GraphRAG4OpenWebUI integrates Microsoft's GraphRAG technology into Open WebUI, providing a versatile information retrieval API. It combines local, global, and web searches for advanced Q&A systems and search engines. This tool simplifies graph-based retrieval integration in open web environments.

Home Page: https://www.youtube.com/@AIsuperdomain

License: Apache License 2.0

Python 100.00%
aiagents graphrag llms ollama openai openwebui rag

graphrag4openwebui's Issues

When running, the interface will retry infinitely and no result will be output

INFO: Waiting for application startup.
2024-08-12 11:22:55,049 - main - INFO - Initializing search engines and question generator...
2024-08-12 11:22:55,049 - main - INFO - Setting up LLM and embedder
2024-08-12 11:22:55,235 - main - INFO - LLM and embedder setup complete
2024-08-12 11:22:55,236 - main - INFO - Loading context data
2024-08-12 11:22:55,291 - main - INFO - Number of claim records: 44
2024-08-12 11:22:55,291 - main - INFO - Context data loading complete
2024-08-12 11:22:55,291 - main - INFO - Setting up search engines
2024-08-12 11:22:55,291 - main - INFO - Search engines setup complete
2024-08-12 11:22:55,291 - main - INFO - Initialization complete.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8012 (Press CTRL+C to quit)
2024-08-12 11:23:03,935 - main - INFO - Received chat completion request: model='graphrag-local-search:latest' messages=[Message(role='user', content='who is spike')] temperature=0.7 top_p=1.0 n=1 stream=False stop=None max_tokens=None presence_penalty=0 frequency_penalty=0 logit_bias=None user=None
2024-08-12 11:23:03,936 - main - INFO - Processing prompt: who is spike
local search prompt: who is spike
2024-08-12 11:23:04,554 - httpx - INFO - HTTP Request: POST https://api.openai.com/v1/embeddings "HTTP/1.1 200 OK"
2024-08-12 11:23:04,669 - graphrag.query.structured_search.local_search.search - INFO - GENERATE ANSWER: 1723432983.9361222. QUERY: who is spike
2024-08-12 11:23:04,690 - openai._base_client - INFO - Retrying request to /chat/completions in 0.892320 seconds

Where to enter the endpoint?

From README.md:

Integration with Open WebUI: In the Open WebUI configuration, set the API endpoint to http://localhost:8012/v1/chat/completions. This will allow Open WebUI to use the search functionality of GraphRAG4OpenWebUI.

Where exactly do I have to enter the endpoint? In Connections --> OpenAI API? Because there you have to enter an API-key and although GraphRAG4OpenWebUI is up and running, it will result in connection failures.

What am I missing here?

INPUT_DIR路径有问题

INPUT_DIR这个路径有问题
执行:python main-cn.py报以下错误

2024-07-16 18:30:28,682 - main - ERROR - 加载上下文数据时出错: [Errno 2] No such file or directory: './ragtest/create_final_nodes.parquet'
2024-07-16 18:30:28,682 - main - ERROR - 初始化过程中出错: [Errno 2] No such file or directory: './ragtest/create_final_nodes.parquet'

parquet文件是不是找的路径有问题呢?最新的ragtest目录结构是这样的
image

local search erro

调用本地模型,返回{
"detail": "object of type 'int' has no len()"
}

Retrying request to /embeddings

I didn't config TAVILY_API_KEY

export TAVILY_API_KEY=""

export INPUT_DIR="xxx/input/artifacts"

export GRAPHRAG_API_KEY=""

export GRAPHRAG_API_KEY_EMBEDDING=""

export GRAPHRAG_LLM_MODEL="Qwen1.5-14B-Chat-GPTQ-Int4"

export API_BASE="http://172.17.22.174:9997/v1"

export API_BASE_EMBEDDING="http://172.17.22.174:9997/v1"

export GRAPHRAG_EMBEDDING_MODEL="m3e-base"

LLM and embedding served by xinference, but always get logs like this:

2024-08-02 15:45:51,474 - openai._base_client - INFO - Retrying request to /embeddings in 0.971267 seconds

加载上下文数据时出错: [Errno 2] No such file or directory: '..artifacts/create_final_covariates.parquet'

有时没有生成create_final_covariates.parquet。代码中需要兼容一下:
main-cn.py 将

covariate_df = pd.read_parquet(f"{INPUT_DIR}/{COVARIATE_TABLE}.parquet")
claims = read_indexer_covariates(covariate_df)

改为

        final_covariates_path = f"{INPUT_DIR}/{COVARIATE_TABLE}.parquet"
        final_covariates = (
            pd.read_parquet(final_covariates_path)
            if os.path.exists(final_covariates_path)
            else None
        )
        claims = (
            read_indexer_covariates(final_covariates)
            if final_covariates is not None
            else []
        )

404 Client Error: Not Found for url: http://xxx:8012/api/version

INFO: 172.17.0.1:41748 - "POST /ollama/urls/update HTTP/1.1" 200 OK
2024-07-23 17:33:22 ERROR [apps.ollama.main] 404 Client Error: Not Found for url: http://host.docker.internal:8012/api/version
2024-07-23 17:33:22 Traceback (most recent call last):
2024-07-23 17:33:22 File "/app/backend/apps/ollama/main.py", line 315, in get_ollama_versions
2024-07-23 17:33:22 r.raise_for_status()
2024-07-23 17:33:22 File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
2024-07-23 17:33:22 raise HTTPError(http_error_msg, response=self)
2024-07-23 17:33:22 requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://host.docker.internal:8012/api/version
2024-07-23 17:33:22 INFO: 172.17.0.1:41748 - "GET /ollama/api/version/1 HTTP/1.1" 500 Internal Server Error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.