Markdown message (half) support
This commit is contained in:
1 parent
e07f8ee05f
commit
eb9a1ad9e8
9 files changed
+147
-92
No files matched your search
@@ -33,8 +33,8 @@ def get_llama_cpp_model(app, model_file):
|
||||
return last_model_instance
|
||||
|
||||
if last_model_instance is not None:
|
||||
#last_model_instance = None
|
||||
del last_model_instance
|
||||
last_model_instance = None
|
||||
#del last_model_instance
|
||||
|
||||
last_model_file = model_file
|
||||
last_model_instance = Llama(
|
||||
@@ -176,7 +176,7 @@ async def replicate_base_completion(app, model, input):
|
||||
|
||||
def run_replicate_inference_loop(replicate_client, model, input, content_stream):
|
||||
print("START INFERENCE")
|
||||
completion = replicate_client.run(model, input=input)
|
||||
completion = replicate_client.run(model, input=input, stream=True)
|
||||
for event in completion:
|
||||
if event:
|
||||
content_stream.feed(str(event))
|
||||
|
||||
Reference in new issue
Block a user