diff --git a/src/configDefault.ts b/src/configDefault.ts index 65785a9..12ce515 100644 --- a/src/configDefault.ts +++ b/src/configDefault.ts @@ -8,7 +8,6 @@ import IQuota from "./IQuota"; import MessageCount from "./quota/messageCount"; export interface IConfigRequired { - readonly calendarParams: Intl.DateTimeFormatOptions; /** Tokens to authentiate with */ readonly tokens: { readonly Discord: string; @@ -52,15 +51,6 @@ function envAsNumber(key: string): number | undefined { } const defaultConfig: IConfigRequired = { - calendarParams: { - weekday: "short", - year: "numeric", - month: "short", - day: "numeric", - hour: "2-digit", - minute: "2-digit", - hour12: false, - }, tokens: { Discord: envAsString("TOKENS__DISCORD") ?? "", OpenAI: envAsString("TOKENS__OPENAI") ?? "", diff --git a/src/funcitonManager.ts b/src/funcitonManager.ts index 9bcb0ec..41e35c1 100644 --- a/src/funcitonManager.ts +++ b/src/funcitonManager.ts @@ -1,7 +1,5 @@ import { ChatCompletionCreateParams, ChatCompletionMessage, ChatCompletionMessageParam } from "openai/resources/chat"; -import { config } from "./index"; - type parameterMap = { string: string, number: number, @@ -53,7 +51,7 @@ export default class FunctionManager { store = new Map(); constructor() { - this.store.set("getTime", new GetTime()); + // TODO: import functions from functions directory } public getFunctions(): ChatCompletionFunctions[] { @@ -95,18 +93,3 @@ export default class FunctionManager { }; } } - -// buildins - -class GetTime extends OpenAIFunction> { - name = "getTime"; - description = "Gets current date and time with a timezone attached"; - parameters = { - type: "object" as const, - properties: {} as Record, - }; - - execute(): string { - return `${Intl.DateTimeFormat().resolvedOptions().timeZone}): ${new Date().toLocaleString("en-US", config.calendarParams)}`; - } -}