This is an automated email from the ASF dual-hosted git repository.

jin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-ai.git


The following commit(s) were added to refs/heads/main by this push:
     new bd39711  fix: change openai base url (#59)
bd39711 is described below

commit bd39711f4006bd2e0d3fcdd5fda1dc22ed133501
Author: chenzihong <[email protected]>
AuthorDate: Wed Jul 31 19:53:20 2024 +0800

    fix: change openai base url (#59)
---
 hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py 
b/hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py
index 02bb2af..3de7ba4 100644
--- a/hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py
+++ b/hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py
@@ -237,7 +237,7 @@ if __name__ == "__main__":
                     settings.openai_api_base = arg2
                     settings.openai_language_model = arg3
                     settings.openai_max_tokens = int(arg4)
-                    test_url = "https://api.openai.com/v1/models";
+                    test_url = settings.openai_api_base + "/models"
                     headers = {"Authorization": f"Bearer {arg1}"}
                     test_api_connection(test_url, headers=headers, ak=arg1)
                 elif llm_option == "qianfan_wenxin":
@@ -300,7 +300,7 @@ if __name__ == "__main__":
                     settings.openai_api_key = arg1
                     settings.openai_api_base = arg2
                     settings.openai_embedding_model = arg3
-                    test_url = "https://api.openai.com/v1/models";
+                    test_url = settings.openai_api_base + "/models"
                     headers = {"Authorization": f"Bearer {arg1}"}
                     test_api_connection(test_url, headers=headers, ak=arg1)
                 elif embedding_option == "ollama":

Reply via email to