1
0
Fork 0
mirror of synced 2024-09-24 21:31:17 +12:00
This commit is contained in:
Martin McKeaveney 2024-09-18 14:21:10 +01:00
parent 9cbaa02f5f
commit 69b2bf9bdb
2 changed files with 3 additions and 4 deletions

View file

@ -262,4 +262,3 @@ export async function getSCIMConfig(): Promise<SCIMInnerConfig | undefined> {
export async function getAIConfig(): Promise<AIConfig | undefined> {
return getConfig<AIConfig>(ConfigType.AI)
}

View file

@ -35,7 +35,7 @@ jest.mock("@budibase/pro", () => ({
features: {
isAICustomConfigsEnabled: jest.fn(),
isBudibaseAIEnabled: jest.fn(),
}
},
}))
const mockedOpenAI = OpenAI as jest.MockedClass<typeof OpenAI>
@ -102,7 +102,7 @@ describe("test the openai action", () => {
)
const res = await runStep("OPENAI", {
prompt: OPENAI_PROMPT,jj
prompt: OPENAI_PROMPT,
})
expect(res.response).toEqual(
@ -118,7 +118,7 @@ describe("test the openai action", () => {
const prompt = "What is the meaning of life?"
await runStep("OPENAI", {
model: "gpt-4o-mini",
prompt
prompt,
})
expect(pro.ai.LargeLanguageModel).toHaveBeenCalledWith("gpt-4o-mini")