Skip to content

Commit 4368220

Browse files
diogoncalvesactions-userdiogoazevedo15claudiolemoseltociear
authored
Version 1.0.2 (#180)
* [fix] bump prerelease version in pyproject.toml * [fix] bump prerelease version in pyproject.toml * [fix] bump prerelease version in pyproject.toml * Fix docker image (#138) * Update __init__.py 1. Change start_server() from outside to inside the class. * Update __init__.py 1. Place start_server inside llm init --------- Co-authored-by: Cláudio Lemos <[email protected]> * [fix] bump prerelease version in pyproject.toml * Fix docker image (#139) * Update __init__.py 1. Change start_server() from outside to inside the class. * Update __init__.py 1. Place start_server inside llm init * Update cli.py Change how the server runs. * Update __init__.py * Update __init__.py --------- Co-authored-by: Cláudio Lemos <[email protected]> * [fix] bump prerelease version in pyproject.toml * Add llmstudio docs (#136) * Add llmstudio docs * Start creating gcp guide * Update gcp-deployment draft * Finish deploy-llmstudio-on-gcp guide. * Update deploy-on-google-cloud-platform.mdx * Fix some lettering * Update deploy-on-google-cloud-platform.mdx * Update deploy-on-google-cloud-platform.mdx * Update GCP docs --------- Co-authored-by: Cláudio Lemos <[email protected]> * [fix] bump prerelease version in pyproject.toml * docs: update ollama.mdx messeges -> messages Signed-off-by: Ikko Eltociear Ashimine <[email protected]> * [feat] beadrock added to LLM Core * [bugfix] datetime * [feat] tool_calling * [feat] processing langchain tools * feat: add ci for modules * chore: bump versions * feat: adapt develop actions * fix: github actions * fix: github actions dev * [fix] bump prerelease version in pyproject.toml * [feat] bedrock agent with langchain and langgraph * [chore] remove print * [feat] bedrock mapper * [chore] clean unused variable * [feat] bedrock arguments added * [feat] bedrock anthropic * [bugfix] import corrected * [feat] module added * [bugfix] async methods corrected * Create chore.yml Created a Chore YML template for Issues Signed-off-by: Miguel Neves <[email protected]> * [feat] async methods corrected * [fastapi] version bump * [bugfix] new release * [feat] code refactor * [feat] function calling * [chore] remove async duplicated code from openai * [chore] remove duplicated code from azure * [chore] removed unnecessary code * [bugfix] processing more than one tool * [feat] test added to langchain integration * feat: update ci for libs * feat: update dev workflow * [bugfix] get cost using langchain wrapper * [bugfix] azure init with kwargs * fix: workflow * chore: bump versions * chore: fix typo * chore: name workflow * [chore] solve pr comments * [chore] normalize return * fix: workflow * fix: workflow * fix: dev workflow * fix: workflow dev * fix: workflow dev * fix: dev workflow * [fix] bump prerelease version in pyproject.toml * fix: dev workflow * [chore] updated python dotenv * [chore] update dotenv in proxy * [fix] bump prerelease version in pyproject.toml * feat: main workflow to bump automatically alpha versions * chore: bump versions * chore: update lock files --------- Signed-off-by: Ikko Eltociear Ashimine <[email protected]> Signed-off-by: Miguel Neves <[email protected]> Co-authored-by: GitHub Actions <[email protected]> Co-authored-by: diogoazevedo15 <[email protected]> Co-authored-by: Cláudio Lemos <[email protected]> Co-authored-by: Ikko Eltociear Ashimine <[email protected]> Co-authored-by: brunoalho <[email protected]> Co-authored-by: Miguel Neves <[email protected]> Co-authored-by: brunoalho99 <[email protected]>
1 parent 6ff2124 commit 4368220

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+3287
-1869
lines changed

.github/workflows/upload-pypi-core.yml

+23-1
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,33 @@ jobs:
3535
- name: Build and publish to PyPI
3636
working-directory: ./libs/core
3737
run: |
38+
CURRENT_VERSION=$(poetry version --short)
39+
FINAL_VERSION=$(echo "$CURRENT_VERSION" | sed -E 's/[a-zA-Z]+[0-9]*//')
40+
41+
echo "Checking for llmstudio-core==$FINAL_VERSION on PyPI..."
42+
if python -m pip install llmstudio-core==$FINAL_VERSION --dry-run >/dev/null 2>&1; then
43+
echo "Package llmstudio-core==$FINAL_VERSION is already available on PyPI. Please bump version."
44+
exit 1
45+
fi
46+
done
47+
48+
poetry version "$FINAL_VERSION"
49+
echo "Updated version: $(poetry version --short)"
50+
3851
poetry build
3952
poetry publish
4053
54+
- name: Commit and push updated pyproject.toml
55+
working-directory: ./libs/core
56+
run: |
57+
git config user.name "GitHub Actions"
58+
git config user.email "[email protected]"
59+
git add pyproject.toml
60+
git commit -m "[fix] bump release version in pyproject.toml"
61+
git push
62+
4163
# Extract the new version number from pyproject.toml
42-
- name: Extract version for tagging Docker image
64+
- name: Extract version.
4365
working-directory: ./libs/core
4466
run: |
4567
echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV

.github/workflows/upload-pypi-dev.yml

+21-62
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88
type: choice
99
description: "Choose the library to deploy (note: it points to develop branch only)"
1010
options:
11-
- llmstudio
12-
- llmstudio-core
13-
- llmstudio-proxy
14-
- llmstudio-tracker
11+
- ./libs/llmstudio
12+
- ./libs/core
13+
- ./libs/proxy
14+
- ./libs/tracker
1515
target_version:
1616
description: "Target version (e.g., 1.1.0)"
1717
required: true
@@ -20,14 +20,6 @@ on:
2020
jobs:
2121
deploy:
2222
runs-on: ubuntu-latest
23-
env:
24-
MODULE_PATH: |
25-
${{
26-
inputs.library == 'llmstudio' && './libs/llmstudio' ||
27-
inputs.library == 'llmstudio-core' && './libs/core' ||
28-
inputs.library == 'llmstudio-proxy' && './libs/proxy' ||
29-
inputs.library == 'llmstudio-tracker' && './libs/tracker'
30-
}}
3123
steps:
3224
- name: Checkout code
3325
uses: actions/checkout@v3
@@ -47,49 +39,38 @@ jobs:
4739
run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
4840

4941
- name: Check PyPI for Target Version
50-
working-directory: ${{ env.MODULE_PATH }}
42+
working-directory: ${{ inputs.library }}
5143
id: check-version
5244
run: |
5345
TARGET_VERSION="${{ github.event.inputs.target_version }}"
54-
PACKAGE_NAME=${{ inputs.library }}
46+
PACKAGE_NAME=$(poetry version | awk '{print $1}')
5547
RESPONSE=$(curl -s "https://pypi.org/pypi/$PACKAGE_NAME/json" || echo "{}")
5648
echo "$RESPONSE" | jq -r '.releases | keys[]' > all_versions.txt
57-
if grep -qx "$TARGET_VERSION" all_versions.txt; then
58-
echo "exists=true" >> $GITHUB_ENV
59-
else
60-
echo "exists=false" >> $GITHUB_ENV
61-
fi
6249
63-
# Step 4: Decide on the next alpha version
64-
- name: Determine Next Alpha Version
65-
id: determine-version
66-
run: |
67-
if [[ "${{ env.exists }}" == "true" ]]; then
50+
if grep -qx "$TARGET_VERSION" all_versions.txt; then
6851
echo "Error: Version ${{ github.event.inputs.target_version }} already exists on PyPI."
6952
exit 1
7053
fi
71-
BASE_VERSION="${{ github.event.inputs.target_version }}"
72-
PACKAGE_NAME=${{ inputs.library }}
73-
ALPHA_VERSIONS=$(grep -E "^$BASE_VERSIONa[0-9]+$" all_versions.txt | sort -V || true)
74-
if [[ -z "$ALPHA_VERSIONS" ]]; then
75-
NEW_VERSION="${BASE_VERSION}a0"
54+
55+
NEXT_ALPHA=$(grep "^${TARGET_VERSION}a[0-9]*$" all_versions.txt | sort -V | tail -n 1 | awk -F'a' '{print $2}')
56+
57+
if [[ -z "$NEXT_ALPHA" ]]; then
58+
NEW_VERSION="${TARGET_VERSION}a0"
7659
else
77-
LATEST_ALPHA=$(echo "$ALPHA_VERSIONS" | tail -n 1)
78-
NEXT_ALPHA_NUM=$(( $(echo "$LATEST_ALPHA" | grep -oE '[0-9]+$') + 1 ))
79-
NEW_VERSION="${BASE_VERSION}a${NEXT_ALPHA_NUM}"
60+
NEW_VERSION="${TARGET_VERSION}a$((NEXT_ALPHA + 1))"
8061
fi
8162
echo "new_version=$NEW_VERSION" >> $GITHUB_ENV
8263
echo "Determined new version: $NEW_VERSION"
8364
8465
- name: Build and publish to PyPI as development release
85-
working-directory: ${{ env.MODULE_PATH }}
66+
working-directory: ${{ inputs.library }}
8667
run: |
8768
poetry version ${{ env.new_version }}
8869
poetry build
8970
poetry publish
9071
9172
- name: Commit and push updated pyproject.toml
92-
working-directory: ${{ env.MODULE_PATH }}
73+
working-directory: ${{ inputs.library }}
9374
run: |
9475
git config user.name "GitHub Actions"
9576
git config user.email "[email protected]"
@@ -98,43 +79,21 @@ jobs:
9879
git push
9980
10081
- name: Wait for PyPI to update
101-
working-directory: ${{ env.MODULE_PATH }}
82+
working-directory: ${{ inputs.library }}
10283
run: |
10384
VERSION=$(poetry version --short)
104-
echo "Checking for ${{ github.event.inputs.library }}==$VERSION on PyPI..."
85+
PACKAGE_NAME=$(poetry version | awk '{print $1}')
86+
echo "Checking for $PACKAGE_NAME==$VERSION on PyPI..."
10587
for i in {1..10}; do
106-
if python -m pip install ${{ github.event.inputs.library }}==${VERSION} --dry-run >/dev/null 2>&1; then
107-
echo "Package ${{ github.event.inputs.library }}==${VERSION} is available on PyPI."
88+
if python -m pip install $PACKAGE_NAME==${VERSION} --dry-run >/dev/null 2>&1; then
89+
echo "Package $PACKAGE_NAME==${VERSION} is available on PyPI."
10890
break
10991
else
110-
echo "Package ${{ github.event.inputs.library }}==${VERSION} not available yet. Waiting 15 seconds..."
92+
echo "Package $PACKAGE_NAME==${VERSION} not available yet. Waiting 15 seconds..."
11193
sleep 15
11294
fi
11395
if [ $i -eq 10 ]; then
11496
echo "Package did not become available in time."
11597
exit 1
11698
fi
11799
done
118-
119-
- name: Set up Docker Buildx
120-
uses: docker/setup-buildx-action@v2
121-
122-
- name: Log in to Docker Hub
123-
uses: docker/login-action@v2
124-
with:
125-
username: ${{ secrets.DOCKER_USERNAME }}
126-
password: ${{ secrets.DOCKER_PASSWORD }}
127-
128-
- name: Extract version for tagging Docker image
129-
working-directory: ${{ env.MODULE_PATH }}
130-
id: get_version
131-
run: echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV
132-
133-
- name: Build Docker images
134-
working-directory: ./deploy
135-
run: |
136-
make version=${{ env.VERSION }} build-${{ github.event.inputs.library }}
137-
138-
- name: Push Docker images
139-
run: |
140-
docker push tensoropsai/${{ github.event.inputs.library }}:${{ env.VERSION }}

.github/workflows/upload-pypi-proxy.yml

+24-8
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,35 @@ jobs:
3535
- name: Build and publish to PyPI
3636
working-directory: ./libs/proxy
3737
run: |
38+
CURRENT_VERSION=$(poetry version --short)
39+
FINAL_VERSION=$(echo "$CURRENT_VERSION" | sed -E 's/[a-zA-Z]+[0-9]*//')
40+
41+
echo "Checking for llmstudio-proxy==$FINAL_VERSION on PyPI..."
42+
if python -m pip install llmstudio-proxy==$FINAL_VERSION --dry-run >/dev/null 2>&1; then
43+
echo "Package llmstudio-proxy==$FINAL_VERSION is already available on PyPI. Please bump version."
44+
exit 1
45+
fi
46+
done
47+
48+
poetry version "$FINAL_VERSION"
49+
echo "Updated version: $(poetry version --short)"
50+
3851
poetry build
3952
poetry publish
4053
41-
# Extract the new version number from pyproject.toml
42-
- name: Extract version for tagging Docker image
54+
- name: Commit and push updated pyproject.toml
4355
working-directory: ./libs/proxy
4456
run: |
45-
echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV
57+
git config user.name "GitHub Actions"
58+
git config user.email "[email protected]"
59+
git add pyproject.toml
60+
git commit -m "[fix] bump release version in pyproject.toml"
61+
git push
62+
63+
- name: Extract version for tagging Docker image
64+
working-directory: ./libs/proxy
65+
id: get_version
66+
run: echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV
4667

4768
# Wait for the package to become available on PyPI
4869
- name: Wait for PyPI to update
@@ -71,11 +92,6 @@ jobs:
7192
username: ${{ secrets.DOCKER_USERNAME }}
7293
password: ${{ secrets.DOCKER_PASSWORD }}
7394

74-
- name: Extract version for tagging Docker image
75-
working-directory: ./libs/proxy
76-
id: get_version
77-
run: echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV
78-
7995
- name: Build Docker images
8096
working-directory: ./deploy
8197
run: |

.github/workflows/upload-pypi-sdk.yml

+19-3
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,30 @@ jobs:
3535
- name: Build and publish to PyPI
3636
working-directory: ./libs/llmstudio
3737
run: |
38+
CURRENT_VERSION=$(poetry version --short)
39+
FINAL_VERSION=$(echo "$CURRENT_VERSION" | sed -E 's/[a-zA-Z]+[0-9]*//')
40+
41+
echo "Checking for llmstudio==$FINAL_VERSION on PyPI..."
42+
if python -m pip install llmstudio==$FINAL_VERSION --dry-run >/dev/null 2>&1; then
43+
echo "Package llmstudio==$FINAL_VERSION is already available on PyPI. Please bump version."
44+
exit 1
45+
fi
46+
done
47+
48+
poetry version "$FINAL_VERSION"
49+
echo "Updated version: $(poetry version --short)"
50+
3851
poetry build
3952
poetry publish
4053
41-
# Extract the new version number from pyproject.toml
42-
- name: Extract version for tagging Docker image
54+
- name: Commit and push updated pyproject.toml
4355
working-directory: ./libs/llmstudio
4456
run: |
45-
echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV
57+
git config user.name "GitHub Actions"
58+
git config user.email "[email protected]"
59+
git add pyproject.toml
60+
git commit -m "[fix] bump release version in pyproject.toml"
61+
git push
4662
4763
# Wait for the package to become available on PyPI
4864
- name: Wait for PyPI to update

.github/workflows/upload-pypi-tracker.yml

+24-8
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,35 @@ jobs:
3535
- name: Build and publish to PyPI
3636
working-directory: ./libs/tracker
3737
run: |
38+
CURRENT_VERSION=$(poetry version --short)
39+
FINAL_VERSION=$(echo "$CURRENT_VERSION" | sed -E 's/[a-zA-Z]+[0-9]*//')
40+
41+
echo "Checking for llmstudio-tracker==$FINAL_VERSION on PyPI..."
42+
if python -m pip install llmstudio-tracker==$FINAL_VERSION --dry-run >/dev/null 2>&1; then
43+
echo "Package llmstudio-tracker==$FINAL_VERSION is already available on PyPI. Please bump version."
44+
exit 1
45+
fi
46+
done
47+
48+
poetry version "$FINAL_VERSION"
49+
echo "Updated version: $(poetry version --short)"
50+
3851
poetry build
3952
poetry publish
4053
41-
# Extract the new version number from pyproject.toml
42-
- name: Extract version for tagging Docker image
54+
- name: Commit and push updated pyproject.toml
4355
working-directory: ./libs/tracker
4456
run: |
45-
echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV
57+
git config user.name "GitHub Actions"
58+
git config user.email "[email protected]"
59+
git add pyproject.toml
60+
git commit -m "[fix] bump release version in pyproject.toml"
61+
git push
62+
63+
- name: Extract version for tagging Docker image
64+
working-directory: ./libs/tracker
65+
id: get_version
66+
run: echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV
4667

4768
# Wait for the package to become available on PyPI
4869
- name: Wait for PyPI to update
@@ -71,11 +92,6 @@ jobs:
7192
username: ${{ secrets.DOCKER_USERNAME }}
7293
password: ${{ secrets.DOCKER_PASSWORD }}
7394

74-
- name: Extract version for tagging Docker image
75-
working-directory: ./libs/tracker
76-
id: get_version
77-
run: echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV
78-
7995
- name: Build Docker images
8096
working-directory: ./deploy
8197
run: |

0 commit comments

Comments
 (0)