/debatable

LLM to address sales objections. Can be used as a template for input output APIs with LLMs.

Primary LanguagePythonApache License 2.0Apache-2.0

debatable

LLM to address sales objections


debatable.py - python funcs to generate suggestions

api.py - REST API wrapper around debatable.py

app.py - streamlit app using debatable.py


Note: the following will have to be saved as an environment variables:

  • OPENAI_API_KEY
  • DETA_PROJECT_KEY: Key for deta.space's "Base" NoSQL DB (to collect stats)

Run a FastAPI server with

uvicorn api:app --reload # reload flag for development

Run streamlit app with

streamlit run app.py

Using Codespaces/VSCode

Everything you need will be installed when you open Codespaces/VSCode; specified in .devcontainer/

Notes for Codespaces:

  • Aider coding assistant will automatically be installed if you want to use it
  • Jupyter (will be added to the devcontainer later, not used now)
    • Currently Jupyter notebook doesn’t work on Codespaces for an unknown reason, or at least I can’t, so you’ll have to use JupyterLab
    • Open with jupyter lab --NotebookApp.allow_origin='*' --NotebookApp.ip='0.0.0.0'
    • For more info on using see https://code.visualstudio.com/docs/datascience/notebooks-web
  • Streamlit
  • FastAPI
    • --reload doesn't work in codespaces, will have to refresh to see changes