update rust side to handle default targets

This commit is contained in:
Adil Hafeez 2025-03-03 15:36:31 -08:00
parent 6be6cc6346
commit 866494da27
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
5 changed files with 113 additions and 76 deletions

View file

@ -171,7 +171,7 @@ class ArchBaseHandler:
assert processed_messages[-1]["role"] == "user"
if extra_instruction:
processed_messages[-1]["content"] += extra_instruction
processed_messages[-1]["content"] += "\n" + extra_instruction
# keep the first system message and shift conversation if the total token length exceeds the limit
def truncate_messages(messages: List[Dict[str, Any]]):

View file

@ -104,7 +104,7 @@ async def function_calling(req: ChatMessage, res: Response):
res.status_code = 500
error_messages = f"[Arch-Function] - Error in ChatCompletion: {e}"
else:
# TODO: make a call to default LLM to get responses
# no intent matched
intent_response.metadata = {
"intent_latency": str(round(intent_latency * 1000, 3)),
}