allow_passthrough = false;
# Check messages that are apparent ham (no action and negative score)
allow_ham = false;
+ # default send response_format field { type = "json_object" }
+ include_response_format = true,
}
]])
return
model = settings.model,
max_tokens = settings.max_tokens,
temperature = settings.temperature,
- response_format = { type = "json_object" },
messages = {
{
role = 'system',
}
}
+ -- Conditionally add response_format
+ if settings.include_response_format then
+ body.response_format = { type = "json_object" }
+ end
+
upstream = settings.upstreams:get_upstream_round_robin()
local http_params = {
url = settings.url,
model = settings.model,
max_tokens = settings.max_tokens,
temperature = settings.temperature,
- response_format = { type = "json_object" },
messages = {
{
role = 'system',
}
}
+ -- Conditionally add response_format
+ if settings.include_response_format then
+ body.response_format = { type = "json_object" }
+ end
+
upstream = settings.upstreams:get_upstream_round_robin()
local http_params = {
url = settings.url,
parent = id,
score = -2.0,
})
-end
\ No newline at end of file
+end