Skip to content

Commit

Permalink
puctire support
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryJKirk committed Nov 16, 2024
1 parent 93993e1 commit a53d6d4
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ class TalkingServiceChatGpt(
}
text = if (text == null && photoDescription == null) {
"<пользователь скинул хрень>"
} else if (text == null && photoDescription != null) {
"$photoDescription ${context.user.name} говорит: $text"
} else if (context.message.caption != null && photoDescription != null) {
"$photoDescription ${context.user.name} говорит: ${context.message.caption}"
} else {
"${context.user.name} говорит: $text"
}
chatMessages.add(ChatMessage(Role.User, content = "$photoDescription $text"))
chatMessages.add(ChatMessage(Role.User, content = text))
chatMessages.add(0, systemMessage)
val request = createRequest(chatMessages, useGpt4 = false)
val response = getOpenAIService().chatCompletion(request)
Expand Down Expand Up @@ -192,7 +192,7 @@ class TalkingServiceChatGpt(
model = ModelId("gpt-4o-mini"),
messages = listOf(
ChatMessage(
role = ChatRole.System,
role = ChatRole.User,
content = listOf(
ImagePart(url),
TextPart("Пользователь отправил эту картинку. Опиши ее.")
Expand Down

0 comments on commit a53d6d4

Please sign in to comment.