Skip to content

Genei-Ltd/traceloop-repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traceloop repro

Setup

Environment configuration

Copy .env.example to .env and set the appropriate values.

Service setup

  1. Install python 3.12.3 (and activate if using pyenv or similar)

    # visit https://github.com/pyenv/pyenv#getting-pyenv for more information
    brew install pyenv
    # see above...
    pyenv install 3.12.3
    pyenv global 3.12.3
  2. Install poetry

    curl -sSL https://install.python-poetry.org | python -
  3. Add poetry to path and restart shell

    # in ~/.bashrc, ~/.zshrc or equivalent
    export PATH="$HOME/.local/bin:$PATH"
  4. Config poetry to use virtual envs in project (optional)

    poetry config virtualenvs.in-project true
  5. Add dotenv plugin for poetry

    poetry self add poetry-dotenv-plugin
  6. Create virtual environment and install dependencies

    poetry env use python
    poetry install

Test broken case

In one terminal:

poetry run serve

In another terminal:

curl -X POST "http://127.0.0.1:8080/answer" -H "Content-Type: application/json" -d '{"question": "What is the capital of France?"}'

Test not broken case

poetry run main

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages