This commit is contained in:
parent
11a2cb6966
commit
1a6353592b
|
@ -58,12 +58,11 @@ class AnthropicApiClient(ApiClient):
|
||||||
})
|
})
|
||||||
|
|
||||||
async def generate(self, command_info: CommandInfo, matrix_gpt_data: str = None):
|
async def generate(self, command_info: CommandInfo, matrix_gpt_data: str = None):
|
||||||
print(self.context)
|
|
||||||
r = await self._create_client(command_info.api_base).messages.create(
|
r = await self._create_client(command_info.api_base).messages.create(
|
||||||
model=command_info.model,
|
model=command_info.model,
|
||||||
max_tokens=None if command_info.max_tokens == 0 else command_info.max_tokens,
|
max_tokens=None if command_info.max_tokens == 0 else command_info.max_tokens,
|
||||||
temperature=command_info.temperature,
|
temperature=command_info.temperature,
|
||||||
system='' if not command_info.system_prompt else command_info.system_prompt,
|
system=None if not command_info.system_prompt else command_info.system_prompt,
|
||||||
messages=self.context
|
messages=self.context
|
||||||
)
|
)
|
||||||
return r.content[0].text, None
|
return r.content[0].text, None
|
||||||
|
|
Loading…
Reference in New Issue