Now handling temperature and max_tokens correctly
This commit is contained in:
4
bot.py
4
bot.py
@@ -164,8 +164,10 @@ def completions():
|
|||||||
messageArray = data.get("messages", [])
|
messageArray = data.get("messages", [])
|
||||||
stream = data.get("stream", False)
|
stream = data.get("stream", False)
|
||||||
model = data.get("model", "RatChat")
|
model = data.get("model", "RatChat")
|
||||||
|
temp = data.get("temperature", 0.7)
|
||||||
|
maxGen = data.get("max_tokens", 50)
|
||||||
chat = messageArray[-1]["content"] if messageArray else ""
|
chat = messageArray[-1]["content"] if messageArray else ""
|
||||||
msgobj = messageOBJ(chat)
|
msgobj = messageOBJ(chat,maxGen,temp)
|
||||||
msg_q.put(msgobj)
|
msg_q.put(msgobj)
|
||||||
|
|
||||||
if stream:
|
if stream:
|
||||||
|
|||||||
Reference in New Issue
Block a user