chore: Clean input to openai generic client (#239)
This commit is contained in:
parent
9f3dd5552a
commit
425b35ba2d
1 changed files with 1 additions and 0 deletions
|
|
@ -89,6 +89,7 @@ class OpenAIGenericClient(LLMClient):
|
||||||
) -> dict[str, typing.Any]:
|
) -> dict[str, typing.Any]:
|
||||||
openai_messages: list[ChatCompletionMessageParam] = []
|
openai_messages: list[ChatCompletionMessageParam] = []
|
||||||
for m in messages:
|
for m in messages:
|
||||||
|
m.content = self._clean_input(m.content)
|
||||||
if m.role == 'user':
|
if m.role == 'user':
|
||||||
openai_messages.append({'role': 'user', 'content': m.content})
|
openai_messages.append({'role': 'user', 'content': m.content})
|
||||||
elif m.role == 'system':
|
elif m.role == 'system':
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue