fix: chat agent integration, llama inference bug
This commit is contained in:
1 parent
17d3041a60
commit
e3e910df2c
2 files changed
+13
-5
No files matched your search
@@ -71,7 +71,7 @@ def build_messages(system_prompt="", instruction=None, input=None, messages=None
|
||||
raise Exception("Unsupported message type: " + repr(type(message)))
|
||||
|
||||
# shouldn't be necessary. maybe an assert instead?
|
||||
messages = [normalize(msg) for msg in messages]
|
||||
messages = [normalize(msg) for msg in messages or []]
|
||||
# default user message
|
||||
prompt = input
|
||||
|
||||
@@ -141,7 +141,7 @@ async def chat_completion(app,
|
||||
# llama.cpp
|
||||
async def local_chat_completion(app, messages, model, tools=[], opts={}, agent_run=None):
|
||||
if agent_run:
|
||||
content_stream = agent_run.stream
|
||||
content_stream = agent_run.get_output_stream()
|
||||
else:
|
||||
content_stream = Stream(app)
|
||||
|
||||
|
||||
Reference in new issue
Block a user