|
@@ -6,7 +6,7 @@ import openai |
|
|
|
|
|
|
|
|
class Talk: |
|
|
class Talk: |
|
|
max_tokens_count: int = 100 |
|
|
max_tokens_count: int = 100 |
|
|
responses_count: int = 5 |
|
|
|
|
|
|
|
|
responses_count: int = 1 |
|
|
temperature: float = .7 |
|
|
temperature: float = .7 |
|
|
top_p: int = 1 |
|
|
top_p: int = 1 |
|
|
|
|
|
|
|
@@ -20,7 +20,7 @@ class Talk: |
|
|
@classmethod |
|
|
@classmethod |
|
|
def __get_answers (cls, message: str) -> list[str]: |
|
|
def __get_answers (cls, message: str) -> list[str]: |
|
|
return openai.Completion.create ( |
|
|
return openai.Completion.create ( |
|
|
model = 'text-davinci-002', |
|
|
|
|
|
|
|
|
engine = 'text-davinci-002', |
|
|
prompt = message, |
|
|
prompt = message, |
|
|
max_tokens = cls.max_tokens_count, |
|
|
max_tokens = cls.max_tokens_count, |
|
|
n = cls.temperature, |
|
|
n = cls.temperature, |
|
|