returnToInnocence commented on code in PR #122: URL: https://github.com/apache/incubator-hugegraph-ai/pull/122#discussion_r1873936021
########## hugegraph-llm/src/hugegraph_llm/config/llm_config.py: ########## @@ -0,0 +1,97 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + + +import os + +from typing import Optional, Literal +from .models import BaseConfig + + +class LLMConfig(BaseConfig): + """LLM settings""" + + chat_llm_type: Literal["openai", "ollama/local", "qianfan_wenxin", "zhipu"] = "openai" + extract_llm_type: Literal["openai", "ollama/local", "qianfan_wenxin", "zhipu"] = "openai" + text2gql_llm_type: Literal["openai", "ollama/local", "qianfan_wenxin", "zhipu"] = "openai" + embedding_type: Optional[Literal["openai", "ollama/local", "qianfan_wenxin", "zhipu"]] = "openai" + reranker_type: Optional[Literal["cohere", "siliconflow"]] = None + # 1. OpenAI settings + openai_chat_api_base: Optional[str] = os.environ.get("OPENAI_BASE_URL", "https://api.openai.com/v1") Review Comment: There seems to be a problem with the environment variable that can't be found in env. I guess there is an error in the name, so it can't be read in properly. I guess it is "OPENAI_API_BASE"?  -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@hugegraph.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@hugegraph.apache.org For additional commands, e-mail: issues-h...@hugegraph.apache.org