mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 04:10:49 +08:00
update base ai handler
This commit is contained in:
@ -18,31 +18,3 @@ class BaseAiHandler(ABC):
|
||||
async def chat_completion(self, model: str, system: str, user: str, temperature: float = 0.2):
|
||||
pass
|
||||
|
||||
|
||||
class AiHandler(BaseAiHandler):
|
||||
"""
|
||||
This class handles interactions with the OpenAI API for chat completions.
|
||||
It initializes the API key and other settings from a configuration file,
|
||||
and provides a method for performing chat completions using the OpenAI ChatCompletion API.
|
||||
"""
|
||||
|
||||
# ... rest of your code ...
|
||||
|
||||
|
||||
class CustomAiHandler(BaseAiHandler):
|
||||
"""
|
||||
This class is your custom AI handler that uses a different LLM library.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
# Initialize your custom AI handler
|
||||
pass
|
||||
|
||||
@property
|
||||
def deployment_id(self):
|
||||
# Return the deployment ID for your custom AI handler
|
||||
pass
|
||||
|
||||
async def chat_completion(self, model: str, system: str, user: str, temperature: float = 0.2):
|
||||
# Implement the chat completion method for your custom AI handler
|
||||
pass
|
Reference in New Issue
Block a user