Projeto Python robusto e profissional para inferência paralela eficiente com LLMs (Large Language Models) e embeddings OpenAI, com retry automático e estatísticas de execução
- Chamadas paralelas para LLM (chat/completions) e embeddings
- Retry automático com backoff
- Estatísticas automáticas de tempo, throughput, tokens e erros
-
Crie seu arquivo de ambiente
.env
:OPENAI_API_KEY=sua-chave-openai-aqui
-
Instale as dependências:
pip install -r requirements.txt
-
Execute o projeto:
python main.py
O script main.py
traz exemplos prontos de uso das funções de LLM e Embeddings em paralelo.
A robust, professional Python project for efficient parallel inference with LLMs (Large Language Models) and OpenAI embeddings, featuring automatic retry and execution statistics
- Parallel calls for LLM (chat/completions) and embeddings
- Automatic retry with backoff
- Automatic time, throughput, token, and error statistics
-
Create your
.env
file:OPENAI_API_KEY=your-openai-key-here
-
Install dependencies:
pip install -r requirements.txt
-
Run the project:
python main.py
The script main.py
includes ready-to-run examples for parallel LLM and embedding functions.