fix compiler warning about parens
This commit is contained in:
parent
f3e9f8b62a
commit
3841a163ef
1 changed files with 9 additions and 10 deletions
|
@ -281,16 +281,15 @@ static common_chat_params common_chat_params_init_generic(const common_chat_temp
|
||||||
|
|
||||||
// ResponseSchema is json_schema if set, otherwise string
|
// ResponseSchema is json_schema if set, otherwise string
|
||||||
|
|
||||||
Schema = ({thoughts: string} & ToolCallSchema) | {thoughts: string, response: ResponseSchema}
|
type SchemaToolRequired = {thoughts: string} & ToolCallSchema
|
||||||
SchemaToolRequired = {thoughts: string} & ToolCallSchema
|
type Schema = ({thoughts: string} & ToolCallSchema) | {thoughts: string, response: ResponseSchema}
|
||||||
|
|
||||||
|
type ToolCallSchema = SingleToolCallSchema | ParallelToolCallSchema
|
||||||
|
type SingleToolCallSchema = {tool_call: ToolCall}
|
||||||
|
type ParallelToolCallSchema = {tool_calls: ToolCall[]} // If parallel_tool_calls is true
|
||||||
|
|
||||||
ToolCallSchema = SingleToolCallSchema | ParallelToolCallSchema
|
type ToolCall = {name: string, arguments: ParametersSchema, id?: string} // id only if parallel_tool_calls is true
|
||||||
SingleToolCallSchema = {tool_call: ToolCall}
|
type ParametersSchema = tool1_params | tool2_params | ...
|
||||||
ParallelToolCallSchema = {tool_calls: ToolCall[]} // If parallel_tool_calls is true
|
|
||||||
|
|
||||||
ToolCall = {name: string, arguments: ParametersSchema, id?: string} // id only if parallel_tool_calls is true
|
|
||||||
ParametersSchema = tool1_params | tool2_params | ...
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TODO(ochafik): make the prompts configurable (jinja template?).
|
// TODO(ochafik): make the prompts configurable (jinja template?).
|
||||||
|
@ -1041,7 +1040,7 @@ common_chat_params common_chat_params_init(const common_chat_template & tmpl, co
|
||||||
|
|
||||||
// Use generic handler when forcing thoughts or JSON schema for final output
|
// Use generic handler when forcing thoughts or JSON schema for final output
|
||||||
// TODO: support thinking mode and/or JSON schema in handlers below this.
|
// TODO: support thinking mode and/or JSON schema in handlers below this.
|
||||||
if (inputs.think || !inputs.tools.is_null() && inputs.json_schema.is_object()) {
|
if (inputs.think || (!inputs.tools.is_null() && inputs.json_schema.is_object())) {
|
||||||
return common_chat_params_init_generic(tmpl, inputs);
|
return common_chat_params_init_generic(tmpl, inputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue