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
|
@ -1,6 +1,6 @@
|
|||
import { ChatCompletionFunctions, ChatCompletionRequestMessage, ChatCompletionRequestMessageFunctionCall } from "openai";
|
||||
|
||||
import config from "./config";
|
||||
import { config } from "./index";
|
||||
|
||||
type parameterMap = {
|
||||
string: string,
|
||||
|
@ -104,6 +104,6 @@ class GetTime extends OpenAIFunction<Record<string, never>> {
|
|||
};
|
||||
|
||||
execute(): string {
|
||||
return `${Intl.DateTimeFormat().resolvedOptions().timeZone}): ${new Date().toLocaleString("en-US", config.calendarConfig)}`;
|
||||
return `${Intl.DateTimeFormat().resolvedOptions().timeZone}): ${new Date().toLocaleString("en-US", config.calendarParams)}`;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue