mirror of
https://github.com/matrixgpt/matrix-chatgpt-bot.git
synced 2024-09-30 13:05:50 +00:00
Add example CHATGPT_PROMPT_PREFIX
This commit is contained in:
parent
8ace02896e
commit
fba56ab5fd
@ -6,6 +6,8 @@ OPENAI_API_KEY=
|
|||||||
CHATGPT_CONTEXT=thread
|
CHATGPT_CONTEXT=thread
|
||||||
# (Optional) Explicitly set the ChatGPT model to be used by the API.
|
# (Optional) Explicitly set the ChatGPT model to be used by the API.
|
||||||
#CHATGPT_MODEL=text-chat-davinci-002-20221122
|
#CHATGPT_MODEL=text-chat-davinci-002-20221122
|
||||||
|
# (Optional) Explicitly set the prefix sent to model at the beginning of a conversation
|
||||||
|
#CHATGPT_PROMPT_PREFIX=Instructions:\nYou are ChatGPT, a large language model trained by OpenAI.
|
||||||
|
|
||||||
# Set data store settings
|
# Set data store settings
|
||||||
KEYV_BACKEND=file
|
KEYV_BACKEND=file
|
||||||
|
@ -122,7 +122,6 @@ export default class CommandHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const result = await sendChatGPTMessage(this.chatGPT, await bodyWithoutPrefix, storedConversation);
|
const result = await sendChatGPTMessage(this.chatGPT, await bodyWithoutPrefix, storedConversation);
|
||||||
console.log(result)
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this.client.setTyping(roomId, false, 500),
|
this.client.setTyping(roomId, false, 500),
|
||||||
sendReply(this.client, roomId, this.getRootEventId(event), `${result.response}`, MATRIX_THREADS, MATRIX_RICH_TEXT)
|
sendReply(this.client, roomId, this.getRootEventId(event), `${result.response}`, MATRIX_THREADS, MATRIX_RICH_TEXT)
|
||||||
|
Loading…
Reference in New Issue
Block a user