Skip to main content

Common utilities and objects for Talentwizer projects

Project description

Getting Started

First, setup the environment:

poetry install
poetry shell

By default, we use the OpenAI LLM (though you can customize, see app/context.py). As a result you need to specify an OPENAI_API_KEY in an .env file in this directory.

Example .env file:

OPENAI_API_KEY=<openai_api_key>

Second, generate the embeddings of the documents in the ./data directory (if this folder exists - otherwise, skip this step):

python index_data.py

Third, run the development server:

python main.py

Then call the API endpoint /api/chat to see the result:

curl --location 'localhost:8000/api/chat' \
--header 'Content-Type: application/json' \
--data '{ "messages": [{ "role": "user", "content": "Hello" }] }'

You can start editing the API by modifying app/api/routers/chat.py. The endpoint auto-updates as you save the file.

Open http://localhost:8000/docs with your browser to see the Swagger UI of the API.

The API allows CORS for all origins to simplify development. You can change this behavior by setting the ENVIRONMENT environment variable to prod:

ENVIRONMENT=prod uvicorn main:app

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

talentwizer_commons-1.0.12.tar.gz (39.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

talentwizer_commons-1.0.12-py3-none-any.whl (55.4 kB view details)

Uploaded Python 3

File details

Details for the file talentwizer_commons-1.0.12.tar.gz.

File metadata

  • Download URL: talentwizer_commons-1.0.12.tar.gz
  • Upload date:
  • Size: 39.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.5 Darwin/24.3.0

File hashes

Hashes for talentwizer_commons-1.0.12.tar.gz
Algorithm Hash digest
SHA256 2a7c6cbb3f6aca278070b316736bbbc9b17b87fa2193090a86a4b30e2108397d
MD5 1bb7fd47aff5703f1cf59ff40578262a
BLAKE2b-256 753294a6e71a3ad5f8e5f193a8da0d30fca6b7e38b67b1bc24a724f083f9fdb5

See more details on using hashes here.

File details

Details for the file talentwizer_commons-1.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for talentwizer_commons-1.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 b521cbe6384971d9948f1a7c65e46df3be8bd9df1c1af3434e11fb1787040850
MD5 a8bdcf9a1e1b325eba0a1d56bb2e0b41
BLAKE2b-256 a83319e0b69677095c9f1e52933b33b6f356addaa157e303c2a99134a6f601f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page