fix: pydantic2 error (#5172)

This commit is contained in:
takatost 2024-06-14 03:05:04 +08:00 committed by GitHub
parent edf2047f04
commit 415022aa14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -107,7 +107,7 @@ class AgentChatAppGenerator(MessageBasedAppGenerator):
application_generate_entity = AgentChatAppGenerateEntity(
task_id=str(uuid.uuid4()),
app_config=app_config,
model_config=ModelConfigConverter.convert(app_config),
model_conf=ModelConfigConverter.convert(app_config),
conversation_id=conversation.id if conversation else None,
inputs=conversation.inputs if conversation else self._get_cleaned_inputs(inputs, app_config),
query=query,

View File

@ -104,7 +104,7 @@ class ChatAppGenerator(MessageBasedAppGenerator):
application_generate_entity = ChatAppGenerateEntity(
task_id=str(uuid.uuid4()),
app_config=app_config,
model_config=ModelConfigConverter.convert(app_config),
model_conf=ModelConfigConverter.convert(app_config),
conversation_id=conversation.id if conversation else None,
inputs=conversation.inputs if conversation else self._get_cleaned_inputs(inputs, app_config),
query=query,

View File

@ -98,7 +98,7 @@ class CompletionAppGenerator(MessageBasedAppGenerator):
application_generate_entity = CompletionAppGenerateEntity(
task_id=str(uuid.uuid4()),
app_config=app_config,
model_config=ModelConfigConverter.convert(app_config),
model_conf=ModelConfigConverter.convert(app_config),
inputs=self._get_cleaned_inputs(inputs, app_config),
query=query,
files=file_objs,
@ -257,7 +257,7 @@ class CompletionAppGenerator(MessageBasedAppGenerator):
application_generate_entity = CompletionAppGenerateEntity(
task_id=str(uuid.uuid4()),
app_config=app_config,
model_config=ModelConfigConverter.convert(app_config),
model_conf=ModelConfigConverter.convert(app_config),
inputs=message.inputs,
query=message.query,
files=file_objs,

View File

@ -313,7 +313,7 @@ class GoogleLargeLanguageModel(LargeLanguageModel):
delta=LLMResultChunkDelta(
index=index,
message=assistant_prompt_message,
finish_reason=chunk.candidates[0].finish_reason,
finish_reason=str(chunk.candidates[0].finish_reason),
usage=usage
)
)