feder-cr / Auto_Jobs_Applier_AIHawk

Auto_Jobs_Applier_AIHawk is a tool that automates the jobs application process. Utilizing artificial intelligence, it enables users to apply for multiple job offers in an automated and personalized way.
Other
17.97k stars 2.65k forks source link

[BUG]: Bot not running RUNTIME Error #556

Open virajtshah opened 5 days ago

virajtshah commented 5 days ago

Describe the bug

I am trying to run bot but its giving me runtime error for YAML File. I checked YAML FILE for error. ITs not having any Issue

Steps to reproduce

Its on modified yaml for resume and config

Expected behavior

Bot should run

Actual behavior

Runtime Error for parsing YAML file

Branch

None

Branch name

Main

Python version

3.12.4

LLM Used

Ollama

Model used

llama3.2:1b

Additional context

(my_env) (base) C:\Users\viraj\OneDrive\Desktop\AI\LAI>python main.py
2024-10-17 00:49:23.879 | ERROR    | __main__:main:218 - Runtime error: Error running the bot: Error parsing YAML file.

(my_env) (base) C:\Users\viraj\OneDrive\Desktop\AI\LAI>``

I have made use of custom resume schema

# YAML Schema for plain_text_resume.yaml

personal_information:
  type: object
  properties:
    name: {type: string}
    surname: {type: string}
    date_of_birth: {type: string, format: date}
    country: {type: string}
    zip_code: {type: string, pattern: "^[0-9]{5,10}$"}
    city: {type: string}
    address: {type: string}
    phone_prefix: {type: string, format: phone_prefix}
    phone: {type: string, format: phone}
    email: {type: string, format: email}
    #github: {type: string, format: uri}
    linkedin: {type: string, format: uri}
  required: [name, surname, country, city, zip_code, phone_prefix, phone, email]

Skills:
  type: array
  items: {type: string}

education_details:
  type: array
  items:
    type: object
    properties:
      degree: {type: string}
      university: {type: string}
      gpa: {type: string}
      graduation_year: {type: string}
      field_of_study: {type: string}
      # exam:
      #   type: object
      #   additionalProperties: {type: string}
    required: [degree, university, gpa, graduation_year, field_of_study]

experience_details:
  type: array
  items:
    type: object
    properties:
      position: {type: string}
      company: {type: string}
      employment_period: {type: string}
      location: {type: string}
      industry: {type: string}
      key_responsibilities:
        type: object
        additionalProperties: {type: string}
      # skills_acquired:
      #   type: array
      #   items: {type: string}
    required: [position, company, employment_period, location, industry, key_responsibilities]

# projects:
#   type: array
#   items:
#     type: object
#     properties:
#       name: {type: string}
#       description: {type: string}
#       link: {type: string, format: uri}
#     required: [name, description]

achievements:
  type: array
  items:
    type: object
    properties:
      name: {type: string}
      description: {type: string}
    required: [name, description]

certifications:
  type: array
  items: {type: string}

# languages:
#   type: array
#   items:
#     type: object
#     properties:
#       language: {type: string}
#       proficiency: {type: string, enum: [Native, Fluent, Intermediate, Beginner]}
#     required: [language, proficiency]

# interests:
#   type: array
#   items: {type: string}

availability:
  type: object
  properties:
    notice_period: {type: string}
  required: [notice_period]

salary_expectations:
  type: object
  properties:
    salary_range_usd: {type: string}
  required: [salary_range_usd]

self_identification:
  type: object
  properties:
    gender: {type: string}
    pronouns: {type: string}
    veteran: {type: string, enum: [Yes, No]}
    disability: {type: string, enum: [Yes, No]}
    ethnicity: {type: string}
  required: [gender, pronouns, veteran, disability, ethnicity]

legal_authorization:
  type: object
  properties:
    eu_work_authorization: {type: string, enum: [Yes, No]}
    us_work_authorization: {type: string, enum: [Yes, No]}
    requires_us_visa: {type: string, enum: [Yes, No]}
    requires_us_sponsorship: {type: string, enum: [Yes, No]}
    requires_eu_visa: {type: string, enum: [Yes, No]}
    legally_allowed_to_work_in_eu: {type: string, enum: [Yes, No]}
    legally_allowed_to_work_in_us: {type: string, enum: [Yes, No]}
    requires_eu_sponsorship: {type: string, enum: [Yes, No]}
  required: [eu_work_authorization, us_work_authorization, requires_us_visa, requires_us_sponsorship, requires_eu_visa, legally_allowed_to_work_in_eu, legally_allowed_to_work_in_us, requires_eu_sponsorship]

