History

更新internal/translator/codex/openai/responses/codex_openai-responses_request.go

xxddff committed 9 months ago

Commit afe4c1b1 parent 865af9f1 file · +2 −2Browse files

Unified · Split

internal/translator/codex/openai/responses/codex_openai-responses_request.go+2−2
@@ -27,8 +27,8 @@ func ConvertOpenAIResponsesRequestToCodex(modelName string, inputRawJSON []byte, · 26 unmodified lines
27 rawJSON, _ = sjson.DeleteBytes(rawJSON, "top_p")27 rawJSON, _ = sjson.DeleteBytes(rawJSON, "top_p")
28 rawJSON, _ = sjson.DeleteBytes(rawJSON, "service_tier")28 rawJSON, _ = sjson.DeleteBytes(rawJSON, "service_tier")
29 29
30 // Delete user field as requested 30 // Delete the user field as it is not supported by the Codex upstream.
31 rawJSON, _ = sjson.DeleteBytes(rawJSON, "user") 31 rawJSON, _ = sjson.DeleteBytes(rawJSON, "user")
32 32
33 // Convert role "system" to "developer" in input array to comply with Codex API requirements.33 // Convert role "system" to "developer" in input array to comply with Codex API requirements.
34 rawJSON = convertSystemRoleToDeveloper(rawJSON)34 rawJSON = convertSystemRoleToDeveloper(rawJSON)