From ca1ccd7b91a2a3cc8c0596b9207a9779da301134 Mon Sep 17 00:00:00 2001 From: Brian Pham Date: Tue, 12 Dec 2023 23:56:20 +0800 Subject: [PATCH] update base --- pr_agent/algo/ai_handlers/base_ai_handler.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pr_agent/algo/ai_handlers/base_ai_handler.py b/pr_agent/algo/ai_handlers/base_ai_handler.py index 21050db9..7c6c3ddf 100644 --- a/pr_agent/algo/ai_handlers/base_ai_handler.py +++ b/pr_agent/algo/ai_handlers/base_ai_handler.py @@ -2,7 +2,7 @@ from abc import ABC, abstractmethod class BaseAiHandler(ABC): """ - This class defines the interface for an AI handler. + This class defines the interface for an AI handler to be used by the PR Agents. """ @abstractmethod @@ -15,6 +15,14 @@ class BaseAiHandler(ABC): pass @abstractmethod + """ + This method should be implemented to return a chat completion from the AI model. + params: + model: the name of the model to use for the chat completion + system: the system message string to use for the chat completion + user: the user message string to use for the chat completion + temperature: the temperature to use for the chat completion + """ async def chat_completion(self, model: str, system: str, user: str, temperature: float = 0.2): pass