fixup type mismatches between rtvi data structures and together.py
This commit is contained in:
@@ -222,7 +222,7 @@ class RTVILLMFunctionCallResultData(BaseModel):
|
|||||||
function_name: str
|
function_name: str
|
||||||
tool_call_id: str
|
tool_call_id: str
|
||||||
arguments: dict
|
arguments: dict
|
||||||
result: dict
|
result: dict | str
|
||||||
|
|
||||||
|
|
||||||
class RTVITranscriptionMessageData(BaseModel):
|
class RTVITranscriptionMessageData(BaseModel):
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ class TogetherLLMService(LLMService):
|
|||||||
try:
|
try:
|
||||||
arguments = json.loads(args_string)
|
arguments = json.loads(args_string)
|
||||||
await self.call_function(context=context,
|
await self.call_function(context=context,
|
||||||
tool_call_id=uuid.uuid4(),
|
tool_call_id=str(uuid.uuid4()),
|
||||||
function_name=function_name,
|
function_name=function_name,
|
||||||
arguments=arguments)
|
arguments=arguments)
|
||||||
return
|
return
|
||||||
@@ -301,7 +301,8 @@ class TogetherAssistantContextAggregator(LLMAssistantContextAggregator):
|
|||||||
self._function_call_result = None
|
self._function_call_result = None
|
||||||
self._context.add_message({
|
self._context.add_message({
|
||||||
"role": "tool",
|
"role": "tool",
|
||||||
"content": frame.result
|
# Together expects the content here to be a string, so stringify it
|
||||||
|
"content": str(frame.result)
|
||||||
})
|
})
|
||||||
run_llm = True
|
run_llm = True
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user