From 120215f3eff97bb64bfd64adbf7e6c2c4ff49d2c Mon Sep 17 00:00:00 2001 From: Jeremy Moseley Date: Sun, 23 Jun 2024 14:04:10 -0700 Subject: [PATCH 1/2] Remove test that belongs in API. --- content.test.ts | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/content.test.ts b/content.test.ts index 468d60b..6f7597c 100644 --- a/content.test.ts +++ b/content.test.ts @@ -271,40 +271,3 @@ test("test streaming content", { timeout: 180000 }, async () => { await catalog.delete(); }); - -test("e2e content without any catalogs", { timeout: 180000 }, async () => { - testClient.configureOrg({ - companyName: "Cortex Click", - companyInfo: - "Cortex Click provides an AI platform for go-to-market. Cortex click allows you to index your enterprise knowledge base, and create agents called Cortexes that automate sales and marketing processes like SEO, content writing, RFP generation, customer support, sales document genearation such as security questionairres and more.", - personality: [ - "friendly and helpful", - "expert sales and marketing professional", - "experienced software developer", - ], - rules: [ - "never say anything disparaging about AI or LLMs", - "do not offer discounts", - ], - }); - - const cortex = await testClient.configureCortex( - `cortex-${Math.floor(Math.random() * 10000)}`, - { - friendlyName: "Cortex AI", - instructions: ["answer questions about the cortex click AI GTM platform"], - public: true, - }, - ); - - // create content - const title = "Overview of the Cortex Click AI GTM Platform"; - const prompt = - "Write a blog post about the Cortex Click AI GTM Platform. Elaborate on scenarios, customers, and appropriate verticals. Make sure to mention the impact that AI can have on sales and marketing teams."; - const content = await cortex.generateContent({ title, prompt }); - - expect(content.content.length).toBeGreaterThan(1); - expect(content.title).toBe(title); - expect(content.version).toBe(0); - expect(content.commands.length).toBe(1); -}); From 6c21747c516522a0168db0681ce2490f6da323ef Mon Sep 17 00:00:00 2001 From: Jeremy Moseley Date: Sun, 23 Jun 2024 14:04:43 -0700 Subject: [PATCH 2/2] Fix flakey test --- chat.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat.test.ts b/chat.test.ts index c65711f..1e9eb70 100644 --- a/chat.test.ts +++ b/chat.test.ts @@ -85,7 +85,7 @@ test("e2e catalog, cortex, and sync chat", { timeout: 60000 }, async () => { const nextPage = await chatList.nextPage(); expect(nextPage.chats.length).toBe(1); - expect(nextPage.chats[0].id).not.toBe(chat.id); + expect(nextPage.chats[0].id).not.toBe(chatList.chats[0].id); // delete await catalog.delete();