GithubHelp home page GithubHelp logo

briscoooe / resumai Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 2.0 113 KB

An AI powered API for my resume

Home Page: https://brianbriscoe.dev/resume

Procfile 0.44% Python 99.56%
fastapi gpt-3 langchain openai

resumai's Introduction

ResumAI API

๐Ÿ”— https://resumai.fly.dev/docs.

This is a FastAPI application that serves as the backend for the ResumAI web app.

For the web app, see the repo for my personal site.

Tech stack

The ResumAI API is built with FastAPI which itself uses Pydantic for data validation and OpenAPI for API documentation. The API is served by Uvicorn and is deployed to Fly.io.

The /chat endpoint magic is done via LangChain which uses OpenAI's GPT-3.5 to generate text. I feed my entire resume into the prompt on every request so that the bot can use it to generate responses.

Notes

This is just for fun and a lot of steps have been skipped for the sake of convenience. If you want to copy or productise this, here are some optimisations I'd highly recommend:

  • Fine-tune your own model using OpenAI's fine-tuning or something like PrivateGPT. Feeding the entire resume as JSON into the prompt every time like I do here is extremely token inefficient.
  • Store conversations at least ephemerally so that the bot can remember context, this will also save tokens plus it's better UX. This is possible with LangChain but I haven't implemented it here.
  • If you just want the chat interface and don't need the other endpoints, don't hardcode your entire resume as code into the repo. Use some document loaders to extract all the text out of actual resumes in .doc or .pdf format and hope GPT-4 can map it to your schemas.
  • There is basically no prompt injection protection. If this matters to you, I'd highly suggest adding some

Additionally, as far as best practises goes there is no error handling and there are no tests.

Todo

  • Optimise prompt to remove unnecessary whitespace
  • Use LangChain conversations to allow multiple messages within a single conversation
  • Add response language support (maybe)
  • Add bot persona support (maybe)

resumai's People

Contributors

briscoooe avatar

Stargazers

Arpit Kabra avatar  avatar Aman avatar  avatar Ryo Lambert avatar Igor Souza avatar  avatar Deepankar Singh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.