Skip to content

Commit

Permalink
Merge pull request #967 from julep-ai/dev
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
HamadaSalhab authored Jan 4, 2025
2 parents 8946a09 + d054806 commit 2ae5fe1
Show file tree
Hide file tree
Showing 173 changed files with 38,527 additions and 12,311 deletions.
118 changes: 69 additions & 49 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ TAG=dev
JWT_SHARED_KEY=<your_jwt_shared_key>
AGENTS_API_KEY=<your_agents_api_key>
COZO_AUTH_TOKEN=<your_cozo_auth_token>
TEMPORAL_POSTGRES_PASSWORD=<your_temporal_postgres_password>
LITELLM_POSTGRES_PASSWORD=<your_litellm_postgres_password>
LITELLM_MASTER_KEY=<your_litellm_master_key>
LITELLM_SALT_KEY=<your_litellm_salt_key>
LITELLM_REDIS_PASSWORD=<your_litellm_redis_password>
GPU_MEMORY_UTILIZATION=0.80
MAX_FREE_SESSIONS=50
MAX_FREE_EXECUTIONS=50

Expand All @@ -30,19 +26,19 @@ MAX_FREE_EXECUTIONS=50

### Recommended LLM Providers

# OPENAI_API_KEY=<your_openai_api_key>
# VOYAGE_API_KEY=<your_voyage_api_key>
OPENAI_API_KEY=<your_openai_api_key>
VOYAGE_API_KEY=<your_voyage_api_key>

# HUGGING_FACE_HUB_TOKEN=<your_hugging_face_hub_token>
# ANTHROPIC_API_KEY=<your_anthropic_api_key>
# OPENROUTER_API_KEY=<your_openrouter_api_key>
# GROQ_API_KEY=<your_groq_api_key>
# GEMINI_API_KEY=<your_gemini_api_key>
# CLOUDFLARE_API_KEY=<your_cloudflare_api_key>
# CLOUDFLARE_ACCOUNT_ID=<your_cloudflare_account_id>
# NVIDIA_NIM_API_KEY=<your_nvidia_nim_api_key>
# GITHUB_API_KEY=<your_github_api_key>
# GOOGLE_APPLICATION_CREDENTIALS=.keys/julep-vertexai-svc.json
HUGGING_FACE_HUB_TOKEN=<your_hugging_face_hub_token>
ANTHROPIC_API_KEY=<your_anthropic_api_key>
OPENROUTER_API_KEY=<your_openrouter_api_key>
GROQ_API_KEY=<your_groq_api_key>
GEMINI_API_KEY=<your_gemini_api_key>
CLOUDFLARE_API_KEY=<your_cloudflare_api_key>
CLOUDFLARE_ACCOUNT_ID=<your_cloudflare_account_id>
NVIDIA_NIM_API_KEY=<your_nvidia_nim_api_key>
GITHUB_API_KEY=<your_github_api_key>
GOOGLE_APPLICATION_CREDENTIALS=.keys/julep-vertexai-svc.json

# Agents API
# ---------
Expand All @@ -51,21 +47,24 @@ MAX_FREE_EXECUTIONS=50
### > Set to either "voyage/voyage-3" or "Alibaba-NLP/gte-large-en-v1.5"
### > Use Alibaba-NLP/gte-large-en-v1.5 with local embedding server

# EMBEDDING_MODEL_ID=voyage/voyage-3
# EMBEDDING_MODEL_ID=Alibaba-NLP/gte-large-en-v1.5

# AGENTS_API_HOSTNAME=localhost
# AGENTS_API_PROTOCOL=http
# AGENTS_API_KEY_HEADER_NAME=Authorization
# AGENTS_API_URL=http://agents-api:8080
# TRUNCATE_EMBED_TEXT=true
# WORKER_URL=temporal:7233
# AGENTS_API_DEBUG=false
# NUM_GPUS=1
# INTEGRATION_SERVICE_URL=http://integrations:8000
# USE_BLOB_STORE_FOR_TEMPORAL=false
# BLOB_STORE_CUTOFF_KB=1024
# BLOB_STORE_BUCKET=agents-api
EMBEDDING_MODEL_ID=voyage/voyage-3
EMBEDDING_MODEL_ID=Alibaba-NLP/gte-large-en-v1.5

