Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(utils.py): Set team id specific params in config.yaml #1754

Merged
merged 4 commits into from
Feb 2, 2024

Conversation

krrishdholakia
Copy link
Contributor

@krrishdholakia krrishdholakia commented Feb 2, 2024

Addresses - #1753

cc: @Manouchehri

Here's how this works:

Step 1: Create team-specific settings in litellm_settings

litellm_settings:
  default_team_settings: 
    - team_id: my-secret-project
      success_callback: ["langfuse"]
      langfuse_public_key: os.environ/LANGFUSE_PUB_KEY_2
      langfuse_secret: os.environ/LANGFUSE_PRIVATE_KEY_2

Step 2: Generate key with team-id

curl --location 'http://0.0.0.0:8000/key/generate' \
--header 'Authorization: Bearer sk-1234' \
--header 'Content-Type: application/json' \
--data-raw '{
  "team_id": "my-secret-project",
}'

Step 3: Test call w/ key

curl --location 'http://0.0.0.0:8000/v1/chat/completions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <my-generated-key>' \
--data '{
  "model": "azure-gpt-3.5",
  "messages": [
        {
          "role": "user",
          "content": "Hey, how's it going?"
        }
  ],
  "max_tokens": 10
}'

Group 10010

Copy link

railway-app bot commented Feb 2, 2024

This PR is being deployed to Railway 🚅

litellm: ◻️ REMOVED

Copy link

vercel bot commented Feb 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 5:41am
litellm-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 5:41am

@Manouchehri
Copy link
Collaborator

very very nice

@ppk5
Copy link

ppk5 commented Feb 2, 2024

Isn't it a similar case where we have scenario to get the API key using Azure Client ID and Client secret ?
Will there be any support for this as well ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants