mirror of
https://github.com/katanemo/plano.git
synced 2026-05-03 21:02:56 +02:00
ArchFC endpoint integration (#94)
* integration * mopdify docker file * add params and fix python lint * fix empty context and tool calls * address comments * revert port * fix bug merge * fix environment * fix bug * fix compose * fix merge
This commit is contained in:
parent
1a7c1ad0a5
commit
17a643c410
9 changed files with 98 additions and 41 deletions
|
|
@ -473,7 +473,9 @@ impl StreamContext {
|
|||
|
||||
let model_resp = &arch_fc_response.choices[0];
|
||||
|
||||
if model_resp.message.tool_calls.is_none() {
|
||||
if model_resp.message.tool_calls.is_none()
|
||||
|| model_resp.message.tool_calls.as_ref().unwrap().is_empty()
|
||||
{
|
||||
// This means that Arch FC did not have enough information to resolve the function call
|
||||
// Arch FC probably responded with a message asking for more information.
|
||||
// Let's send the response back to the user to initalize lightweight dialog for parameter collection
|
||||
|
|
@ -488,12 +490,6 @@ impl StreamContext {
|
|||
}
|
||||
|
||||
let tool_calls = model_resp.message.tool_calls.as_ref().unwrap();
|
||||
if tool_calls.is_empty() {
|
||||
return self.send_server_error(
|
||||
"No tool calls found in function resolver response".to_string(),
|
||||
Some(StatusCode::BAD_REQUEST),
|
||||
);
|
||||
}
|
||||
|
||||
debug!("tool_call_details: {:?}", tool_calls);
|
||||
// extract all tool names
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue