mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
fix: pydantic2 error (#5172)
This commit is contained in:
parent
edf2047f04
commit
415022aa14
|
@ -107,7 +107,7 @@ class AgentChatAppGenerator(MessageBasedAppGenerator):
|
||||||
application_generate_entity = AgentChatAppGenerateEntity(
|
application_generate_entity = AgentChatAppGenerateEntity(
|
||||||
task_id=str(uuid.uuid4()),
|
task_id=str(uuid.uuid4()),
|
||||||
app_config=app_config,
|
app_config=app_config,
|
||||||
model_config=ModelConfigConverter.convert(app_config),
|
model_conf=ModelConfigConverter.convert(app_config),
|
||||||
conversation_id=conversation.id if conversation else None,
|
conversation_id=conversation.id if conversation else None,
|
||||||
inputs=conversation.inputs if conversation else self._get_cleaned_inputs(inputs, app_config),
|
inputs=conversation.inputs if conversation else self._get_cleaned_inputs(inputs, app_config),
|
||||||
query=query,
|
query=query,
|
||||||
|
|
|
@ -104,7 +104,7 @@ class ChatAppGenerator(MessageBasedAppGenerator):
|
||||||
application_generate_entity = ChatAppGenerateEntity(
|
application_generate_entity = ChatAppGenerateEntity(
|
||||||
task_id=str(uuid.uuid4()),
|
task_id=str(uuid.uuid4()),
|
||||||
app_config=app_config,
|
app_config=app_config,
|
||||||
model_config=ModelConfigConverter.convert(app_config),
|
model_conf=ModelConfigConverter.convert(app_config),
|
||||||
conversation_id=conversation.id if conversation else None,
|
conversation_id=conversation.id if conversation else None,
|
||||||
inputs=conversation.inputs if conversation else self._get_cleaned_inputs(inputs, app_config),
|
inputs=conversation.inputs if conversation else self._get_cleaned_inputs(inputs, app_config),
|
||||||
query=query,
|
query=query,
|
||||||
|
|
|
@ -98,7 +98,7 @@ class CompletionAppGenerator(MessageBasedAppGenerator):
|
||||||
application_generate_entity = CompletionAppGenerateEntity(
|
application_generate_entity = CompletionAppGenerateEntity(
|
||||||
task_id=str(uuid.uuid4()),
|
task_id=str(uuid.uuid4()),
|
||||||
app_config=app_config,
|
app_config=app_config,
|
||||||
model_config=ModelConfigConverter.convert(app_config),
|
model_conf=ModelConfigConverter.convert(app_config),
|
||||||
inputs=self._get_cleaned_inputs(inputs, app_config),
|
inputs=self._get_cleaned_inputs(inputs, app_config),
|
||||||
query=query,
|
query=query,
|
||||||
files=file_objs,
|
files=file_objs,
|
||||||
|
@ -257,7 +257,7 @@ class CompletionAppGenerator(MessageBasedAppGenerator):
|
||||||
application_generate_entity = CompletionAppGenerateEntity(
|
application_generate_entity = CompletionAppGenerateEntity(
|
||||||
task_id=str(uuid.uuid4()),
|
task_id=str(uuid.uuid4()),
|
||||||
app_config=app_config,
|
app_config=app_config,
|
||||||
model_config=ModelConfigConverter.convert(app_config),
|
model_conf=ModelConfigConverter.convert(app_config),
|
||||||
inputs=message.inputs,
|
inputs=message.inputs,
|
||||||
query=message.query,
|
query=message.query,
|
||||||
files=file_objs,
|
files=file_objs,
|
||||||
|
|
|
@ -313,7 +313,7 @@ class GoogleLargeLanguageModel(LargeLanguageModel):
|
||||||
delta=LLMResultChunkDelta(
|
delta=LLMResultChunkDelta(
|
||||||
index=index,
|
index=index,
|
||||||
message=assistant_prompt_message,
|
message=assistant_prompt_message,
|
||||||
finish_reason=chunk.candidates[0].finish_reason,
|
finish_reason=str(chunk.candidates[0].finish_reason),
|
||||||
usage=usage
|
usage=usage
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user