AGENTS_API_HOSTNAME=localhost
AGENTS_API_PROTOCOL=http
AGENTS_API_KEY_HEADER_NAME=Authorization
AGENTS_API_URL=http://agents-api:8080
TRUNCATE_EMBED_TEXT=true
WORKER_URL=temporal:7233
AGENTS_API_DEBUG=false
NUM_GPUS=1
INTEGRATION_SERVICE_URL=http://integrations:8000
USE_BLOB_STORE_FOR_TEMPORAL=false
BLOB_STORE_CUTOFF_KB=1024
BLOB_STORE_BUCKET=agents-api
MNT_DIR=/data
SKIP_CHECK_DEVELOPER_HEADERS=true


# Memory Store
# -----------
Expand All @@ -79,36 +78,57 @@ MAX_FREE_EXECUTIONS=50
# Gateway
# ------

# GATEWAY_PORT=80
# TRAEFIK_LOG_LEVEL=INFO
GATEWAY_PORT=80
TRAEFIK_LOG_LEVEL=INFO

# Temporal
# --------

# TEMPORAL_ENDPOINT=temporal:7233
# TEMPORAL_NAMESPACE=default
# TEMPORAL_WORKER_URL=temporal:7233
# TEMPORAL_POSTGRES_DB=temporal
# TEMPORAL_POSTGRES_USER=temporal
# TEMPORAL_SCHEDULE_TO_CLOSE_TIMEOUT=3600
TEMPORAL_ENDPOINT=temporal:7233
TEMPORAL_NAMESPACE=default
TEMPORAL_WORKER_URL=temporal:7233
TEMPORAL_POSTGRES_DB=temporal
TEMPORAL_POSTGRES_USER=temporal
TEMPORAL_POSTGRES_PASSWORD=<your_temporal_postgres_password>
TEMPORAL_SCHEDULE_TO_CLOSE_TIMEOUT=3600

# LiteLLM
# -------

# LITELLM_URL=http://litellm:4000
# LITELLM_POSTGRES_DB=litellm
# LITELLM_POSTGRES_USER=llmproxy
# LITELLM_REDIS_HOST=litellm-redis
# LITELLM_REDIS_PORT=6379
LITELLM_URL=http://litellm:4000
LITELLM_POSTGRES_DB=litellm
LITELLM_POSTGRES_USER=llmproxy
LITELLM_REDIS_HOST=litellm-redis
LITELLM_REDIS_PORT=6379
LITELLM_POSTGRES_PASSWORD=<your_litellm_postgres_password>
LITELLM_MASTER_KEY=<your_litellm_master_key>
LITELLM_SALT_KEY=<your_litellm_salt_key>
LITELLM_REDIS_PASSWORD=<your_litellm_redis_password>
REDIS_ARGS="--requirepass ${LITELLM_REDIS_PASSWORD}"

# Grafana
# ------

GRAFANA_ADMIN_USER=<your_grafana_admin_user>
GRAFANA_ADMIN_PASSWORD=<your_grafana_admin_password>


# Blob Store
# -----------

# S3_ENDPOINT=http://seaweedfs:8333
# S3_ACCESS_KEY=<your_s3_access_key>
# S3_SECRET_KEY=<your_s3_secret_key>
S3_ENDPOINT=http://seaweedfs:8333
S3_ACCESS_KEY=<your_s3_access_key>
S3_SECRET_KEY=<your_s3_secret_key>

# Integrations Service
# ------------

# INTEGRATIONS_SERVICE_PORT=8000
INTEGRATIONS_SERVICE_PORT=8000
INTEGRATIONS_SENTRY_DSN=<sentry_dsn>

# Temporal fine tuning

