Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyeh committed Jul 1, 2024
1 parent 8426b26 commit 7adc61c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wren-ai-service/src/providers/llm/azure_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def get_generator(
or GENERATION_MODEL_KWARGS,
system_prompt: Optional[str] = None,
):
logger.info(
f"Creating Azure OpenAI generator with model kwargs: {model_kwargs}"
)
return AsyncGenerator(
api_key=self._generation_api_key,
model=self._generation_model,
Expand Down
1 change: 1 addition & 0 deletions wren-ai-service/src/providers/llm/ollama.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def get_generator(
or GENERATION_MODEL_KWARGS,
system_prompt: Optional[str] = None,
):
logger.info(f"Creating Ollama generator with model kwargs: {model_kwargs}")
return AsyncGenerator(
model=self._generation_model,
url=f"{self._url}/api/generate",
Expand Down
7 changes: 7 additions & 0 deletions wren-ai-service/src/providers/llm/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ def get_generator(
or GENERATION_MODEL_KWARGS,
system_prompt: Optional[str] = None,
):
if self._api_base == LLM_OPENAI_API_BASE:
logger.info(f"Creating OpenAI generator with model kwargs: {model_kwargs}")
else:
logger.info(
f"Creating OpenAI API-compatible generator with model kwargs: {model_kwargs}"
)

return AsyncGenerator(
api_key=self._api_key,
api_base_url=self._api_base,
Expand Down

0 comments on commit 7adc61c

Please sign in to comment.