|
@@ -214,8 +214,12 @@ func ChatCompletionsRequestToResponsesRequest(req *dto.GeneralOpenAIRequest) (*d
|
|
|
for _, part := range parts {
|
|
for _, part := range parts {
|
|
|
switch part.Type {
|
|
switch part.Type {
|
|
|
case dto.ContentTypeText:
|
|
case dto.ContentTypeText:
|
|
|
|
|
+ textType := "input_text"
|
|
|
|
|
+ if role == "assistant" {
|
|
|
|
|
+ textType = "output_text"
|
|
|
|
|
+ }
|
|
|
contentParts = append(contentParts, map[string]any{
|
|
contentParts = append(contentParts, map[string]any{
|
|
|
- "type": "input_text",
|
|
|
|
|
|
|
+ "type": textType,
|
|
|
"text": part.Text,
|
|
"text": part.Text,
|
|
|
})
|
|
})
|
|
|
case dto.ContentTypeImageURL:
|
|
case dto.ContentTypeImageURL:
|