Allow automations to pass any conversation_id for Google Generative AI (#134251)

This commit is contained in:
tronikos 2024-12-31 12:52:29 -08:00 committed by GitHub
parent 53ca31c112
commit f1ad3040b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -204,9 +204,7 @@ class GoogleGenerativeAIConversationEntity(
"""Process a sentence.""" """Process a sentence."""
result = conversation.ConversationResult( result = conversation.ConversationResult(
response=intent.IntentResponse(language=user_input.language), response=intent.IntentResponse(language=user_input.language),
conversation_id=user_input.conversation_id conversation_id=user_input.conversation_id or ulid.ulid_now(),
if user_input.conversation_id in self.history
else ulid.ulid_now(),
) )
assert result.conversation_id assert result.conversation_id