|
10 | 10 | load_dotenv() |
11 | 11 |
|
12 | 12 |
|
| 13 | +schema= """{ |
| 14 | + "Job Postings": { |
| 15 | + "Company x": [ |
| 16 | + { |
| 17 | + "title": "...", |
| 18 | + "description": "...", |
| 19 | + "location": "...", |
| 20 | + "date_posted": "..", |
| 21 | + "requirements": ["...", "...", "..."] |
| 22 | + }, |
| 23 | + { |
| 24 | + "title": "...", |
| 25 | + "description": "...", |
| 26 | + "location": "...", |
| 27 | + "date_posted": "..", |
| 28 | + "requirements": ["...", "...", "..."] |
| 29 | + } |
| 30 | + ], |
| 31 | + "Company y": [ |
| 32 | + { |
| 33 | + "title": "...", |
| 34 | + "description": "...", |
| 35 | + "location": "...", |
| 36 | + "date_posted": "..", |
| 37 | + "requirements": ["...", "...", "..."] |
| 38 | + } |
| 39 | + ] |
| 40 | + } |
| 41 | +}""" |
| 42 | + |
13 | 43 | # ************************************************ |
14 | 44 | # Define the configuration for the graph |
15 | 45 | # ************************************************ |
|
19 | 49 | graph_config = { |
20 | 50 | "llm": { |
21 | 51 | "api_key": openai_key, |
22 | | - "model": "gpt-4o", |
| 52 | + "model": "gpt-3.5-turbo", |
23 | 53 | }, |
24 | 54 | "verbose": True, |
25 | 55 | "headless": False, |
| 56 | + "schema": schema, |
26 | 57 | } |
27 | 58 |
|
28 | | -schema= """{ |
29 | | - "Job Postings": { |
30 | | - "Company A": [ |
31 | | - { |
32 | | - "title": "Software Engineer", |
33 | | - "description": "Develop and maintain software applications.", |
34 | | - "location": "New York, NY", |
35 | | - "date_posted": "2024-05-01", |
36 | | - "requirements": ["Python", "Django", "REST APIs"] |
37 | | - }, |
38 | | - { |
39 | | - "title": "Data Scientist", |
40 | | - "description": "Analyze and interpret complex data.", |
41 | | - "location": "San Francisco, CA", |
42 | | - "date_posted": "2024-05-05", |
43 | | - "requirements": ["Python", "Machine Learning", "SQL"] |
44 | | - } |
45 | | - ], |
46 | | - "Company B": [ |
47 | | - { |
48 | | - "title": "Project Manager", |
49 | | - "description": "Manage software development projects.", |
50 | | - "location": "Boston, MA", |
51 | | - "date_posted": "2024-04-20", |
52 | | - "requirements": ["Project Management", "Agile", "Scrum"] |
53 | | - } |
54 | | - ] |
55 | | - } |
56 | | -}""" |
| 59 | + |
57 | 60 |
|
58 | 61 | multiple_search_graph = MultipleSearchGraph( |
59 | 62 | prompt="List me all the projects with their description", |
60 | | - source= ["https://perinim.github.io/projects/", "https://perinim.github.io/projects/"], |
| 63 | + source= [ |
| 64 | + "https://www.linkedin.com/jobs/machine-learning-engineer-offerte-di-lavoro/?currentJobId=3889037104&originalSubdomain=it", |
| 65 | + "https://www.glassdoor.com/Job/italy-machine-learning-engineer-jobs-SRCH_IL.0,5_IN120_KO6,31.html", |
| 66 | + "https://it.indeed.com/jobs?q=ML+engineer&vjk=3c2e6d27601ffaaa" |
| 67 | + ], |
61 | 68 | config=graph_config, |
62 | | - schema = schema |
63 | 69 | ) |
64 | 70 |
|
65 | 71 | result = multiple_search_graph.run() |
|
0 commit comments