File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
scraper/scrapeURL/transformers Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -150,4 +150,29 @@ describe("E2E Tests for Extract API Routes", () => {
150
150
// expect(response.body).toHaveProperty("data");
151
151
// expect(response.body.data?.pciDssCompliance).toBe(true);
152
152
} , 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
+
153
178
} ) ;
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ export async function generateOpenAICompletions(logger: Logger, options: Extract
123
123
124
124
const jsonCompletion = await openai . beta . chat . completions . parse ( {
125
125
model,
126
+ temperature : 0 ,
126
127
messages : [
127
128
{
128
129
role : "system" ,
You can’t perform that action at this time.
0 commit comments