Skip to content

Commit c9b0a80

Browse files
committed
Nick:
1 parent d02a8bc commit c9b0a80

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

apps/api/src/__tests__/e2e_extract/index.test.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,29 @@ describe("E2E Tests for Extract API Routes", () => {
150150
// expect(response.body).toHaveProperty("data");
151151
// expect(response.body.data?.pciDssCompliance).toBe(true);
152152
}, 60000);
153+
154+
it.concurrent("should return Greenhouse Applicant Tracking System for Abnormal Security", async () => {
155+
const response = await request(TEST_URL)
156+
.post("/v1/extract")
157+
.set("Authorization", `Bearer ${process.env.TEST_API_KEY}`)
158+
.set("Content-Type", "application/json")
159+
.send({
160+
urls: ["https://careers.abnormalsecurity.com/jobs/6119456003?gh_jid=6119456003"],
161+
prompt: "what applicant tracking system is this company using?",
162+
schema: {
163+
type: "object",
164+
properties: {
165+
isGreenhouseATS: { type: "boolean" },
166+
answer: { type: "string" }
167+
}
168+
},
169+
allowExternalLinks: true
170+
})
171+
172+
console.log(response.body);
173+
expect(response.statusCode).toBe(200);
174+
expect(response.body).toHaveProperty("data");
175+
expect(response.body.data?.isGreenhouseATS).toBe(true);
176+
}, 60000);
177+
153178
});

apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export async function generateOpenAICompletions(logger: Logger, options: Extract
123123

124124
const jsonCompletion = await openai.beta.chat.completions.parse({
125125
model,
126+
temperature: 0,
126127
messages: [
127128
{
128129
role: "system",

0 commit comments

Comments
 (0)