# TEMPORAL_MAX_CONCURRENT_WORKFLOW_TASKS=
# TEMPORAL_MAX_CONCURRENT_ACTIVITIES=100
# TEMPORAL_MAX_ACTIVITIES_PER_SECOND=
# TEMPORAL_MAX_TASK_QUEUE_ACTIVITIES_PER_SECOND=
83 changes: 83 additions & 0 deletions .github/workflows/generate-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Julep Changelog Generation
run-name: ${{ github.actor }} is generating changelog for the last two weeks using Julep

on:
workflow_dispatch:

jobs:
changelog_generation:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: dev

- name: Setup GitHub CLI
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
- name: Collect merged PRs from the last two weeks
id: collect_prs
run: |
if [[ "$OSTYPE" == "darwin"* ]]; then
date_threshold=$(date -v-14d +"%Y-%m-%d")
else
date_threshold=$(date -d '-14 days' +"%Y-%m-%d")
fi
echo "Fetching merged PRs since $date_threshold..."
merged_prs=$(
gh pr list --state merged --json number,title,body,author \
--search "merged:>=$date_threshold" \
--jq 'map({number, title, body, author: .author.login})'
)
if [ -z "$merged_prs" ] || [ "$merged_prs" = "null" ]; then
echo "No merged PRs found in the last two weeks."
echo "pr_data=[]" >> $GITHUB_ENV
echo '{"pr_data": []}' > pr_data.json
exit 0
fi
echo "pr_data=$merged_prs" >> $GITHUB_ENV
echo "$merged_prs" > pr_data.json
- name: Setup Python v3.10.12
uses: actions/setup-python@v5
with:
python-version: "3.10.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install PyYAML julep
- name: Send PR data to Python script
if: steps.collect_prs.outputs.pr_data != '[]'
id: generate_changelog
run: |
if ! python scripts/generate_changelog.py; then
echo "Error: Failed to generate changelog"
exit 1
fi
env:
JULEP_API_KEY: ${{ secrets.JULEP_API_KEY }}
TASK_UUID: ${{ secrets.TASK_UUID }}
AGENT_UUID: ${{ secrets.AGENT_UUID }}

- name: Create Pull Request
if: success() && steps.collect_prs.outputs.pr_data != '[]'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore(changelog): update CHANGELOG.md"
title: "Update CHANGELOG.md"
body: "This PR updates the changelog with PRs from the last 2 weeks."
branch: "update-changelog"
delete-branch: true
add-paths: |
CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
paths:
- 'typespec/**'
push:
push:
paths:
- 'typespec/**'

Expand All @@ -16,39 +16,20 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: npm
cache-dependency-path: 'typespec/package-lock.json'

- name: Install libboost
run: sudo apt-get install -y libboost-all-dev

- name: Install and configure Poetry
uses: snok/install-poetry@v1

- name: Configure Poetry to use .venv
run: |
cd agents-api
poetry config virtualenvs.in-project true

- name: Cache Poetry virtualenv
uses: actions/cache@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
path: agents-api/.venv
key: ${{ runner.os }}-agents-api-poetry-${{ hashFiles('agents-api/poetry.lock') }}
restore-keys: |
${{ runner.os }}-agents-api-poetry-
enable-cache: true

- name: Install dependencies
run: |
cd agents-api
poetry install
- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Generate openapi code
run: |
Expand Down
30 changes: 8 additions & 22 deletions .github/workflows/lint-agents-api-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,25 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install libboost
run: sudo apt-get install -y libboost-all-dev

- name: Install and configure Poetry
uses: snok/install-poetry@v1

- name: Configure Poetry to use .venv
run: |
cd agents-api
poetry config virtualenvs.in-project true
- name: Cache Poetry virtualenv
uses: actions/cache@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
path: agents-api/.venv
key: ${{ runner.os }}-agents-api-poetry-${{ hashFiles('agents-api/poetry.lock') }}
restore-keys: |
${{ runner.os }}-agents-api-poetry-
enable-cache: true

- name: Install dependencies
- name: Set up python and install dependencies
run: |
cd agents-api
poetry install
uv python install
uv sync --all-extras --dev
- name: Lint and format
run: |
cd agents-api
poetry run poe format
poetry run poe lint
uv run poe format
uv run poe lint
- uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
Loading

0 comments on commit 2ae5fe1

Please sign in to comment.