Skip to content

Commit

Permalink
fix(llm): use empty str for llm config (#155)
Browse files Browse the repository at this point in the history
TODO: we should better reuse the LLM API/configs
  • Loading branch information
ChenZiHong-Gavin authored Jan 8, 2025
1 parent 820bfb2 commit 2441d2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(
api_key: Optional[str] = None,
api_base: Optional[str] = None
):
api_key = api_key or ''
self.client = OpenAI(api_key=api_key, base_url=api_base)
self.aclient = AsyncOpenAI(api_key=api_key, base_url=api_base)
self.embedding_model_name = model_name
Expand Down
1 change: 1 addition & 0 deletions hugegraph-llm/src/hugegraph_llm/models/llms/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __init__(
max_tokens: int = 4096,
temperature: float = 0.0,
) -> None:
api_key = api_key or ''
self.client = OpenAI(api_key=api_key, base_url=api_base)
self.aclient = AsyncOpenAI(api_key=api_key, base_url=api_base)
self.model = model_name
Expand Down

0 comments on commit 2441d2b

Please sign in to comment.