space nits
This commit is contained in:
parent
9a86ea79a2
commit
c88095e3fc
2 changed files with 4 additions and 4 deletions
|
@ -314,7 +314,7 @@ llama_tool_calls parse_tool_calls(llama_tool_call_style style, const json & tool
|
||||||
case llama_tool_call_style::Hermes2Pro:
|
case llama_tool_call_style::Hermes2Pro:
|
||||||
return parse_hermes_tool_calls(input);
|
return parse_hermes_tool_calls(input);
|
||||||
case llama_tool_call_style::MistralNemo:
|
case llama_tool_call_style::MistralNemo:
|
||||||
return parse_mistral_nemo_tool_calls(input);
|
return parse_mistral_nemo_tool_calls(input);
|
||||||
default:
|
default:
|
||||||
throw std::runtime_error("Unsupported tool call style");
|
throw std::runtime_error("Unsupported tool call style");
|
||||||
}
|
}
|
||||||
|
@ -390,7 +390,7 @@ llama_tool_call_handler llama_tool_call_handler_init(
|
||||||
}},
|
}},
|
||||||
{"required", json::array({"tool_call"})},
|
{"required", json::array({"tool_call"})},
|
||||||
};
|
};
|
||||||
const auto schema =
|
const auto schema =
|
||||||
allow_content
|
allow_content
|
||||||
? json {
|
? json {
|
||||||
{"anyOf", json::array({
|
{"anyOf", json::array({
|
||||||
|
@ -412,7 +412,7 @@ llama_tool_call_handler llama_tool_call_handler_init(
|
||||||
});
|
});
|
||||||
// TODO: add schema to system prompt.
|
// TODO: add schema to system prompt.
|
||||||
auto tweaked_messages = add_system(
|
auto tweaked_messages = add_system(
|
||||||
messages,
|
messages,
|
||||||
"Respond in JSON format, either with a request to call tools or with a response to the user's request. Here is the schema for all responses:\n\n```json\n" + schema.dump(2) + "\n```");
|
"Respond in JSON format, either with a request to call tools or with a response to the user's request. Here is the schema for all responses:\n\n```json\n" + schema.dump(2) + "\n```");
|
||||||
handler.prompt = tmpl.apply(tweaked_messages, tools, /* add_generation_prompt= */ true);
|
handler.prompt = tmpl.apply(tweaked_messages, tools, /* add_generation_prompt= */ true);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -12,4 +12,4 @@ COPY ./squid/ssl_cert/squidCA.crt /usr/local/share/ca-certificates/squidCA.crt
|
||||||
RUN chmod 644 /usr/local/share/ca-certificates/squidCA.crt && update-ca-certificates
|
RUN chmod 644 /usr/local/share/ca-certificates/squidCA.crt && update-ca-certificates
|
||||||
|
|
||||||
ENTRYPOINT [ "uvicorn" ]
|
ENTRYPOINT [ "uvicorn" ]
|
||||||
CMD ["tools:app", "--host", "0.0.0.0", "--port", "8088"]
|
CMD ["tools:app", "--host", "0.0.0.0", "--port", "8088"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue