open-interview


Nameopen-interview JSON
Version 1.0.13 PyPI version JSON
download
home_pagehttps://github.com/dsdanielpark/open-interview
SummaryThe python package that returns Response of Google Gemini through API.
upload_time2024-03-29 05:53:41
maintainerNone
docs_urlNone
authorDaniel Park
requires_python>=3.7
licenseNone
keywords interview llm chatgpt openai claude anthropic
VCS
bugtrack_url
requirements openai anthropic python-docx sniffio lxml SpeechRecognition gTTS PyPDF2 python-gemini-api utilfunction pygame
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Open Interview <img alt="PyPI" src="https://img.shields.io/pypi/v/open-interview?color=black">

Looking to practice mock interviews tailored to your resume and job description? Seeking an technical interview simulation? 
Dive in with the Python open-source package `open-interview`. 




<p align="right">
  <a href="https://github.com/dsdanielpark/open-interview"><img alt="pip download" src="https://img.shields.io/badge/pip_install-open_interview-black"></a> 
  <a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
  <a href="https://hits.seeyoufarm.com"><img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fdsdanielpark%2Fopen-interview%2F&count_bg=%23000000&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false"/></a>
  <a href="https://img.shields.io/pepy/dt/open-interview?logoColor=black"><img alt="Downloads" src="https://pepy.tech/badge/open-interview"></a>
  <!-- <a href="https://github.com/dsdanielpark/Gemini-API/stargazers"><img src="https://img.shields.io/github/stars/dsdanielpark/Gemini-API?style=social"></a> -->
</p>


https://github.com/dsdanielpark/open-interview/assets/81407603/22f9b991-33e8-40d2-a4f2-b80199415767




Transform your job interview preparation into an unparalleled journey with **Open Interview**, where the avant-garde artificial intelligence of OpenAI, Anthropic, and Google is meticulously tailored to forge your path to success. Here, every interaction is designed to sculpt your technical and personal narrative into perfection, mirroring the exigencies of your dream job.



- [Open Interview ](#open-interview-)
  - [Stellar Features](#stellar-features-)
  - [Commencing Voyage](#commencing-voyage)
    - [Prerequisites](#prerequisites)
    - [Installation](#installation-)
    - [Quick Start](#quick-start)
      - [Using Claude](#using-claude)
      - [Using GPT](#using-gpt)
      - [Playing Random Question Audio](#playing-random-question-audio)
    - [Usage](#usage)
  - [Contribution](#contribution)
  - [FAQ \& Support](#faq--support)
  - [License](#license-️)


<br>

## Stellar Features ✨
- **🌍 Universal Language Support:** Emphasize the ability to accommodate all languages across the following features:
- **🖋️ Dynamic Q&A Alchemy:** Craft your arsenal with precision—generate nuanced technical interview Q&As distilled from the essence of your resume and the job description.
- **📖 Document Genesis:** Automate the creation of elegant Word documents (.docx), encapsulating your personalized interview Q&As for study and reflection.
- **🎧 Sonic Refinement:** Convert your Q&As into audio files, enabling auditory mastery and convenience for your preparatory rituals.
- **🌐 Cosmos Customization:** Navigate your preparation through customizable orbits—fine-tune preferences for job designation, interview cadence, lingua franca, and narrative complexity.

<br>


## Commencing Voyage
Welcome to the nexus of your interview preparation odyssey.

> [!IMPORTANT] 
> Token usage for experimental projects can be high, possibly exhausting paid API tokens quickly. A long-response prompt is now active. Please see the document below to adjust system and user prompts accordingly.


### Prerequisites

- **Python >= 3.7:** Ensure your command module is updated to version 3.7 or beyond.
- **🔑 API Keys - OpenAI, Anthropic, Google:** Secure your access to the galaxies of OpenAI, Anthropic, and Google, embarking with the keys to unlock the full spectrum of your potential. 




### Installation 📦

```bash
pip install open-interview
```
```
git clone https://github.com/dsdanielpark/open-interview.git
pip install -r requirements.txt
```

<br>


### Quick Start   

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1NWCwuunRRR2C2b0vmYk6Tm-JxV4yzSt9#scrollTo=bebO3UiGbIaD) 





Generate interview content using Claude or GPT models with minimal setup:

#### Using Claude

> [!IMPORTANT] 
> Increasing the `iteration` argument can generate more QAs but may lead to duplicates and excessive token usage, as it's an experimental feature.


```python
from openinterview import InterviewManager

claudeToken = "<your_claude_token>"
claude_interview_manager = InterviewManager(api_key=claudeToken, engine="Claude")

jd = """
The 'jd', 'resume', and other arguments
can accommodate extensive text.
"""

claude_interview_manager.generate_interview(
    jd=jd,
    resume="path/resume.pdf or path/resume.txt or long text.",
    position= "AI Researcher",
    interview_type="techQAsFromResume",
    language="English", # Any language you want
    max_sentence=5,
    output_dir="save/dirs",
    iteration=1, # [Caution] You can make more QAs, But it cost token very fastly.
)
```

#### Using GPT

```python
import openai
from openinterview import InterviewManager

openai.api_key = "<your_openai_token>"
gpt_interview_manager = InterviewManager(api_key=openai.api_key, engine="GPT")

gpt_interview_manager.generate_interview(
    jd="This role demands a deep enthusiasm for AI development.", # Feasible for long text
    resume="path/resume.pdf or path/resume.txt or long text.",
    position= "AI Researcher",
    interview_type="techQAsFromResume",
    language="English", # Any language you want
    max_sentence=5,
    output_dir="save/dirs",
    iteration=1, # [Caution] You can make more QAs, But it cost token very fastly.
)
```



The `interview_type` arguments as follow:
  - *generalQAs*: Ask about technical and personal skills in-depth.
  - *generalTechQAs*: Ask basic professional questions related to the job.
  - *techQAsFromResume*: Focus on technical skills listed on the resume.
  - *techQAsFromExperts*: Questions based on interviewer's expertise.
  - *techQAs*: Questions based on both parties' experiences.
  - *personalityQAs*: Inquire about personal qualities.
  - *reviewResume*: Identify and suggest improvements for the resume.


#### Playing Random Question Audio

To randomly play `question.mp3` files from a specified folder, create an instance of the `RandomPlayer` class with the folder path, and then invoke `play_random_mp3`:

```python
from openinterview import RandomPlayer

p = RandomPlayer(directory="path/to/output", interval=120)  # Directory containing question.mp3 files
p.play_random_mp3()
```
Default plays randomly for 2 minutes. Press 'n' for next question, 'q' to quit.

<br>

### Usage

For detailed examples, refer to the 📋[Usage document for example code and prompting engineering](https://github.com/dsdanielpark/open-interview/blob/main/docs/usage.md) or the 💻[tutorial script](https://github.com/dsdanielpark/open-interview/blob/main/script/example.ipynb).

- OpenAI GPT: Use `GptGenerator` for GPT-based content generation.
- Anthropic Claude: Use `ClaudeGenerator` for Claude-based interviews.


You can use [LangChain](https://python.langchain.com/docs/get_started), [LangSmith](https://python.langchain.com/docs/langsmith/), [LangServe](https://python.langchain.com/docs/langserve), and [LangGraph](https://python.langchain.com/docs/langgraph) for faster and more efficient coding and services. You can check [few-shot prompt template](https://python.langchain.com/docs/modules/model_io/prompts/few_shot_examples) in LangChain. Also, you can try faster RAG with [Llama Index](https://www.llamaindex.ai/). However, this project is used for general and efficient search for other my private projects.

<br>

## Contribution
For detailed guidance on contributions, please refer to the [contribution guide](https://github.com/dsdanielpark/open-interview/blob/main/docs/contributions.md). We appreciate your interest in contributing and look forward to your valuable input. 

Thank you for supporting our project.

## FAQ & Support

For questions and support, visit our [FAQ](https://github.com/dsdanielpark/open-interview/blob/main/documents/faq.md) and [Issues](https://github.com/dsdanielpark/open-interview/issues) pages. Contributors are welcome! Submit issues, feature suggestions, or pull requests.
Reach out to the core maintainer, [Daniel Park](https://github.com/DSDanielPark), for direct contributions or queries.


## License ©️ 
[Apache 2.0](https://opensource.org/license/apache-2-0) license, 2024. 

The initial version of this project took roughly two days for a single person, including documentation for all processes.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dsdanielpark/open-interview",
    "name": "open-interview",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "Interview, LLM, ChatGPT, OpenAI, Claude, Anthropic",
    "author": "Daniel Park",
    "author_email": "parkminwoo1991@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d0/5c/fc518ce074f224bc9035385678f83e223d88fd731db9dfa16b9c7ec17419/open-interview-1.0.13.tar.gz",
    "platform": null,
    "description": "# Open Interview <img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/open-interview?color=black\">\r\n\r\nLooking to practice mock interviews tailored to your resume and job description? Seeking an technical interview simulation? \r\nDive in with the Python open-source package `open-interview`. \r\n\r\n\r\n\r\n\r\n<p align=\"right\">\r\n  <a href=\"https://github.com/dsdanielpark/open-interview\"><img alt=\"pip download\" src=\"https://img.shields.io/badge/pip_install-open_interview-black\"></a> \r\n  <a href=\"https://github.com/psf/black\"><img alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"></a>\r\n  <a href=\"https://hits.seeyoufarm.com\"><img src=\"https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fdsdanielpark%2Fopen-interview%2F&count_bg=%23000000&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false\"/></a>\r\n  <a href=\"https://img.shields.io/pepy/dt/open-interview?logoColor=black\"><img alt=\"Downloads\" src=\"https://pepy.tech/badge/open-interview\"></a>\r\n  <!-- <a href=\"https://github.com/dsdanielpark/Gemini-API/stargazers\"><img src=\"https://img.shields.io/github/stars/dsdanielpark/Gemini-API?style=social\"></a> -->\r\n</p>\r\n\r\n\r\nhttps://github.com/dsdanielpark/open-interview/assets/81407603/22f9b991-33e8-40d2-a4f2-b80199415767\r\n\r\n\r\n\r\n\r\nTransform your job interview preparation into an unparalleled journey with **Open Interview**, where the avant-garde artificial intelligence of OpenAI, Anthropic, and Google is meticulously tailored to forge your path to success. Here, every interaction is designed to sculpt your technical and personal narrative into perfection, mirroring the exigencies of your dream job.\r\n\r\n\r\n\r\n- [Open Interview ](#open-interview-)\r\n  - [Stellar Features](#stellar-features-)\r\n  - [Commencing Voyage](#commencing-voyage)\r\n    - [Prerequisites](#prerequisites)\r\n    - [Installation](#installation-)\r\n    - [Quick Start](#quick-start)\r\n      - [Using Claude](#using-claude)\r\n      - [Using GPT](#using-gpt)\r\n      - [Playing Random Question Audio](#playing-random-question-audio)\r\n    - [Usage](#usage)\r\n  - [Contribution](#contribution)\r\n  - [FAQ \\& Support](#faq--support)\r\n  - [License](#license-\ufe0f)\r\n\r\n\r\n<br>\r\n\r\n## Stellar Features \u2728\r\n- **\ud83c\udf0d Universal Language Support:** Emphasize the ability to accommodate all languages across the following features:\r\n- **\ud83d\udd8b\ufe0f Dynamic Q&A Alchemy:** Craft your arsenal with precision\u2014generate nuanced technical interview Q&As distilled from the essence of your resume and the job description.\r\n- **\ud83d\udcd6 Document Genesis:** Automate the creation of elegant Word documents (.docx), encapsulating your personalized interview Q&As for study and reflection.\r\n- **\ud83c\udfa7 Sonic Refinement:** Convert your Q&As into audio files, enabling auditory mastery and convenience for your preparatory rituals.\r\n- **\ud83c\udf10 Cosmos Customization:** Navigate your preparation through customizable orbits\u2014fine-tune preferences for job designation, interview cadence, lingua franca, and narrative complexity.\r\n\r\n<br>\r\n\r\n\r\n## Commencing Voyage\r\nWelcome to the nexus of your interview preparation odyssey.\r\n\r\n> [!IMPORTANT] \r\n> Token usage for experimental projects can be high, possibly exhausting paid API tokens quickly. A long-response prompt is now active. Please see the document below to adjust system and user prompts accordingly.\r\n\r\n\r\n### Prerequisites\r\n\r\n- **Python >= 3.7:** Ensure your command module is updated to version 3.7 or beyond.\r\n- **\ud83d\udd11 API Keys - OpenAI, Anthropic, Google:** Secure your access to the galaxies of OpenAI, Anthropic, and Google, embarking with the keys to unlock the full spectrum of your potential. \r\n\r\n\r\n\r\n\r\n### Installation \ud83d\udce6\r\n\r\n```bash\r\npip install open-interview\r\n```\r\n```\r\ngit clone https://github.com/dsdanielpark/open-interview.git\r\npip install -r requirements.txt\r\n```\r\n\r\n<br>\r\n\r\n\r\n### Quick Start   \r\n\r\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1NWCwuunRRR2C2b0vmYk6Tm-JxV4yzSt9#scrollTo=bebO3UiGbIaD) \r\n\r\n\r\n\r\n\r\n\r\nGenerate interview content using Claude or GPT models with minimal setup:\r\n\r\n#### Using Claude\r\n\r\n> [!IMPORTANT] \r\n> Increasing the `iteration` argument can generate more QAs but may lead to duplicates and excessive token usage, as it's an experimental feature.\r\n\r\n\r\n```python\r\nfrom openinterview import InterviewManager\r\n\r\nclaudeToken = \"<your_claude_token>\"\r\nclaude_interview_manager = InterviewManager(api_key=claudeToken, engine=\"Claude\")\r\n\r\njd = \"\"\"\r\nThe 'jd', 'resume', and other arguments\r\ncan accommodate extensive text.\r\n\"\"\"\r\n\r\nclaude_interview_manager.generate_interview(\r\n    jd=jd,\r\n    resume=\"path/resume.pdf or path/resume.txt or long text.\",\r\n    position= \"AI Researcher\",\r\n    interview_type=\"techQAsFromResume\",\r\n    language=\"English\", # Any language you want\r\n    max_sentence=5,\r\n    output_dir=\"save/dirs\",\r\n    iteration=1, # [Caution] You can make more QAs, But it cost token very fastly.\r\n)\r\n```\r\n\r\n#### Using GPT\r\n\r\n```python\r\nimport openai\r\nfrom openinterview import InterviewManager\r\n\r\nopenai.api_key = \"<your_openai_token>\"\r\ngpt_interview_manager = InterviewManager(api_key=openai.api_key, engine=\"GPT\")\r\n\r\ngpt_interview_manager.generate_interview(\r\n    jd=\"This role demands a deep enthusiasm for AI development.\", # Feasible for long text\r\n    resume=\"path/resume.pdf or path/resume.txt or long text.\",\r\n    position= \"AI Researcher\",\r\n    interview_type=\"techQAsFromResume\",\r\n    language=\"English\", # Any language you want\r\n    max_sentence=5,\r\n    output_dir=\"save/dirs\",\r\n    iteration=1, # [Caution] You can make more QAs, But it cost token very fastly.\r\n)\r\n```\r\n\r\n\r\n\r\nThe `interview_type` arguments as follow:\r\n  - *generalQAs*: Ask about technical and personal skills in-depth.\r\n  - *generalTechQAs*: Ask basic professional questions related to the job.\r\n  - *techQAsFromResume*: Focus on technical skills listed on the resume.\r\n  - *techQAsFromExperts*: Questions based on interviewer's expertise.\r\n  - *techQAs*: Questions based on both parties' experiences.\r\n  - *personalityQAs*: Inquire about personal qualities.\r\n  - *reviewResume*: Identify and suggest improvements for the resume.\r\n\r\n\r\n#### Playing Random Question Audio\r\n\r\nTo randomly play `question.mp3` files from a specified folder, create an instance of the `RandomPlayer` class with the folder path, and then invoke `play_random_mp3`:\r\n\r\n```python\r\nfrom openinterview import RandomPlayer\r\n\r\np = RandomPlayer(directory=\"path/to/output\", interval=120)  # Directory containing question.mp3 files\r\np.play_random_mp3()\r\n```\r\nDefault plays randomly for 2 minutes. Press 'n' for next question, 'q' to quit.\r\n\r\n<br>\r\n\r\n### Usage\r\n\r\nFor detailed examples, refer to the \ud83d\udccb[Usage document for example code and prompting engineering](https://github.com/dsdanielpark/open-interview/blob/main/docs/usage.md) or the \ud83d\udcbb[tutorial script](https://github.com/dsdanielpark/open-interview/blob/main/script/example.ipynb).\r\n\r\n- OpenAI GPT: Use `GptGenerator` for GPT-based content generation.\r\n- Anthropic Claude: Use `ClaudeGenerator` for Claude-based interviews.\r\n\r\n\r\nYou can use [LangChain](https://python.langchain.com/docs/get_started), [LangSmith](https://python.langchain.com/docs/langsmith/), [LangServe](https://python.langchain.com/docs/langserve), and [LangGraph](https://python.langchain.com/docs/langgraph) for faster and more efficient coding and services. You can check [few-shot prompt template](https://python.langchain.com/docs/modules/model_io/prompts/few_shot_examples) in LangChain. Also, you can try faster RAG with [Llama Index](https://www.llamaindex.ai/). However, this project is used for general and efficient search for other my private projects.\r\n\r\n<br>\r\n\r\n## Contribution\r\nFor detailed guidance on contributions, please refer to the [contribution guide](https://github.com/dsdanielpark/open-interview/blob/main/docs/contributions.md). We appreciate your interest in contributing and look forward to your valuable input. \r\n\r\nThank you for supporting our project.\r\n\r\n## FAQ & Support\r\n\r\nFor questions and support, visit our [FAQ](https://github.com/dsdanielpark/open-interview/blob/main/documents/faq.md) and [Issues](https://github.com/dsdanielpark/open-interview/issues) pages. Contributors are welcome! Submit issues, feature suggestions, or pull requests.\r\nReach out to the core maintainer, [Daniel Park](https://github.com/DSDanielPark), for direct contributions or queries.\r\n\r\n\r\n## License \u00a9\ufe0f \r\n[Apache 2.0](https://opensource.org/license/apache-2-0) license, 2024. \r\n\r\nThe initial version of this project took roughly two days for a single person, including documentation for all processes.\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "The python package that returns Response of Google Gemini through API.",
    "version": "1.0.13",
    "project_urls": {
        "Homepage": "https://github.com/dsdanielpark/open-interview"
    },
    "split_keywords": [
        "interview",
        " llm",
        " chatgpt",
        " openai",
        " claude",
        " anthropic"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6be86d9c540b80735baa0524c1447c37c7c3f281a932c343e23dc57fefb20003",
                "md5": "846908b8f8ce6a964f584194a51aa9f4",
                "sha256": "f7f9c959a3171be940a53a65522ef27092f406eb5afbec1173fe22ca2e67c165"
            },
            "downloads": -1,
            "filename": "open_interview-1.0.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "846908b8f8ce6a964f584194a51aa9f4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 27382,
            "upload_time": "2024-03-29T05:53:34",
            "upload_time_iso_8601": "2024-03-29T05:53:34.225017Z",
            "url": "https://files.pythonhosted.org/packages/6b/e8/6d9c540b80735baa0524c1447c37c7c3f281a932c343e23dc57fefb20003/open_interview-1.0.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d05cfc518ce074f224bc9035385678f83e223d88fd731db9dfa16b9c7ec17419",
                "md5": "7f8f90b349465b0668caee07ef03e91f",
                "sha256": "d12756a1c505b1b78b88d8d3e95aad02903f496c4e0a083372cafea3e5ce5499"
            },
            "downloads": -1,
            "filename": "open-interview-1.0.13.tar.gz",
            "has_sig": false,
            "md5_digest": "7f8f90b349465b0668caee07ef03e91f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 21620,
            "upload_time": "2024-03-29T05:53:41",
            "upload_time_iso_8601": "2024-03-29T05:53:41.049066Z",
            "url": "https://files.pythonhosted.org/packages/d0/5c/fc518ce074f224bc9035385678f83e223d88fd731db9dfa16b9c7ec17419/open-interview-1.0.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-29 05:53:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dsdanielpark",
    "github_project": "open-interview",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "openai",
            "specs": [
                [
                    "==",
                    "0.28"
                ]
            ]
        },
        {
            "name": "anthropic",
            "specs": []
        },
        {
            "name": "python-docx",
            "specs": []
        },
        {
            "name": "sniffio",
            "specs": []
        },
        {
            "name": "lxml",
            "specs": []
        },
        {
            "name": "SpeechRecognition",
            "specs": []
        },
        {
            "name": "gTTS",
            "specs": []
        },
        {
            "name": "PyPDF2",
            "specs": []
        },
        {
            "name": "python-gemini-api",
            "specs": []
        },
        {
            "name": "utilfunction",
            "specs": []
        },
        {
            "name": "pygame",
            "specs": []
        }
    ],
    "lcname": "open-interview"
}
        
Elapsed time: 0.20367s