-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Here's my code for replicate:
elif "replicate" in model:
prompt = " ".join([message["content"] for message in messages])
output = replicate.run(
model,
input={
"prompt": prompt,
})
print(f"output: {output}")
response = ""
for item in output:
print(f"item: {item}")
response += item
new_response = {
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": response,
"role": "assistant"
}
}
]
}
print(f"new response: {new_response}")
response = new_response
Metadata
Metadata
Assignees
Labels
No labels