Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pr_agent/algo/ai_handlers/litellm_ai_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,11 @@ async def chat_completion(self, model: str, system: str, user: str, temperature:
if get_settings().config.verbosity_level >= 2:
get_logger().info(f"\nSystem prompt:\n{system}")
get_logger().info(f"\nUser prompt:\n{user}")

kwargs["api_key"] = litellm.api_key


# Support for Ollama Cloud
if model.startswith('ollama') and get_settings().get("OLLAMA.API_KEY", None):
kwargs["api_key"] = litellm.api_key

# Get completion with automatic streaming detection
resp, finish_reason, response_obj = await self._get_completion(**kwargs)

Expand Down
Loading