Fix OpenAI API usage

This commit is contained in:
Cyber MacGeddon 2024-08-12 15:34:56 +01:00
parent d94f730dfd
commit 77541330bd

View file

@ -80,10 +80,10 @@ class Processor(ConsumerProducer):
}
)
print(resp, flush=True)
print(resp.choices[0].message.content, flush=True)
print("Send response...", flush=True)
r = TextCompletionResponse(response=resp)
r = TextCompletionResponse(response=resp.choices[0].message.content)
self.send(r, properties={"id": id})
print("Done.", flush=True)