From 4005cfd0981d326db1fcb66fe09042d879076fac Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 14:27:31 -0700 Subject: [PATCH 01/24] use stable releases --- .github/workflows/ghcr_deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index b3a104e1d..33b867e3c 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -87,7 +87,7 @@ jobs: with: context: . push: true - tags: ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta.outputs.tags }}-latest # if a tag is provided, use that, otherwise use the release tag, and if neither is available, use 'latest' + tags: ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'main-stable' || '' }} labels: ${{ steps.meta.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 @@ -161,7 +161,7 @@ jobs: context: . file: ./litellm-js/spend-logs/Dockerfile push: true - tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-latest + tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && '-main-stable' || '' }}, labels: ${{ steps.meta-spend-logs.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 From 42bba8783954e4d1aaee36dcc72738b1a2dc97e6 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 14:30:03 -0700 Subject: [PATCH 02/24] fix use main-stable correctly --- .github/workflows/ghcr_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 33b867e3c..efe35e837 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -161,7 +161,7 @@ jobs: context: . file: ./litellm-js/spend-logs/Dockerfile push: true - tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && '-main-stable' || '' }}, + tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'main-stable' || '' }}, labels: ${{ steps.meta-spend-logs.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 From 7ad4752b87d9fcdc976b8f15d536869363b372cf Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 14:30:11 -0700 Subject: [PATCH 03/24] fix use main-stable --- .github/workflows/ghcr_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index efe35e837..0eadb08a6 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -161,7 +161,7 @@ jobs: context: . file: ./litellm-js/spend-logs/Dockerfile push: true - tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'main-stable' || '' }}, + tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'main-stable' || '' }}, labels: ${{ steps.meta-spend-logs.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 From 1f39acb569a301ab006cd3c37930cbe00bad5d9b Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 14:37:11 -0700 Subject: [PATCH 04/24] use -stable in releases --- .github/workflows/ghcr_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 0eadb08a6..5c3e1992d 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -161,7 +161,7 @@ jobs: context: . file: ./litellm-js/spend-logs/Dockerfile push: true - tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'main-stable' || '' }}, + tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && '-stable' || '' }}, labels: ${{ steps.meta-spend-logs.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 From f37322ed106c540c8488c26c17196ee427f3fbba Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 14:39:19 -0700 Subject: [PATCH 05/24] use -stable in releases --- .github/workflows/ghcr_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 5c3e1992d..858546cac 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -161,7 +161,7 @@ jobs: context: . file: ./litellm-js/spend-logs/Dockerfile push: true - tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && '-stable' || '' }}, + tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'stable' || '' }}, labels: ${{ steps.meta-spend-logs.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 From 79441d01c079f4d1e4cf6a31add936fcc82582ee Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 14:48:51 -0700 Subject: [PATCH 06/24] use original deploy --- .github/workflows/ghcr_deploy.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 858546cac..923137aa1 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -87,7 +87,7 @@ jobs: with: context: . push: true - tags: ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'main-stable' || '' }} + tags: ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta.outputs.tags }}-latest # if a tag is provided, use that, otherwise use the release tag, and if neither is available, use 'latest' labels: ${{ steps.meta.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 @@ -161,7 +161,7 @@ jobs: context: . file: ./litellm-js/spend-logs/Dockerfile push: true - tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'stable' || '' }}, + tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-latest labels: ${{ steps.meta-spend-logs.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 @@ -288,4 +288,3 @@ jobs: } ] }' $WEBHOOK_URL - From 47fceb9e5d0723b49f13d603bebe87dba0db012e Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 14:59:39 -0700 Subject: [PATCH 07/24] fix main-stable --- .github/workflows/ghcr_deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 923137aa1..1f637182c 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -161,7 +161,7 @@ jobs: context: . file: ./litellm-js/spend-logs/Dockerfile push: true - tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-latest + tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'BerriAI/litellm-spend_logs-stable' || '' }}, labels: ${{ steps.meta-spend-logs.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 @@ -288,3 +288,4 @@ jobs: } ] }' $WEBHOOK_URL + From ca77766a5834afd06966de8c7d8129c004e48907 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 15:00:37 -0700 Subject: [PATCH 08/24] fix -stable releases --- .github/workflows/ghcr_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 1f637182c..61e4f7de1 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -161,7 +161,7 @@ jobs: context: . file: ./litellm-js/spend-logs/Dockerfile push: true - tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'BerriAI/litellm-spend_logs-stable' || '' }}, + tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'berriai/litellm-spend_logs-stable' || '' }}, labels: ${{ steps.meta-spend-logs.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 From f2dfd1ebe89fb64c8d71d69aa9a72bc0252779f3 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 15:03:54 -0700 Subject: [PATCH 09/24] fix stable releases --- .github/workflows/ghcr_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 61e4f7de1..6ec0f3008 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -161,7 +161,7 @@ jobs: context: . file: ./litellm-js/spend-logs/Dockerfile push: true - tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'berriai/litellm-spend_logs-stable' || '' }}, + tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'berriai/litellm-spend_logs:stable' || '' }}, labels: ${{ steps.meta-spend-logs.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 From 6048582f9528a9e7044e198886e80f522bae1744 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 15:13:43 -0700 Subject: [PATCH 10/24] fix do stable releases --- .github/workflows/ghcr_deploy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 6ec0f3008..923137aa1 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -161,7 +161,7 @@ jobs: context: . file: ./litellm-js/spend-logs/Dockerfile push: true - tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ 'latest' }}, ${{ contains(github.event.inputs.tag || '', 'stable') && 'berriai/litellm-spend_logs:stable' || '' }}, + tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-latest labels: ${{ steps.meta-spend-logs.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 @@ -288,4 +288,3 @@ jobs: } ] }' $WEBHOOK_URL - From 475144e5b7f81fd06fcef95c9f4189f4cedadf5b Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 3 Apr 2024 15:23:01 -0700 Subject: [PATCH 11/24] fix(openai.py): support passing prompt as list instead of concat string --- litellm/llms/openai.py | 2 +- litellm/tests/test_text_completion.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/litellm/llms/openai.py b/litellm/llms/openai.py index 93f4c2d95..2065a724b 100644 --- a/litellm/llms/openai.py +++ b/litellm/llms/openai.py @@ -1033,7 +1033,7 @@ class OpenAITextCompletion(BaseLLM): ): prompt = messages[0]["content"] else: - prompt = " ".join([message["content"] for message in messages]) # type: ignore + prompt = [message["content"] for message in messages] # type: ignore # don't send max retries to the api, if set diff --git a/litellm/tests/test_text_completion.py b/litellm/tests/test_text_completion.py index 84e3bb5de..0b4103ca0 100644 --- a/litellm/tests/test_text_completion.py +++ b/litellm/tests/test_text_completion.py @@ -3775,12 +3775,12 @@ def test_completion_openai_prompt(): try: print("\n text 003 test\n") response = text_completion( - model="gpt-3.5-turbo-instruct", prompt="What's the weather in SF?" + model="gpt-3.5-turbo-instruct", + prompt=["What's the weather in SF?", "How is Manchester?"], ) print(response) + assert len(response.choices) == 2 response_str = response["choices"][0]["text"] - # print(response.choices[0]) - # print(response.choices[0].text) except Exception as e: pytest.fail(f"Error occurred: {e}") From 5721e8bdc61538586721f23c6b767d789a0a99d2 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 3 Apr 2024 15:24:05 -0700 Subject: [PATCH 12/24] =?UTF-8?q?bump:=20version=201.34.23=20=E2=86=92=201?= =?UTF-8?q?.34.24?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e449201f1..8f720f54d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "1.34.23" +version = "1.34.24" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT" @@ -80,7 +80,7 @@ requires = ["poetry-core", "wheel"] build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "1.34.23" +version = "1.34.24" version_files = [ "pyproject.toml:^version" ] From 30f71e6ad0a1bc9a0550e69be571bafb7b163642 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 3 Apr 2024 15:26:16 -0700 Subject: [PATCH 13/24] build(config.yml): pin langfuse version --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d56df9c32..d426d83e9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,7 +35,7 @@ jobs: pip install "aioboto3==12.3.0" pip install langchain pip install lunary==0.2.5 - pip install "langfuse>=2.0.0" + pip install "langfuse==2.7.3" pip install numpydoc pip install traceloop-sdk==0.0.69 pip install openai From 16603bfa76b88aefe2bc5a3cef99b6560a77553e Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 15:29:12 -0700 Subject: [PATCH 14/24] add stable param --- .github/workflows/ghcr_deploy.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 923137aa1..cafc24549 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -5,6 +5,10 @@ on: inputs: tag: description: "The tag version you want to build" + stable: + description: "Build Stable version" + type: boolean + default: false # Defines two custom environment variables for the workflow. Used for the Container registry domain, and a name for the Docker image that this workflow builds. env: From 82c19da0067515e70df734ff06ac2969107b49ee Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 15:37:03 -0700 Subject: [PATCH 15/24] fix using stable --- .github/workflows/ghcr_deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index cafc24549..4acfde6b1 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -91,7 +91,7 @@ jobs: with: context: . push: true - tags: ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta.outputs.tags }}-latest # if a tag is provided, use that, otherwise use the release tag, and if neither is available, use 'latest' + tags: ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.stable && 'stable' || 'latest' }} # if a tag is provided, use that, otherwise use the release tag, and if neither is available, use 'latest' labels: ${{ steps.meta.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 @@ -128,7 +128,7 @@ jobs: context: . file: Dockerfile.database push: true - tags: ${{ steps.meta-database.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-database.outputs.tags }}-latest + tags: ${{ steps.meta-database.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-database.outputs.tags }}-${{ github.event.inputs.stable && 'stable' || 'latest' }} labels: ${{ steps.meta-database.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 @@ -165,7 +165,7 @@ jobs: context: . file: ./litellm-js/spend-logs/Dockerfile push: true - tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-latest + tags: ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.tag || 'latest' }}, ${{ steps.meta-spend-logs.outputs.tags }}-${{ github.event.inputs.stable && 'stable' || 'latest' }} labels: ${{ steps.meta-spend-logs.outputs.labels }} platforms: local,linux/amd64,linux/arm64,linux/arm64/v8 From 29f24591511a0f3a5c6144c13ebd8434ce50ef1d Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 18:07:08 -0700 Subject: [PATCH 16/24] ui - simplify create key form --- ui/litellm-dashboard/src/components/create_key_button.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/create_key_button.tsx b/ui/litellm-dashboard/src/components/create_key_button.tsx index bd4fddabb..8dde3fb00 100644 --- a/ui/litellm-dashboard/src/components/create_key_button.tsx +++ b/ui/litellm-dashboard/src/components/create_key_button.tsx @@ -129,6 +129,7 @@ const CreateKey: React.FC = ({ - +