work_preferences:
  type: object
  properties:
    remote_work: {type: string, enum: [Yes, No]}
    in_person_work: {type: string, enum: [Yes, No]}
    open_to_relocation: {type: string, enum: [Yes, No]}
    willing_to_complete_assessments: {type: string, enum: [Yes, No]}
    willing_to_undergo_drug_tests: {type: string, enum: [Yes, No]}
    willing_to_undergo_background_checks: {type: string, enum: [Yes, No]}
  required: [remote_work, in_person_work, open_to_relocation, willing_to_complete_assessments, willing_to_undergo_drug_tests, willing_to_undergo_background_checks]

Plain Resume YAML

personal_information:
  name: "Viraj"
  surname: "Shah"
  country: "US"
  city: "Jersey City"
  address: "178 Beacon Ave, Apt 2"
  zip_code: "07306"
  phone_prefix: "+1"
  phone: "5512333556"
  email: "virajshah1155@gmail.com"
  linkedin: "https://www.linkedin.com/in/abc"

Skills:
  - "Programming Languages: Python (Pandas, NumPy, Matplotlib, Scikit-learn, Spark), R, SQL"
  - "Databases and BI: MySQL, MS SQL Server, Oracle, Tableau, Power BI, MS Excel, Snowflake, MS Access"
  - "Cloud & Technologies: Microsoft Azure, Google Cloud Platform (GCP)"
  - "Data Analysis: Exploratory Data Analysis, Data Visualization, Data Wrangling, Data Mining, Data Modelling"
  - "Machine Learning: Sentiment Analysis, Tensor Flow, Logistic Regression, Naive Bayes, K-Nearest Neighbors, Random Forest"

education_details:
  - education_level: "Masters Degree"
    institution: "abc"
    field_of_study: "Computer and Information Science"
    final_evaluation_grade: "3.73"
    start_date: "2021"
    year_of_completion: "2023"

  - education_level: "Bachelors Degree"
    institution: "abc"
    field_of_study: "Electronics and Computer Engineering
    final_evaluation_grade: "3.75"
    start_date: "2017"
    year_of_completion: "2021"

experience_details:
  - position: "Data Analyst"
    company: "abc"
    employment_period: "04/2024 - 06/2024"
    location: "Redmond, WA"
    industry: "Technology"
    key_responsibilities:
      responsibility_1: "Conducted data wrangling process on 50K+ rows using Python libraries (Pandas, NumPy, SciPy), identifying data anomalies and trends resulting in clean and structured data enhancing data quality and usability for data modelling"
      responsibility_2: "Executed data validation scripts using SQL using range checks, data type and unique constraints rectifying discrepancies, increasing data integrity by 10% minimizing reporting errors in financial dashboards"
      responsibility_3: "Collaborated with business stakeholders evaluating KPIs (Response Time, Throughput, Error Rate and Uptime) applying DAX expressions for advanced calculations, resulting in customized dashboards providing insights on app’s operational efficiency"
      responsibility_4: "Pioneered Power BI dashboards to visualize incident, latency data across North Europe, East US2 regions, resulting in optimum resource allocation across multiple regions saving $10k "

  - position: "Data Analyst"
    company: "abc"
    employment_period: "07/2023 - 03/2024"
    location: "Princeton, NJ"
    industry: "Consulting"
    key_responsibilities:
      - responsibility_1: "Implemented SQL-based data optimization techniques such as indexing and query optimization, reducing average query execution time by 10% and enabling faster data retrieval for real-time dashboards"
      - responsibility_2: "Led data validation efforts, writing and running SQL scripts to ensure data accuracy across multiple data sources, reducing data discrepancies by 5% and increasing reporting reliability"
      - responsibility_3: "Created Tableau dashboards to monitor and analyze KPIs such as customer acquisition cost (CAC), and monthly recurring revenue (MRR), improving visibility into financial performance and leading to a 3% reduction in CAC"
      - responsibility_4: "Integrated Tableau with Google Analytics and CRM systems via SQL, allowing clients to monitor key metrics such as website traffic, lead generation, and conversion rates, boosting data-driven decision-making by 6%"
      - responsibility_5: "Collaborated with client teams to identify bottlenecks in supply chain KPIs using Tableau, enabling data-driven improvements that reduced supply chain inefficiencies by 18% enhancing overall productivity"

  - position: "Graduate Teaching Assistant"
    company: "abc"
    employment_period: "09/2022 - 12/2022"
    location: "New York, NY"
    industry: "Education"
    key_responsibilities:
      - responsibility_1: "Curated the class material encompassing Python, R, and SQL for data analysis and data visualization, and mentored a cohort of 30+ students on core concepts "
      - responsibility_2: "Generated reports for 40 students by monitoring student progress and grading assignments, providing constructive feedback for student’s improvement"

  - position: "Data Analyst"
    company: "abc"
    employment_period: "07/2019 - 06/2020"
    location: "Mumbai, Maharashtra"
    industry: "Manufacturing"
    key_responsibilities:
      responsibility_1: "Developed advanced Excel models using VLOOKUP, INDEX-MATCH, and array formulas to integrate sales data from 10 clients, reducing errors by 6% and increasing data analysis team efficiency by 8%"
      responsibility_2: "Created dynamic Excel dashboards using PivotTables and charting tools, streamlining monthly financial reporting processes and saving 4 hours of analysis time per week"
      responsibility_3: "Implemented data quality checks using Excels conditional formatting and data validation features, identifying and correcting inconsistencies in financial datasets, leading to a 15% improvement in reporting accuracy"
      responsibility_4: "Designed a forecasting model using Excels trend functions and scenario manager, improving sales predictions accuracy by 4%, supporting inventory management decisions that led to a 8% reduction in excess stock"
      responsibility_5: "Optimized SQL queries for efficient data extraction from large datasets (20k+ rows) in MySQL database, reducing processing time by 30% and ensuring scalability for growing data volumes"

