mirror of
https://github.com/OpenBMB/ChatDev.git
synced 2026-06-05 07:00:48 +00:00
ChatCompletion
This commit is contained in:
parent
74f94da64a
commit
59965ab0bd
@ -69,7 +69,7 @@ class OpenAIModel(ModelBackend):
|
|||||||
num_max_completion_tokens = num_max_token - num_prompt_tokens
|
num_max_completion_tokens = num_max_token - num_prompt_tokens
|
||||||
self.model_config_dict['max_tokens'] = num_max_completion_tokens
|
self.model_config_dict['max_tokens'] = num_max_completion_tokens
|
||||||
print("using model: {}".format(self.model_type.value))
|
print("using model: {}".format(self.model_type.value))
|
||||||
response = openai.chat.completions.create(*args, **kwargs,
|
response = openai.ChatCompletion.create(*args, **kwargs,
|
||||||
model=self.model_type.value,
|
model=self.model_type.value,
|
||||||
**self.model_config_dict)
|
**self.model_config_dict)
|
||||||
cost = prompt_cost(
|
cost = prompt_cost(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user