VPCSinfo's picture
[ADD]ADDED multiple llm porvider options with token and trial argument from fronend. added semanctic search with odoo docs as a context before going to code.
68114ba

A newer version of the Gradio SDK is available: 5.22.0

Upgrade
metadata
title: Linkedin Job Searching Agent
emoji: 
colorFrom: pink
colorTo: yellow
sdk: gradio
sdk_version: 5.15.0
app_file: app.py
pinned: false
tags:
  - smolagents
  - agent
  - smolagent
  - tool
  - agent-course

Linkedin Job Searching Agent

This project provides tools and agents for searching for jobs on LinkedIn and Indeed, generating Odoo code, searching Odoo documentation, visiting webpages, and performing web searches.

Tools

  • final_answer: Formats and presents final answers in a human-readable format, optionally zipping referenced files and providing a download link for generated code.
    • Inputs: The final answer to be presented to the user.
    • Outputs: A formatted string representing the final answer, with an optional download link for code.
  • linkedin_job_search: Searches for job postings on LinkedIn and Indeed based on job title, location, and work mode (remote, hybrid, in-office) for Odoo profiles. It requires a Brave API key.
    • Inputs:
      • position: The job title to search for (e.g., "Odoo Developer").
      • location: The location to search in (e.g., "London").
      • work_mode: The work mode (e.g., "remote", "hybrid", "in-office").
    • Outputs: A list of job postings matching the search criteria.
  • odoo_code_agent_16: Generates Odoo code for version 16 based on the user's query and Odoo documentation.
    • Inputs:
      • query: A natural language query describing the desired Odoo code (e.g., "create a new module to display a list of products").
    • Outputs: An Odoo code snippet that implements the requested functionality.
  • odoo_code_agent_17: Generates Odoo code for version 17 based on the user's query and Odoo documentation.
    • Inputs:
      • query: A natural language query describing the desired Odoo code (e.g., "create a new module to add a field to the product model").
    • Outputs: An Odoo code snippet that implements the requested functionality.
  • odoo_code_agent_18: Generates Odoo code for version 18 based on the user's query and Odoo documentation.
    • Inputs:
      • query: A natural language query describing the desired Odoo code (e.g., "create a new module to display a list of sales orders").
    • Outputs: An Odoo code snippet that implements the requested functionality.
  • odoo_documentation_search: Searches the Odoo documentation for a given query.
    • Inputs:
      • query: A natural language query describing the desired information (e.g., "how to create a new view").
      • version: The Odoo version to search in (e.g., "16.0", "17.0", "18.0").
    • Outputs: A list of documentation snippets matching the search criteria.
  • visit_webpage: Visits a webpage at a given URL and reads its content as a markdown string.
    • Inputs:
    • Outputs: The content of the webpage as a markdown string.
  • web_search: Performs a DuckDuckGo web search based on a given query and returns the top search results.
    • Inputs:
      • query: A natural language query to search for (e.g., "latest Odoo news").
    • Outputs: A list of search results matching the search criteria.

Multi-LLM Support

This project supports multiple Large Language Models (LLMs) through the Hugging Face HfApiModel class. You can configure the LLM provider and model ID in the app.py file.

The following LLM providers are supported:

  • Qwen: Uses the Qwen/Qwen2.5-Coder-32B-Instruct model.
  • HuggingFace: Uses a Hugging Face Endpoint.
  • OpenAI: Uses the OpenAI GPT-4 model. Requires an OpenAI API key.
  • Anthropic: Uses the Anthropic Claude model. Requires an Anthropic API key.
  • Groq: Uses the Groq Mixtral model. Requires a Groq API key.
  • Google: Uses the Google Gemini Pro model. Requires a Google API key.
  • Custom: Allows you to specify a custom model ID.

To select a different LLM provider, modify the selected_provider variable in the app.py file. You may also need to set the corresponding API key as an environment variable.

The Odoo code agent tools use the google/flan-t5-small model for summarization.

Usage Examples

  • final_answer: This tool is typically used by the agent to present the final result to the user. It doesn't require direct user input.
  • linkedin_job_search: To search for Odoo developer jobs in London, use the following input:
    {
        "position": "Odoo Developer",
        "location": "London",
        "work_mode": "remote"
    }
    
  • odoo_code_agent_16: To generate code for creating a new module in Odoo 16, use the following input:
    {
        "query": "create a new module"
    }
    
  • odoo_code_agent_17: To generate code for creating a new module in Odoo 17, use the following input:
    {
        "query": "create a new module"
    }
    
  • odoo_code_agent_18: To generate code for creating a new module in Odoo 18, use the following input:
    {
        "query": "create a new module"
    }
    
  • odoo_documentation_search: To search for information on how to create a new module in Odoo 17.0, use the following input:
    {
        "query": "how to create a new module",
        "version": "17.0"
    }
    
  • visit_webpage: To visit the Odoo website, use the following input:
    {
        "url": "https://www.odoo.com"
    }
    
  • web_search: To search for the latest Odoo news, use the following input:
    {
        "query": "latest Odoo news"
    }
    

Agents

This project uses agents to orchestrate the tools and accomplish specific tasks. The main agent is defined in app.py.

Downloading Generated Code

The final_answer tool can now provide a download link for generated code. To enable this feature, the Odoo code agent tools automatically include a download link in the final answer.

Configuration

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference