Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve Assistant RunStepDetails and support array content for MessageRequest#386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
MarkenChen wants to merge5 commits intoaallam:main
base:main
Choose a base branch
Loading
fromMarkenChen:assistant-message
Open
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
chore: update to 4.0.1
  • Loading branch information
marken committedFeb 28, 2025
commit1073f7df6073253e6ebfe9c421cba9171c106bc6
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,7 +31,7 @@ public sealed interface MessageContent {
@BetaOpenAI
@Serializable
@SerialName("image_file")
public data classImageFile(
public data classImage(
/**
* The File ID of the image in the message content.
*/
Expand DownExpand Up@@ -66,6 +66,7 @@ public sealed interface MessageContent {
) : MessageContent

}

/**
* The text content of the message value and annotations.
*/
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,6 @@ package com.aallam.openai.api.message
import com.aallam.openai.api.BetaOpenAI
import com.aallam.openai.api.core.Role
import com.aallam.openai.api.message.MessageRequestContent.ListContent
import com.aallam.openai.api.message.MessageRequestContent.TextContent
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

Expand All@@ -19,7 +18,7 @@ public class MessageRequest(
@SerialName("role") public val role: Role,

/**
* The content of the message.
* The content of the message. Change this field to support multi-type content.
*/
@SerialName("content") public val messageContent: MessageRequestContent,

Expand All@@ -42,7 +41,7 @@ public class MessageRequest(
metadata: Map<String, String>? = null,
) : this(
role = role,
messageContent = TextContent(content),
messageContent =MessageRequestContent.TextContent(content),
attachments = attachments,
metadata = metadata
)
Expand All@@ -61,7 +60,7 @@ public class MessageRequest(

public val content: String
get() = when (messageContent) {
is TextContent -> messageContent.content
isMessageRequestContent.TextContent -> messageContent.content
else -> error("Content is not text")
}
}
Expand DownExpand Up@@ -127,4 +126,3 @@ public class MessageRequestBuilder {
)
}
}

Original file line numberDiff line numberDiff line change
Expand Up@@ -3,9 +3,7 @@ package com.aallam.openai.api.message
import com.aallam.openai.api.BetaOpenAI
import com.aallam.openai.api.OpenAIDsl
import com.aallam.openai.api.file.FileId
import com.aallam.openai.api.message.MessageRequestPart.ImageFilePart
import com.aallam.openai.api.message.MessageRequestPart.ImageUrlPart
import com.aallam.openai.api.message.MessageRequestPart.TextPart
import com.aallam.openai.api.message.MessageRequestPart.*
import com.aallam.openai.api.message.internal.MessageRequestContentSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp