Configuration: recactor how it is written and handled
This commit is contained in:
parent
13e993b964
commit
7ff4abc3c0
10 changed files with 130 additions and 61 deletions
|
@ -2,7 +2,7 @@ import { ChatCompletionRequestMessage as OpenAIMessage } from "openai";
|
|||
import { Collection, Message as DiscordMessage, InteractionResponse } from "discord.js";
|
||||
import FoldToAscii from "fold-to-ascii";
|
||||
|
||||
import config from "./config";
|
||||
import { config } from "./index";
|
||||
import countTokens from "./tokenCounter";
|
||||
import { RequestMessage } from "./execution";
|
||||
|
||||
|
@ -115,7 +115,7 @@ export default function toOpenAIMessages(
|
|||
});
|
||||
}
|
||||
|
||||
rvalue.push(...config.systemPrompt().reverse());
|
||||
rvalue.push(...config.systemPrompt([...messages][0]).reverse());
|
||||
|
||||
return rvalue.reverse();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue