|
--- |
|
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:** |
|
* `url`: The URL of the webpage to visit (e.g., "https://www.odoo.com"). |
|
* **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: |
|
```json |
|
{ |
|
"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: |
|
```json |
|
{ |
|
"query": "create a new module" |
|
} |
|
``` |
|
* **odoo\_code\_agent\_17:** To generate code for creating a new module in Odoo 17, use the following input: |
|
```json |
|
{ |
|
"query": "create a new module" |
|
} |
|
``` |
|
* **odoo\_code\_agent\_18:** To generate code for creating a new module in Odoo 18, use the following input: |
|
```json |
|
{ |
|
"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: |
|
```json |
|
{ |
|
"query": "how to create a new module", |
|
"version": "17.0" |
|
} |
|
``` |
|
* **visit\_webpage:** To visit the Odoo website, use the following input: |
|
```json |
|
{ |
|
"url": "https://www.odoo.com" |
|
} |
|
``` |
|
* **web\_search:** To search for the latest Odoo news, use the following input: |
|
```json |
|
{ |
|
"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 |
|
|