achievements:
  - name: "Zebra-NYIT Hackathon"
    description: "1st place in Zebra-NYIT Hackathon"
  - name: "New York Metro ACM College Data Science Challenge"
    description: "Winner of New York Metro ACM College Data Science Challenge"

certifications:
  - "Google Cloud Participation"
  - "Deep Learning Specialization"
  - "Natural Language Processing"

availability:
  notice_period: "Immediately"

salary_expectations:
  salary_range_usd: "90000 - 110000"

self_identification:
  gender: "Male"
  pronouns: "He/Him"
  veteran: "No"
  disability: "No"
  ethnicity: "Asian"

legal_authorization:
  eu_work_authorization: "No"
  us_work_authorization: "Yes"
  requires_us_visa: "No"
  requires_us_sponsorship: "Yes"
  requires_eu_visa: "No"
  legally_allowed_to_work_in_eu: "No"
  legally_allowed_to_work_in_us: "Yes"
  requires_eu_sponsorship: "No"
  canada_work_authorization: "No"
  requires_canada_visa: "No"
  legally_allowed_to_work_in_canada: "No"
  requires_canada_sponsorship: "No"
  uk_work_authorization: "No"
  requires_uk_visa: "No"
  legally_allowed_to_work_in_uk: "No"
  requires_uk_sponsorship: "No"

work_preferences:
  remote_work: "Yes"
  in_person_work: "Yes"
  open_to_relocation: "Yes"
  willing_to_complete_assessments: "Yes"
  willing_to_undergo_drug_tests: "Yes"
  willing_to_undergo_background_checks: "Yes"

Config Yaml:

remote: true

experienceLevel:
  internship: false
  entry: true
  associate: true
  mid-senior level: true
  director: false
  executive: false

jobTypes:
  full-time: true
  contract: true
  part-time: false
  temporary: false
  internship: false
  other: false
  volunteer: false

date:
  all time: false
  month: false
  week: true
  24 hours: true

positions:
  - Data Analyst
  - Data Scientist

locations:
  - United States

apply_once_at_company: false

distance: 100

company_blacklist:
  - Microsoft

title_blacklist:

job_applicants_threshold:
  min_applicants: 0
  max_applicants: 100

llm_model_type: ollama
llm_model: 'llama3.2:1b'
llm_api_url: 'http://127.0.0.1:11434/'

Secrets Yaml

llm_api_key: 'sk-11KRr4uuTwpRGfeRTfj1T9BlbkFJjP8QTrswHU1yGruru2FR'
dog183729 commented 4 days ago

I have the same issue. I’m using local Ollama. What should be filled in for llm_api_key in secrets.yaml?

virajtshah commented 3 days ago

I am also not sure about it. But my understanding is that as ollama is running locally it won't require API Key. @feder-cr can you please help us out with the issue?