This commit is contained in:
harold 2025-03-21 22:39:23 +05:00
parent f2a00f35c4
commit c255685a4f
3 changed files with 2 additions and 4 deletions

View File

@ -6,6 +6,6 @@ APP__POSTGRES__HOST=postgres
APP__POSTGRES__PORT=5432 APP__POSTGRES__PORT=5432
APP__POSTGRES__PASSWORD=postgres APP__POSTGRES__PASSWORD=postgres
APP__RABBIT__URL=amqp://test:test@localhost:9072/ APP__RABBIT__URL=amqp://test:test@103.88.243.161:9072/
APP__GEMINI__API_KEY=AIzaSyCxGFlj221gTBSMGoftD4NjMioU88jI2cQ APP__GEMINI__API_KEY=AIzaSyCxGFlj221gTBSMGoftD4NjMioU88jI2cQ

1
gemini_worker/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.env_prod

View File

@ -55,12 +55,9 @@ class GoogleHelper:
messages: MessagesForSendToWorkersSchema, messages: MessagesForSendToWorkersSchema,
) -> ResponseFromGeminiSchema: ) -> ResponseFromGeminiSchema:
contents = self._serialize_messages_to_promt(messages) contents = self._serialize_messages_to_promt(messages)
for msg in messages.messages:
print(msg.text)
response = self._model.generate_content( response = self._model.generate_content(
contents=contents contents=contents
) )
print(response)
return self._serialize_response_to_json(response.text) return self._serialize_response_to_json(response.text)