diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 52abf1db..91b06ba8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,10 @@ # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file version: 2 updates: + - package-ecosystem: "gitsubmodule" + directory: "/" + schedule: + interval: "weekly" - package-ecosystem: "gomod" directory: "/" schedule: @@ -23,3 +27,111 @@ updates: schedule: # Check for updates to GitHub Actions every weekday interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/autogptq" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/bark" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/common/template" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/coqui" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/diffusers" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/exllama" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/exllama2" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/mamba" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/openvoice" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/parler-tts" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/petals" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/rerankers" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/sentencetransformers" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/transformers" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/transformers-musicgen" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/vall-e-x" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/backend/python/vllm" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/examples/chainlit" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/examples/functions" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/examples/langchain/langchainpy-localai-example" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/examples/langchain-chroma" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/examples/streamlit-bot" + schedule: + interval: "weekly" + - package-ecosystem: "docker" + directory: "/examples/k8sgpt" + schedule: + interval: "weekly" + - package-ecosystem: "docker" + directory: "/examples/kubernetes" + schedule: + interval: "weekly" + - package-ecosystem: "docker" + directory: "/examples/langchain" + schedule: + interval: "weekly" + - package-ecosystem: "gomod" + directory: "/examples/semantic-todo" + schedule: + interval: "weekly" + - package-ecosystem: "docker" + directory: "/examples/telegram-bot" + schedule: + interval: "weekly" diff --git a/.github/workflows/bump_deps.yaml b/.github/workflows/bump_deps.yaml index 7dbe22b2..5909c981 100644 --- a/.github/workflows/bump_deps.yaml +++ b/.github/workflows/bump_deps.yaml @@ -27,9 +27,6 @@ jobs: - repository: "go-skynet/bloomz.cpp" variable: "BLOOMZ_VERSION" branch: "main" - - repository: "nomic-ai/gpt4all" - variable: "GPT4ALL_VERSION" - branch: "main" - repository: "mudler/go-ggllm.cpp" variable: "GOGGLLM_VERSION" branch: "master" @@ -51,7 +48,7 @@ jobs: token: ${{ secrets.UPDATE_BOT_TOKEN }} push-to-fork: ci-forks/LocalAI commit-message: ':arrow_up: Update ${{ matrix.repository }}' - title: ':arrow_up: Update ${{ matrix.repository }}' + title: 'chore: :arrow_up: Update ${{ matrix.repository }}' branch: "update/${{ matrix.variable }}" body: Bump of ${{ matrix.repository }} version signoff: true diff --git a/.github/workflows/bump_docs.yaml b/.github/workflows/bump_docs.yaml index c3ab1698..218dcc61 100644 --- a/.github/workflows/bump_docs.yaml +++ b/.github/workflows/bump_docs.yaml @@ -22,7 +22,7 @@ jobs: token: ${{ secrets.UPDATE_BOT_TOKEN }} push-to-fork: ci-forks/LocalAI commit-message: ':arrow_up: Update docs version ${{ matrix.repository }}' - title: ':arrow_up: Update docs version ${{ matrix.repository }}' + title: 'docs: :arrow_up: update docs version ${{ matrix.repository }}' branch: "update/docs" body: Bump of ${{ matrix.repository }} version inside docs signoff: true diff --git a/.github/workflows/checksum_checker.yaml b/.github/workflows/checksum_checker.yaml index 10050e2b..b76b7aff 100644 --- a/.github/workflows/checksum_checker.yaml +++ b/.github/workflows/checksum_checker.yaml @@ -20,12 +20,12 @@ jobs: run: | sudo apt-get update sudo apt-get install -y pip wget - sudo pip install --upgrade pip + sudo pip install --upgrade pip pip install huggingface_hub - name: 'Setup yq' uses: dcarbone/install-yq-action@v1.1.1 with: - version: 'v4.43.1' + version: 'v4.44.2' download-compressed: true force: true diff --git a/.github/workflows/comment-pr.yaml b/.github/workflows/comment-pr.yaml new file mode 100644 index 00000000..1e5e93a1 --- /dev/null +++ b/.github/workflows/comment-pr.yaml @@ -0,0 +1,81 @@ +name: Comment PRs +on: + pull_request_target: + +jobs: + comment-pr: + env: + MODEL_NAME: hermes-2-theta-llama-3-8b + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: "${{ github.event.pull_request.merge_commit_sha }}" + - uses: mudler/localai-github-action@v1 + with: + model: 'hermes-2-theta-llama-3-8b' # Any from models.localai.io, or from huggingface.com with: "huggingface:///file" + # Check the PR diff using the current branch and the base branch of the PR + - uses: GrantBirki/git-diff-action@v2.7.0 + id: git-diff-action + with: + json_diff_file_output: diff.json + raw_diff_file_output: diff.txt + file_output_only: "true" + - name: Show diff + env: + DIFF: ${{ steps.git-diff-action.outputs.raw-diff-path }} + run: | + cat $DIFF + - name: Summarize + env: + DIFF: ${{ steps.git-diff-action.outputs.raw-diff-path }} + id: summarize + run: | + input="$(cat $DIFF)" + + # Define the LocalAI API endpoint + API_URL="http://localhost:8080/chat/completions" + + # Create a JSON payload using jq to handle special characters + json_payload=$(jq -n --arg input "$input" '{ + model: "'$MODEL_NAME'", + messages: [ + { + role: "system", + content: "You are LocalAI-bot in Github that helps understanding PRs and assess complexity. Explain what has changed in this PR diff and why" + }, + { + role: "user", + content: $input + } + ] + }') + + # Send the request to LocalAI + response=$(curl -s -X POST $API_URL \ + -H "Content-Type: application/json" \ + -d "$json_payload") + + # Extract the summary from the response + summary="$(echo $response | jq -r '.choices[0].message.content')" + + # Print the summary + # -H "Authorization: Bearer $API_KEY" \ + echo "Summary:" + echo "$summary" + echo "payload sent" + echo "$json_payload" + { + echo 'message<> "$GITHUB_OUTPUT" + docker logs --tail 10 local-ai + - uses: mshick/add-pr-comment@v2 + if: always() + with: + repo-token: ${{ secrets.UPDATE_BOT_TOKEN }} + message: ${{ steps.summarize.outputs.message }} + message-failure: | + Uh oh! Could not analyze this PR, maybe it's too big? diff --git a/.github/workflows/dependabot_auto.yml b/.github/workflows/dependabot_auto.yml index c5b8f4aa..951e65e1 100644 --- a/.github/workflows/dependabot_auto.yml +++ b/.github/workflows/dependabot_auto.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v2.1.0 + uses: dependabot/fetch-metadata@v2.2.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" skip-commit-verification: true diff --git a/.github/workflows/generate_grpc_cache.yaml b/.github/workflows/generate_grpc_cache.yaml index fa5ccf20..0b9105aa 100644 --- a/.github/workflows/generate_grpc_cache.yaml +++ b/.github/workflows/generate_grpc_cache.yaml @@ -75,7 +75,7 @@ jobs: uses: actions/checkout@v4 - name: Cache GRPC - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: builder: ${{ steps.buildx.outputs.name }} # The build-args MUST be an EXACT match between the image cache and other workflow steps that want to use that cache. @@ -84,11 +84,11 @@ jobs: build-args: | GRPC_BASE_IMAGE=${{ matrix.grpc-base-image }} GRPC_MAKEFLAGS=--jobs=4 --output-sync=target - GRPC_VERSION=v1.64.0 + GRPC_VERSION=v1.65.0 context: . file: ./Dockerfile cache-to: type=gha,ignore-error=true cache-from: type=gha target: grpc platforms: ${{ matrix.platforms }} - push: false \ No newline at end of file + push: false diff --git a/.github/workflows/generate_intel_image.yaml b/.github/workflows/generate_intel_image.yaml index 97b24f45..0c2a7670 100644 --- a/.github/workflows/generate_intel_image.yaml +++ b/.github/workflows/generate_intel_image.yaml @@ -15,7 +15,7 @@ jobs: strategy: matrix: include: - - base-image: intel/oneapi-basekit:2024.1.0-devel-ubuntu22.04 + - base-image: intel/oneapi-basekit:2024.2.0-devel-ubuntu22.04 runs-on: 'ubuntu-latest' platforms: 'linux/amd64' runs-on: ${{matrix.runs-on}} @@ -46,7 +46,7 @@ jobs: uses: actions/checkout@v4 - name: Cache Intel images - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: builder: ${{ steps.buildx.outputs.name }} build-args: | diff --git a/.github/workflows/image_build.yml b/.github/workflows/image_build.yml index c891d3dd..4a5735e5 100644 --- a/.github/workflows/image_build.yml +++ b/.github/workflows/image_build.yml @@ -215,7 +215,7 @@ jobs: password: ${{ secrets.quayPassword }} - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 if: github.event_name != 'pull_request' with: builder: ${{ steps.buildx.outputs.name }} @@ -232,7 +232,7 @@ jobs: BASE_IMAGE=${{ inputs.base-image }} GRPC_BASE_IMAGE=${{ inputs.grpc-base-image || inputs.base-image }} GRPC_MAKEFLAGS=--jobs=4 --output-sync=target - GRPC_VERSION=v1.64.0 + GRPC_VERSION=v1.65.0 MAKEFLAGS=${{ inputs.makeflags }} context: . file: ./Dockerfile @@ -243,7 +243,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} ### Start testing image - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 if: github.event_name == 'pull_request' with: builder: ${{ steps.buildx.outputs.name }} @@ -260,7 +260,7 @@ jobs: BASE_IMAGE=${{ inputs.base-image }} GRPC_BASE_IMAGE=${{ inputs.grpc-base-image || inputs.base-image }} GRPC_MAKEFLAGS=--jobs=4 --output-sync=target - GRPC_VERSION=v1.64.0 + GRPC_VERSION=v1.65.0 MAKEFLAGS=${{ inputs.makeflags }} context: . file: ./Dockerfile @@ -276,7 +276,7 @@ jobs: ## End testing image - name: Build and push AIO image if: inputs.aio != '' - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: builder: ${{ steps.buildx.outputs.name }} build-args: | @@ -291,7 +291,7 @@ jobs: - name: Build and push AIO image (dockerhub) if: inputs.aio != '' - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: builder: ${{ steps.buildx.outputs.name }} build-args: | diff --git a/.github/workflows/notify-models.yaml b/.github/workflows/notify-models.yaml index 43039b78..d6a7b210 100644 --- a/.github/workflows/notify-models.yaml +++ b/.github/workflows/notify-models.yaml @@ -14,12 +14,10 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # needed to checkout all branches for this Action to work - - name: Start LocalAI - run: | - echo "Starting LocalAI..." - docker run -e -ti -d --name local-ai -p 8080:8080 localai/localai:master-ffmpeg-core run --debug $MODEL_NAME - until [ "`docker inspect -f {{.State.Health.Status}} local-ai`" == "healthy" ]; do echo "Waiting for container to be ready"; docker logs --tail 10 local-ai; sleep 2; done - # Check the PR diff using the current branch and the base branch of the PR + - uses: mudler/localai-github-action@v1 + with: + model: 'hermes-2-theta-llama-3-8b' # Any from models.localai.io, or from huggingface.com with: "huggingface:///file" + # Check the PR diff using the current branch and the base branch of the PR - uses: GrantBirki/git-diff-action@v2.7.0 id: git-diff-action with: diff --git a/.github/workflows/notify-releases.yaml b/.github/workflows/notify-releases.yaml index 0f4379aa..faaaacdb 100644 --- a/.github/workflows/notify-releases.yaml +++ b/.github/workflows/notify-releases.yaml @@ -12,11 +12,9 @@ jobs: RELEASE_TITLE: ${{ github.event.release.name }} RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} steps: - - name: Start LocalAI - run: | - echo "Starting LocalAI..." - docker run -e -ti -d --name local-ai -p 8080:8080 localai/localai:master-ffmpeg-core run --debug $MODEL_NAME - until [ "`docker inspect -f {{.State.Health.Status}} local-ai`" == "healthy" ]; do echo "Waiting for container to be ready"; docker logs --tail 10 local-ai; sleep 2; done + - uses: mudler/localai-github-action@v1 + with: + model: 'hermes-2-theta-llama-3-8b' # Any from models.localai.io, or from huggingface.com with: "huggingface:///file" - name: Summarize id: summarize run: | diff --git a/.github/workflows/prlint.yaml b/.github/workflows/prlint.yaml index 471985f6..66f338e4 100644 --- a/.github/workflows/prlint.yaml +++ b/.github/workflows/prlint.yaml @@ -17,12 +17,12 @@ jobs: - uses: aslafy-z/conventional-pr-title-action@v3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - check-pr-description: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: jadrol/pr-description-checker-action@v1.0.0 - id: description-checker - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - exempt-labels: no qa +# check-pr-description: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2 +# - uses: jadrol/pr-description-checker-action@v1.0.0 +# id: description-checker +# with: +# repo-token: ${{ secrets.GITHUB_TOKEN }} +# exempt-labels: no qa diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8c411450..92e07326 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,7 +7,7 @@ on: pull_request: env: - GRPC_VERSION: v1.64.0 + GRPC_VERSION: v1.65.0 permissions: contents: write @@ -99,8 +99,8 @@ jobs: CROSS_TOOLCHAIN=/usr/$GNU_HOST CROSS_STAGING_PREFIX=$CROSS_TOOLCHAIN/stage CMAKE_CROSS_TOOLCHAIN=/tmp/arm.toolchain.cmake - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@8ba23be9613c672d40ae261d2a1335d639bdd59b - go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.0 + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@1958fcbe2ca8bd93af633f11e97d44e567e945af + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 export PATH=$PATH:$GOPATH/bin export PATH=/usr/local/cuda/bin:$PATH sudo rm -rf /usr/aarch64-linux-gnu/lib/libstdc++.so.6 @@ -163,7 +163,7 @@ jobs: sudo apt-get update sudo apt-get install -y cuda-nvcc-${CUDA_VERSION} libcublas-dev-${CUDA_VERSION} env: - CUDA_VERSION: 12-3 + CUDA_VERSION: 12-5 - name: "Install Hipblas" env: ROCM_VERSION: "6.1" @@ -210,8 +210,8 @@ jobs: - name: Build id: build run: | - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@8ba23be9613c672d40ae261d2a1335d639bdd59b - go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.0 + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@1958fcbe2ca8bd93af633f11e97d44e567e945af + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 export PATH=$PATH:$GOPATH/bin export PATH=/usr/local/cuda/bin:$PATH export PATH=/opt/rocm/bin:$PATH @@ -251,8 +251,8 @@ jobs: run: | sudo apt-get update sudo apt-get install -y --no-install-recommends libopencv-dev protobuf-compiler ccache - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@8ba23be9613c672d40ae261d2a1335d639bdd59b - go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.0 + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@1958fcbe2ca8bd93af633f11e97d44e567e945af + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 - name: Build stablediffusion run: | export PATH=$PATH:$GOPATH/bin @@ -327,8 +327,8 @@ jobs: - name: Dependencies run: | brew install protobuf grpc - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@8ba23be9613c672d40ae261d2a1335d639bdd59b - go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.0 + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@1958fcbe2ca8bd93af633f11e97d44e567e945af + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 - name: Build id: build run: | diff --git a/.github/workflows/test-extra.yml b/.github/workflows/test-extra.yml index 0ec6ef9e..e969a95f 100644 --- a/.github/workflows/test-extra.yml +++ b/.github/workflows/test-extra.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Clone uses: actions/checkout@v4 - with: + with: submodules: true - name: Dependencies run: | @@ -29,8 +29,8 @@ jobs: curl -LsSf https://astral.sh/uv/install.sh | sh sudo apt-get install -y ca-certificates cmake curl patch python3-pip sudo apt-get install -y libopencv-dev - pip install --user grpcio-tools==1.64.0 - + pip install --user --no-cache-dir grpcio-tools==1.64.1 + - name: Test transformers run: | make --jobs=5 --output-sync=target -C backend/python/transformers @@ -41,7 +41,7 @@ jobs: steps: - name: Clone uses: actions/checkout@v4 - with: + with: submodules: true - name: Dependencies run: | @@ -51,8 +51,8 @@ jobs: curl -LsSf https://astral.sh/uv/install.sh | sh sudo apt-get install -y ca-certificates cmake curl patch python3-pip sudo apt-get install -y libopencv-dev - pip install --user grpcio-tools==1.64.0 - + pip install --user --no-cache-dir grpcio-tools==1.64.1 + - name: Test sentencetransformers run: | make --jobs=5 --output-sync=target -C backend/python/sentencetransformers @@ -64,7 +64,7 @@ jobs: steps: - name: Clone uses: actions/checkout@v4 - with: + with: submodules: true - name: Dependencies run: | @@ -74,7 +74,7 @@ jobs: curl -LsSf https://astral.sh/uv/install.sh | sh sudo apt-get install -y ca-certificates cmake curl patch python3-pip sudo apt-get install -y libopencv-dev - pip install --user grpcio-tools==1.64.0 + pip install --user --no-cache-dir grpcio-tools==1.64.1 - name: Test rerankers run: | @@ -86,7 +86,7 @@ jobs: steps: - name: Clone uses: actions/checkout@v4 - with: + with: submodules: true - name: Dependencies run: | @@ -96,7 +96,7 @@ jobs: sudo apt-get install -y libopencv-dev # Install UV curl -LsSf https://astral.sh/uv/install.sh | sh - pip install --user grpcio-tools==1.64.0 + pip install --user --no-cache-dir grpcio-tools==1.64.1 - name: Test diffusers run: | make --jobs=5 --output-sync=target -C backend/python/diffusers @@ -107,7 +107,7 @@ jobs: steps: - name: Clone uses: actions/checkout@v4 - with: + with: submodules: true - name: Dependencies run: | @@ -117,19 +117,19 @@ jobs: curl -LsSf https://astral.sh/uv/install.sh | sh sudo apt-get install -y ca-certificates cmake curl patch python3-pip sudo apt-get install -y libopencv-dev - pip install --user grpcio-tools==1.64.0 + pip install --user --no-cache-dir grpcio-tools==1.64.1 - name: Test parler-tts run: | make --jobs=5 --output-sync=target -C backend/python/parler-tts make --jobs=5 --output-sync=target -C backend/python/parler-tts test - + tests-openvoice: runs-on: ubuntu-latest steps: - name: Clone uses: actions/checkout@v4 - with: + with: submodules: true - name: Dependencies run: | @@ -139,7 +139,7 @@ jobs: curl -LsSf https://astral.sh/uv/install.sh | sh sudo apt-get install -y ca-certificates cmake curl patch python3-pip sudo apt-get install -y libopencv-dev - pip install --user grpcio-tools==1.64.0 + pip install --user --no-cache-dir grpcio-tools==1.64.1 - name: Test openvoice run: | @@ -151,7 +151,7 @@ jobs: steps: - name: Clone uses: actions/checkout@v4 - with: + with: submodules: true - name: Dependencies run: | @@ -161,7 +161,7 @@ jobs: curl -LsSf https://astral.sh/uv/install.sh | sh sudo apt-get install -y ca-certificates cmake curl patch python3-pip sudo apt-get install -y libopencv-dev - pip install --user grpcio-tools==1.64.0 + pip install --user --no-cache-dir grpcio-tools==1.64.1 - name: Test transformers-musicgen run: | @@ -175,7 +175,7 @@ jobs: # steps: # - name: Clone # uses: actions/checkout@v4 - # with: + # with: # submodules: true # - name: Dependencies # run: | @@ -185,14 +185,14 @@ jobs: # curl -LsSf https://astral.sh/uv/install.sh | sh # sudo apt-get install -y ca-certificates cmake curl patch python3-pip # sudo apt-get install -y libopencv-dev - # pip install --user grpcio-tools==1.64.0 + # pip install --user --no-cache-dir grpcio-tools==1.64.1 # - name: Test petals # run: | # make --jobs=5 --output-sync=target -C backend/python/petals # make --jobs=5 --output-sync=target -C backend/python/petals test - + # tests-bark: # runs-on: ubuntu-latest @@ -239,7 +239,7 @@ jobs: # df -h # - name: Clone # uses: actions/checkout@v4 - # with: + # with: # submodules: true # - name: Dependencies # run: | @@ -249,14 +249,14 @@ jobs: # curl -LsSf https://astral.sh/uv/install.sh | sh # sudo apt-get install -y ca-certificates cmake curl patch python3-pip # sudo apt-get install -y libopencv-dev - # pip install --user grpcio-tools==1.64.0 + # pip install --user --no-cache-dir grpcio-tools==1.64.1 # - name: Test bark # run: | # make --jobs=5 --output-sync=target -C backend/python/bark # make --jobs=5 --output-sync=target -C backend/python/bark test - + # Below tests needs GPU. Commented out for now # TODO: Re-enable as soon as we have GPU nodes # tests-vllm: @@ -264,7 +264,7 @@ jobs: # steps: # - name: Clone # uses: actions/checkout@v4 - # with: + # with: # submodules: true # - name: Dependencies # run: | @@ -274,7 +274,7 @@ jobs: # curl -LsSf https://astral.sh/uv/install.sh | sh # sudo apt-get install -y ca-certificates cmake curl patch python3-pip # sudo apt-get install -y libopencv-dev - # pip install --user grpcio-tools==1.64.0 + # pip install --user --no-cache-dir grpcio-tools==1.64.1 # - name: Test vllm # run: | # make --jobs=5 --output-sync=target -C backend/python/vllm @@ -284,7 +284,7 @@ jobs: steps: - name: Clone uses: actions/checkout@v4 - with: + with: submodules: true - name: Dependencies run: | @@ -294,7 +294,7 @@ jobs: curl -LsSf https://astral.sh/uv/install.sh | sh sudo apt-get install -y ca-certificates cmake curl patch python3-pip sudo apt-get install -y libopencv-dev - pip install --user grpcio-tools==1.64.0 + pip install --user --no-cache-dir grpcio-tools==1.64.1 - name: Test vall-e-x run: | make --jobs=5 --output-sync=target -C backend/python/vall-e-x @@ -305,7 +305,7 @@ jobs: steps: - name: Clone uses: actions/checkout@v4 - with: + with: submodules: true - name: Dependencies run: | @@ -314,8 +314,8 @@ jobs: sudo apt-get install -y ca-certificates cmake curl patch espeak espeak-ng python3-pip # Install UV curl -LsSf https://astral.sh/uv/install.sh | sh - pip install --user grpcio-tools==1.64.0 + pip install --user --no-cache-dir grpcio-tools==1.64.1 - name: Test coqui run: | make --jobs=5 --output-sync=target -C backend/python/coqui - make --jobs=5 --output-sync=target -C backend/python/coqui test \ No newline at end of file + make --jobs=5 --output-sync=target -C backend/python/coqui test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 082e27cb..084d016d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ on: - '*' env: - GRPC_VERSION: v1.64.0 + GRPC_VERSION: v1.65.0 concurrency: group: ci-tests-${{ github.head_ref || github.ref }}-${{ github.repository }} @@ -94,8 +94,8 @@ jobs: sudo apt-get install -y cuda-nvcc-${CUDA_VERSION} libcublas-dev-${CUDA_VERSION} export CUDACXX=/usr/local/cuda/bin/nvcc - go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.0 - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@8ba23be9613c672d40ae261d2a1335d639bdd59b + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@1958fcbe2ca8bd93af633f11e97d44e567e945af # The python3-grpc-tools package in 22.04 is too old pip install --user grpcio-tools @@ -110,7 +110,7 @@ jobs: # Pre-build stable diffusion before we install a newer version of abseil (not compatible with stablediffusion-ncn) PATH="$PATH:/root/go/bin" GO_TAGS="stablediffusion tts" GRPC_BACKENDS=backend-assets/grpc/stablediffusion make build env: - CUDA_VERSION: 12-3 + CUDA_VERSION: 12-4 - name: Cache grpc id: cache-grpc uses: actions/cache@v4 @@ -215,7 +215,7 @@ jobs: - name: Dependencies run: | brew install protobuf grpc make protoc-gen-go protoc-gen-go-grpc - pip install --user grpcio-tools==1.64.0 + pip install --user --no-cache-dir grpcio-tools==1.64.1 - name: Test run: | export C_INCLUDE_PATH=/usr/local/include diff --git a/.github/workflows/update_swagger.yaml b/.github/workflows/update_swagger.yaml index 878f5a72..b59e78c0 100644 --- a/.github/workflows/update_swagger.yaml +++ b/.github/workflows/update_swagger.yaml @@ -13,11 +13,17 @@ jobs: - uses: actions/setup-go@v5 with: go-version: 'stable' + - name: Dependencies + run: | + sudo apt-get update + sudo apt-get install protobuf-compiler - run: | go install github.com/swaggo/swag/cmd/swag@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@1958fcbe2ca8bd93af633f11e97d44e567e945af + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 - name: Bump swagger 🔧 run: | - make swagger + make protogen-go swagger - name: Create Pull Request uses: peter-evans/create-pull-request@v6 with: diff --git a/Dockerfile b/Dockerfile index e1c06a4a..78ed4cd3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ FROM ${BASE_IMAGE} AS requirements-core USER root -ARG GO_VERSION=1.22.4 +ARG GO_VERSION=1.22.5 ARG TARGETARCH ARG TARGETVARIANT @@ -108,11 +108,11 @@ RUN <grammar(); data["prompt"] = predict->prompt(); data["ignore_eos"] = predict->ignoreeos(); + data["embeddings"] = predict->embeddings(); // for each image in the request, add the image data // @@ -2385,6 +2386,31 @@ public: return grpc::Status::OK; } + + /// https://github.com/ggerganov/llama.cpp/blob/aa2341298924ac89778252015efcb792f2df1e20/examples/server/server.cpp#L2969 + grpc::Status Embedding(ServerContext* context, const backend::PredictOptions* request, backend::EmbeddingResult* embeddingResult) { + json data = parse_options(false, request, llama); + const int task_id = llama.queue_tasks.get_new_id(); + llama.queue_results.add_waiting_task_id(task_id); + llama.request_completion(task_id, { {"prompt", data["embeddings"]}, { "n_predict", 0}, {"image_data", ""} }, false, true, -1); + // get the result + task_result result = llama.queue_results.recv(task_id); + //std::cout << "Embedding result JSON" << result.result_json.dump() << std::endl; + llama.queue_results.remove_waiting_task_id(task_id); + if (!result.error && result.stop) { + std::vector embeddings = result.result_json.value("embedding", std::vector()); + // loop the vector and set the embeddings results + for (int i = 0; i < embeddings.size(); i++) { + embeddingResult->add_embeddings(embeddings[i]); + } + } + else + { + return grpc::Status::OK; + } + + return grpc::Status::OK; + } }; void RunServer(const std::string& server_address) { diff --git a/backend/go/llm/llama/llama.go b/backend/go/llm/llama/llama.go index cd23990e..33eb708b 100644 --- a/backend/go/llm/llama/llama.go +++ b/backend/go/llm/llama/llama.go @@ -6,9 +6,9 @@ import ( "fmt" "path/filepath" - pb "github.com/go-skynet/LocalAI/pkg/grpc/proto" "github.com/go-skynet/go-llama.cpp" "github.com/mudler/LocalAI/pkg/grpc/base" + pb "github.com/mudler/LocalAI/pkg/grpc/proto" ) type LLM struct { diff --git a/backend/python/autogptq/requirements-intel.txt b/backend/python/autogptq/requirements-intel.txt index 95d4848c..635b4c31 100644 --- a/backend/python/autogptq/requirements-intel.txt +++ b/backend/python/autogptq/requirements-intel.txt @@ -2,4 +2,4 @@ intel-extension-for-pytorch torch optimum[openvino] -setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file +setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file diff --git a/backend/python/autogptq/requirements.txt b/backend/python/autogptq/requirements.txt index 7a18bfc0..e416adb2 100644 --- a/backend/python/autogptq/requirements.txt +++ b/backend/python/autogptq/requirements.txt @@ -1,6 +1,6 @@ accelerate auto-gptq==0.7.1 -grpcio==1.64.0 +grpcio==1.65.0 protobuf torch certifi diff --git a/backend/python/bark/requirements-intel.txt b/backend/python/bark/requirements-intel.txt index e6b4afc0..5c4aa6a5 100644 --- a/backend/python/bark/requirements-intel.txt +++ b/backend/python/bark/requirements-intel.txt @@ -3,4 +3,4 @@ intel-extension-for-pytorch torch torchaudio optimum[openvino] -setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file +setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file diff --git a/backend/python/bark/requirements.txt b/backend/python/bark/requirements.txt index 6680a8b5..215b3d35 100644 --- a/backend/python/bark/requirements.txt +++ b/backend/python/bark/requirements.txt @@ -1,6 +1,6 @@ accelerate bark==0.1.5 -grpcio==1.64.0 +grpcio==1.65.0 protobuf certifi transformers \ No newline at end of file diff --git a/backend/python/common/template/requirements.txt b/backend/python/common/template/requirements.txt index 4a3bd2bc..c762c4d6 100644 --- a/backend/python/common/template/requirements.txt +++ b/backend/python/common/template/requirements.txt @@ -1,2 +1,2 @@ -grpcio==1.64.0 +grpcio==1.65.0 protobuf \ No newline at end of file diff --git a/backend/python/coqui/requirements-intel.txt b/backend/python/coqui/requirements-intel.txt index e6b4afc0..5c4aa6a5 100644 --- a/backend/python/coqui/requirements-intel.txt +++ b/backend/python/coqui/requirements-intel.txt @@ -3,4 +3,4 @@ intel-extension-for-pytorch torch torchaudio optimum[openvino] -setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file +setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file diff --git a/backend/python/coqui/requirements.txt b/backend/python/coqui/requirements.txt index 24621f34..d7dd07e4 100644 --- a/backend/python/coqui/requirements.txt +++ b/backend/python/coqui/requirements.txt @@ -1,6 +1,6 @@ accelerate TTS==0.22.0 -grpcio==1.64.0 +grpcio==1.65.0 protobuf certifi transformers \ No newline at end of file diff --git a/backend/python/diffusers/backend.py b/backend/python/diffusers/backend.py index 1496fa94..a348d290 100755 --- a/backend/python/diffusers/backend.py +++ b/backend/python/diffusers/backend.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 from concurrent import futures - +import traceback import argparse from collections import defaultdict from enum import Enum @@ -17,35 +17,39 @@ import backend_pb2_grpc import grpc -from diffusers import StableDiffusion3Pipeline, StableDiffusionXLPipeline, StableDiffusionDepth2ImgPipeline, DPMSolverMultistepScheduler, StableDiffusionPipeline, DiffusionPipeline, EulerAncestralDiscreteScheduler +from diffusers import StableDiffusion3Pipeline, StableDiffusionXLPipeline, StableDiffusionDepth2ImgPipeline, DPMSolverMultistepScheduler, StableDiffusionPipeline, DiffusionPipeline, \ + EulerAncestralDiscreteScheduler from diffusers import StableDiffusionImg2ImgPipeline, AutoPipelineForText2Image, ControlNetModel, StableVideoDiffusionPipeline from diffusers.pipelines.stable_diffusion import safety_checker -from diffusers.utils import load_image,export_to_video +from diffusers.utils import load_image, export_to_video from compel import Compel, ReturnedEmbeddingsType from transformers import CLIPTextModel from safetensors.torch import load_file - _ONE_DAY_IN_SECONDS = 60 * 60 * 24 -COMPEL=os.environ.get("COMPEL", "0") == "1" -XPU=os.environ.get("XPU", "0") == "1" -CLIPSKIP=os.environ.get("CLIPSKIP", "1") == "1" -SAFETENSORS=os.environ.get("SAFETENSORS", "1") == "1" -CHUNK_SIZE=os.environ.get("CHUNK_SIZE", "8") -FPS=os.environ.get("FPS", "7") -DISABLE_CPU_OFFLOAD=os.environ.get("DISABLE_CPU_OFFLOAD", "0") == "1" -FRAMES=os.environ.get("FRAMES", "64") +COMPEL = os.environ.get("COMPEL", "0") == "1" +XPU = os.environ.get("XPU", "0") == "1" +CLIPSKIP = os.environ.get("CLIPSKIP", "1") == "1" +SAFETENSORS = os.environ.get("SAFETENSORS", "1") == "1" +CHUNK_SIZE = os.environ.get("CHUNK_SIZE", "8") +FPS = os.environ.get("FPS", "7") +DISABLE_CPU_OFFLOAD = os.environ.get("DISABLE_CPU_OFFLOAD", "0") == "1" +FRAMES = os.environ.get("FRAMES", "64") if XPU: import intel_extension_for_pytorch as ipex + print(ipex.xpu.get_device_name(0)) # If MAX_WORKERS are specified in the environment use it, otherwise default to 1 MAX_WORKERS = int(os.environ.get('PYTHON_GRPC_MAX_WORKERS', '1')) + # https://github.com/CompVis/stable-diffusion/issues/239#issuecomment-1627615287 -def sc(self, clip_input, images) : return images, [False for i in images] +def sc(self, clip_input, images): return images, [False for i in images] + + # edit the StableDiffusionSafetyChecker class so that, when called, it just returns the images and an array of True values safety_checker.StableDiffusionSafetyChecker.forward = sc @@ -62,6 +66,8 @@ from diffusers.schedulers import ( PNDMScheduler, UniPCMultistepScheduler, ) + + # The scheduler list mapping was taken from here: https://github.com/neggles/animatediff-cli/blob/6f336f5f4b5e38e85d7f06f1744ef42d0a45f2a7/src/animatediff/schedulers.py#L39 # Credits to https://github.com/neggles # See https://github.com/huggingface/diffusers/issues/4167 for more details on sched mapping from A1111 @@ -136,10 +142,12 @@ def get_scheduler(name: str, config: dict = {}): return sched_class.from_config(config) + # Implement the BackendServicer class with the service methods class BackendServicer(backend_pb2_grpc.BackendServicer): def Health(self, request, context): return backend_pb2.Reply(message=bytes("OK", 'utf-8')) + def LoadModel(self, request, context): try: print(f"Loading model {request.Model}...", file=sys.stderr) @@ -149,7 +157,7 @@ class BackendServicer(backend_pb2_grpc.BackendServicer): if request.F16Memory: torchType = torch.float16 - variant="fp16" + variant = "fp16" local = False modelFile = request.Model @@ -157,38 +165,38 @@ class BackendServicer(backend_pb2_grpc.BackendServicer): self.cfg_scale = 7 if request.CFGScale != 0: self.cfg_scale = request.CFGScale - + clipmodel = "runwayml/stable-diffusion-v1-5" if request.CLIPModel != "": clipmodel = request.CLIPModel clipsubfolder = "text_encoder" if request.CLIPSubfolder != "": clipsubfolder = request.CLIPSubfolder - + # Check if ModelFile exists if request.ModelFile != "": if os.path.exists(request.ModelFile): local = True modelFile = request.ModelFile - + fromSingleFile = request.Model.startswith("http") or request.Model.startswith("/") or local - self.img2vid=False - self.txt2vid=False + self.img2vid = False + self.txt2vid = False ## img2img if (request.PipelineType == "StableDiffusionImg2ImgPipeline") or (request.IMG2IMG and request.PipelineType == ""): if fromSingleFile: self.pipe = StableDiffusionImg2ImgPipeline.from_single_file(modelFile, - torch_dtype=torchType) + torch_dtype=torchType) else: self.pipe = StableDiffusionImg2ImgPipeline.from_pretrained(request.Model, - torch_dtype=torchType) + torch_dtype=torchType) elif request.PipelineType == "StableDiffusionDepth2ImgPipeline": self.pipe = StableDiffusionDepth2ImgPipeline.from_pretrained(request.Model, - torch_dtype=torchType) + torch_dtype=torchType) ## img2vid elif request.PipelineType == "StableVideoDiffusionPipeline": - self.img2vid=True + self.img2vid = True self.pipe = StableVideoDiffusionPipeline.from_pretrained( request.Model, torch_dtype=torchType, variant=variant ) @@ -197,64 +205,63 @@ class BackendServicer(backend_pb2_grpc.BackendServicer): ## text2img elif request.PipelineType == "AutoPipelineForText2Image" or request.PipelineType == "": self.pipe = AutoPipelineForText2Image.from_pretrained(request.Model, - torch_dtype=torchType, - use_safetensors=SAFETENSORS, - variant=variant) + torch_dtype=torchType, + use_safetensors=SAFETENSORS, + variant=variant) elif request.PipelineType == "StableDiffusionPipeline": if fromSingleFile: self.pipe = StableDiffusionPipeline.from_single_file(modelFile, - torch_dtype=torchType) + torch_dtype=torchType) else: self.pipe = StableDiffusionPipeline.from_pretrained(request.Model, - torch_dtype=torchType) + torch_dtype=torchType) elif request.PipelineType == "DiffusionPipeline": self.pipe = DiffusionPipeline.from_pretrained(request.Model, - torch_dtype=torchType) + torch_dtype=torchType) elif request.PipelineType == "VideoDiffusionPipeline": - self.txt2vid=True + self.txt2vid = True self.pipe = DiffusionPipeline.from_pretrained(request.Model, - torch_dtype=torchType) + torch_dtype=torchType) elif request.PipelineType == "StableDiffusionXLPipeline": if fromSingleFile: self.pipe = StableDiffusionXLPipeline.from_single_file(modelFile, - torch_dtype=torchType, - use_safetensors=True) + torch_dtype=torchType, + use_safetensors=True) else: self.pipe = StableDiffusionXLPipeline.from_pretrained( - request.Model, - torch_dtype=torchType, - use_safetensors=True, + request.Model, + torch_dtype=torchType, + use_safetensors=True, variant=variant) elif request.PipelineType == "StableDiffusion3Pipeline": if fromSingleFile: self.pipe = StableDiffusion3Pipeline.from_single_file(modelFile, - torch_dtype=torchType, - use_safetensors=True) + torch_dtype=torchType, + use_safetensors=True) else: self.pipe = StableDiffusion3Pipeline.from_pretrained( - request.Model, - torch_dtype=torchType, - use_safetensors=True, + request.Model, + torch_dtype=torchType, + use_safetensors=True, variant=variant) if CLIPSKIP and request.CLIPSkip != 0: self.clip_skip = request.CLIPSkip else: self.clip_skip = 0 - + # torch_dtype needs to be customized. float16 for GPU, float32 for CPU # TODO: this needs to be customized if request.SchedulerType != "": self.pipe.scheduler = get_scheduler(request.SchedulerType, self.pipe.scheduler.config) - + if COMPEL: self.compel = Compel( - tokenizer=[self.pipe.tokenizer, self.pipe.tokenizer_2 ], + tokenizer=[self.pipe.tokenizer, self.pipe.tokenizer_2], text_encoder=[self.pipe.text_encoder, self.pipe.text_encoder_2], returned_embeddings_type=ReturnedEmbeddingsType.PENULTIMATE_HIDDEN_STATES_NON_NORMALIZED, requires_pooled=[False, True] - ) - + ) if request.ControlNet: self.controlnet = ControlNetModel.from_pretrained( @@ -263,13 +270,6 @@ class BackendServicer(backend_pb2_grpc.BackendServicer): self.pipe.controlnet = self.controlnet else: self.controlnet = None - - if request.CUDA: - self.pipe.to('cuda') - if self.controlnet: - self.controlnet.to('cuda') - if XPU: - self.pipe = self.pipe.to("xpu") # Assume directory from request.ModelFile. # Only if request.LoraAdapter it's not an absolute path if request.LoraAdapter and request.ModelFile != "" and not os.path.isabs(request.LoraAdapter) and request.LoraAdapter: @@ -282,10 +282,17 @@ class BackendServicer(backend_pb2_grpc.BackendServicer): if request.LoraAdapter: # Check if its a local file and not a directory ( we load lora differently for a safetensor file ) if os.path.exists(request.LoraAdapter) and not os.path.isdir(request.LoraAdapter): - self.load_lora_weights(request.LoraAdapter, 1, device, torchType) + # self.load_lora_weights(request.LoraAdapter, 1, device, torchType) + self.pipe.load_lora_weights(request.LoraAdapter) else: self.pipe.unet.load_attn_procs(request.LoraAdapter) + if request.CUDA: + self.pipe.to('cuda') + if self.controlnet: + self.controlnet.to('cuda') + if XPU: + self.pipe = self.pipe.to("xpu") except Exception as err: return backend_pb2.Result(success=False, message=f"Unexpected {err=}, {type(err)=}") # Implement your logic here for the LoadModel service @@ -358,9 +365,9 @@ class BackendServicer(backend_pb2_grpc.BackendServicer): # create a dictionary of values for the parameters options = { - "negative_prompt": request.negative_prompt, - "width": request.width, - "height": request.height, + "negative_prompt": request.negative_prompt, + "width": request.width, + "height": request.height, "num_inference_steps": steps, } @@ -372,7 +379,7 @@ class BackendServicer(backend_pb2_grpc.BackendServicer): options["image"] = pose_image if CLIPSKIP and self.clip_skip != 0: - options["clip_skip"]=self.clip_skip + options["clip_skip"] = self.clip_skip # Get the keys that we will build the args for our pipe for keys = options.keys() @@ -416,20 +423,21 @@ class BackendServicer(backend_pb2_grpc.BackendServicer): image = self.pipe( guidance_scale=self.cfg_scale, **kwargs - ).images[0] + ).images[0] else: # pass the kwargs dictionary to the self.pipe method image = self.pipe( prompt, guidance_scale=self.cfg_scale, **kwargs - ).images[0] + ).images[0] # save the result image.save(request.dst) return backend_pb2.Result(message="Media generated", success=True) + def serve(address): server = grpc.server(futures.ThreadPoolExecutor(max_workers=MAX_WORKERS)) backend_pb2_grpc.add_BackendServicer_to_server(BackendServicer(), server) @@ -453,6 +461,7 @@ def serve(address): except KeyboardInterrupt: server.stop(0) + if __name__ == "__main__": parser = argparse.ArgumentParser(description="Run the gRPC server.") parser.add_argument( @@ -460,4 +469,4 @@ if __name__ == "__main__": ) args = parser.parse_args() - serve(args.addr) \ No newline at end of file + serve(args.addr) diff --git a/backend/python/diffusers/requirements-intel.txt b/backend/python/diffusers/requirements-intel.txt index 3637b322..c393b118 100644 --- a/backend/python/diffusers/requirements-intel.txt +++ b/backend/python/diffusers/requirements-intel.txt @@ -3,4 +3,4 @@ intel-extension-for-pytorch torch torchvision optimum[openvino] -setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file +setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file diff --git a/backend/python/diffusers/requirements.txt b/backend/python/diffusers/requirements.txt index 188fb5dc..c607187e 100644 --- a/backend/python/diffusers/requirements.txt +++ b/backend/python/diffusers/requirements.txt @@ -1,7 +1,9 @@ +setuptools accelerate compel +peft diffusers -grpcio==1.64.0 +grpcio==1.65.0 opencv-python pillow protobuf diff --git a/backend/python/exllama/requirements.txt b/backend/python/exllama/requirements.txt index 7a1d5464..2aab2631 100644 --- a/backend/python/exllama/requirements.txt +++ b/backend/python/exllama/requirements.txt @@ -1,4 +1,4 @@ -grpcio==1.64.0 +grpcio==1.65.0 protobuf torch transformers diff --git a/backend/python/exllama2/requirements.txt b/backend/python/exllama2/requirements.txt index e9aa977f..62c7117a 100644 --- a/backend/python/exllama2/requirements.txt +++ b/backend/python/exllama2/requirements.txt @@ -1,5 +1,5 @@ accelerate -grpcio==1.64.0 +grpcio==1.65.0 protobuf certifi torch diff --git a/backend/python/mamba/requirements-install.txt b/backend/python/mamba/requirements-install.txt index e937855d..2fc9a07c 100644 --- a/backend/python/mamba/requirements-install.txt +++ b/backend/python/mamba/requirements-install.txt @@ -4,4 +4,4 @@ packaging setuptools wheel -torch==2.2.0 \ No newline at end of file +torch==2.3.1 \ No newline at end of file diff --git a/backend/python/mamba/requirements.txt b/backend/python/mamba/requirements.txt index 8b089512..e431ddfe 100644 --- a/backend/python/mamba/requirements.txt +++ b/backend/python/mamba/requirements.txt @@ -1,6 +1,6 @@ -causal-conv1d==1.2.0.post2 -mamba-ssm==1.2.0.post1 -grpcio==1.64.0 +causal-conv1d==1.4.0 +mamba-ssm==2.2.2 +grpcio==1.65.0 protobuf certifi transformers \ No newline at end of file diff --git a/backend/python/openvoice/requirements-intel.txt b/backend/python/openvoice/requirements-intel.txt index ba299a57..b0551187 100644 --- a/backend/python/openvoice/requirements-intel.txt +++ b/backend/python/openvoice/requirements-intel.txt @@ -2,22 +2,22 @@ intel-extension-for-pytorch torch optimum[openvino] -grpcio==1.64.0 +grpcio==1.64.1 protobuf librosa==0.9.1 -faster-whisper==0.9.0 +faster-whisper==1.0.3 pydub==0.25.1 wavmark==0.0.3 -numpy==1.22.0 +numpy==1.26.4 eng_to_ipa==0.0.2 inflect==7.0.0 unidecode==1.3.7 -whisper-timestamped==1.14.2 +whisper-timestamped==1.15.4 openai python-dotenv pypinyin==0.50.0 cn2an==0.5.22 jieba==0.42.1 -gradio==3.48.0 +gradio==4.38.1 langid==1.1.6 -git+https://github.com/myshell-ai/MeloTTS.git \ No newline at end of file +git+https://github.com/myshell-ai/MeloTTS.git diff --git a/backend/python/openvoice/requirements.txt b/backend/python/openvoice/requirements.txt index ac2e8dcd..07ba879a 100644 --- a/backend/python/openvoice/requirements.txt +++ b/backend/python/openvoice/requirements.txt @@ -1,20 +1,20 @@ -grpcio==1.64.0 +grpcio==1.65.0 protobuf -librosa==0.9.1 -faster-whisper==0.9.0 +librosa +faster-whisper pydub==0.25.1 wavmark==0.0.3 -numpy==1.22.0 +numpy eng_to_ipa==0.0.2 -inflect==7.0.0 -unidecode==1.3.7 -whisper-timestamped==1.14.2 +inflect +unidecode +whisper-timestamped openai python-dotenv -pypinyin==0.50.0 +pypinyin cn2an==0.5.22 jieba==0.42.1 -gradio==3.48.0 +gradio langid==1.1.6 git+https://github.com/myshell-ai/MeloTTS.git -git+https://github.com/myshell-ai/OpenVoice.git \ No newline at end of file +git+https://github.com/myshell-ai/OpenVoice.git diff --git a/backend/python/parler-tts/requirements-intel.txt b/backend/python/parler-tts/requirements-intel.txt index e6b4afc0..5c4aa6a5 100644 --- a/backend/python/parler-tts/requirements-intel.txt +++ b/backend/python/parler-tts/requirements-intel.txt @@ -3,4 +3,4 @@ intel-extension-for-pytorch torch torchaudio optimum[openvino] -setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file +setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file diff --git a/backend/python/parler-tts/requirements.txt b/backend/python/parler-tts/requirements.txt index ba30594f..c3706051 100644 --- a/backend/python/parler-tts/requirements.txt +++ b/backend/python/parler-tts/requirements.txt @@ -1,5 +1,5 @@ accelerate -grpcio==1.64.0 +grpcio==1.65.0 protobuf torch git+https://github.com/huggingface/parler-tts.git@10016fb0300c0dc31a0fb70e26f3affee7b62f16 diff --git a/backend/python/petals/requirements-intel.txt b/backend/python/petals/requirements-intel.txt index 95d4848c..635b4c31 100644 --- a/backend/python/petals/requirements-intel.txt +++ b/backend/python/petals/requirements-intel.txt @@ -2,4 +2,4 @@ intel-extension-for-pytorch torch optimum[openvino] -setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file +setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file diff --git a/backend/python/rerankers/requirements-intel.txt b/backend/python/rerankers/requirements-intel.txt index 95d4848c..635b4c31 100644 --- a/backend/python/rerankers/requirements-intel.txt +++ b/backend/python/rerankers/requirements-intel.txt @@ -2,4 +2,4 @@ intel-extension-for-pytorch torch optimum[openvino] -setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file +setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file diff --git a/backend/python/rerankers/requirements.txt b/backend/python/rerankers/requirements.txt index db861321..1b437654 100644 --- a/backend/python/rerankers/requirements.txt +++ b/backend/python/rerankers/requirements.txt @@ -1,6 +1,6 @@ accelerate rerankers[transformers] -grpcio==1.64.0 +grpcio==1.65.0 protobuf certifi transformers \ No newline at end of file diff --git a/backend/python/sentencetransformers/requirements-intel.txt b/backend/python/sentencetransformers/requirements-intel.txt index 95d4848c..635b4c31 100644 --- a/backend/python/sentencetransformers/requirements-intel.txt +++ b/backend/python/sentencetransformers/requirements-intel.txt @@ -2,4 +2,4 @@ intel-extension-for-pytorch torch optimum[openvino] -setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file +setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file diff --git a/backend/python/sentencetransformers/requirements.txt b/backend/python/sentencetransformers/requirements.txt index d3f4e1f3..ac21d449 100644 --- a/backend/python/sentencetransformers/requirements.txt +++ b/backend/python/sentencetransformers/requirements.txt @@ -1,6 +1,6 @@ accelerate -sentence-transformers==2.5.1 +sentence-transformers==3.0.1 transformers -grpcio==1.64.0 +grpcio==1.65.0 protobuf certifi \ No newline at end of file diff --git a/backend/python/transformers-musicgen/requirements-intel.txt b/backend/python/transformers-musicgen/requirements-intel.txt index 95d4848c..635b4c31 100644 --- a/backend/python/transformers-musicgen/requirements-intel.txt +++ b/backend/python/transformers-musicgen/requirements-intel.txt @@ -2,4 +2,4 @@ intel-extension-for-pytorch torch optimum[openvino] -setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file +setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file diff --git a/backend/python/transformers-musicgen/requirements.txt b/backend/python/transformers-musicgen/requirements.txt index 06588c5c..8a969c34 100644 --- a/backend/python/transformers-musicgen/requirements.txt +++ b/backend/python/transformers-musicgen/requirements.txt @@ -1,7 +1,7 @@ accelerate transformers -grpcio==1.64.0 +grpcio==1.65.0 protobuf torch -scipy==1.13.0 +scipy==1.14.0 certifi \ No newline at end of file diff --git a/backend/python/transformers/requirements-intel.txt b/backend/python/transformers/requirements-intel.txt index 95d4848c..635b4c31 100644 --- a/backend/python/transformers/requirements-intel.txt +++ b/backend/python/transformers/requirements-intel.txt @@ -2,4 +2,4 @@ intel-extension-for-pytorch torch optimum[openvino] -setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file +setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file diff --git a/backend/python/transformers/requirements.txt b/backend/python/transformers/requirements.txt index 494a53fc..76066f50 100644 --- a/backend/python/transformers/requirements.txt +++ b/backend/python/transformers/requirements.txt @@ -1,9 +1,9 @@ accelerate transformers -grpcio==1.64.0 +grpcio==1.65.0 protobuf torch certifi intel-extension-for-transformers bitsandbytes -setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406 +setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406 diff --git a/backend/python/vall-e-x/requirements-intel.txt b/backend/python/vall-e-x/requirements-intel.txt index e6b4afc0..5c4aa6a5 100644 --- a/backend/python/vall-e-x/requirements-intel.txt +++ b/backend/python/vall-e-x/requirements-intel.txt @@ -3,4 +3,4 @@ intel-extension-for-pytorch torch torchaudio optimum[openvino] -setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file +setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file diff --git a/backend/python/vall-e-x/requirements.txt b/backend/python/vall-e-x/requirements.txt index a2a720f2..ac891fe7 100644 --- a/backend/python/vall-e-x/requirements.txt +++ b/backend/python/vall-e-x/requirements.txt @@ -1,4 +1,4 @@ accelerate -grpcio==1.64.0 +grpcio==1.65.0 protobuf certifi \ No newline at end of file diff --git a/backend/python/vllm/requirements-intel.txt b/backend/python/vllm/requirements-intel.txt index 95d4848c..635b4c31 100644 --- a/backend/python/vllm/requirements-intel.txt +++ b/backend/python/vllm/requirements-intel.txt @@ -2,4 +2,4 @@ intel-extension-for-pytorch torch optimum[openvino] -setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file +setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406 \ No newline at end of file diff --git a/backend/python/vllm/requirements.txt b/backend/python/vllm/requirements.txt index 0da43c3a..986a4d55 100644 --- a/backend/python/vllm/requirements.txt +++ b/backend/python/vllm/requirements.txt @@ -1,6 +1,6 @@ accelerate vllm -grpcio==1.64.0 +grpcio==1.65.0 protobuf certifi transformers diff --git a/core/backend/options.go b/core/backend/options.go index e6ce87eb..d986b8e6 100644 --- a/core/backend/options.go +++ b/core/backend/options.go @@ -91,7 +91,7 @@ func gRPCModelOpts(c config.BackendConfig) *pb.ModelOptions { Type: c.ModelType, RopeFreqScale: c.RopeFreqScale, NUMA: c.NUMA, - Embeddings: c.Embeddings, + Embeddings: *c.Embeddings, LowVRAM: *c.LowVRAM, NGPULayers: int32(*c.NGPULayers), MMap: *c.MMap, diff --git a/core/cli/federated.go b/core/cli/federated.go index b99ef4f8..84440a9f 100644 --- a/core/cli/federated.go +++ b/core/cli/federated.go @@ -2,20 +2,9 @@ package cli import ( "context" - "errors" - "fmt" - "io" - "net" - "time" - - "math/rand/v2" cliContext "github.com/mudler/LocalAI/core/cli/context" "github.com/mudler/LocalAI/core/p2p" - "github.com/mudler/edgevpn/pkg/node" - "github.com/mudler/edgevpn/pkg/protocol" - "github.com/mudler/edgevpn/pkg/types" - "github.com/rs/zerolog/log" ) type FederatedCLI struct { @@ -25,106 +14,7 @@ type FederatedCLI struct { func (f *FederatedCLI) Run(ctx *cliContext.Context) error { - n, err := p2p.NewNode(f.Peer2PeerToken) - if err != nil { - return fmt.Errorf("creating a new node: %w", err) - } - err = n.Start(context.Background()) - if err != nil { - return fmt.Errorf("creating a new node: %w", err) - } + fs := p2p.NewFederatedServer(f.Address, p2p.FederatedID, f.Peer2PeerToken) - if err := p2p.ServiceDiscoverer(context.Background(), n, f.Peer2PeerToken, p2p.FederatedID, nil); err != nil { - return err - } - - return Proxy(context.Background(), n, f.Address, p2p.FederatedID) -} - -func Proxy(ctx context.Context, node *node.Node, listenAddr, service string) error { - - log.Info().Msgf("Allocating service '%s' on: %s", service, listenAddr) - // Open local port for listening - l, err := net.Listen("tcp", listenAddr) - if err != nil { - log.Error().Err(err).Msg("Error listening") - return err - } - // ll.Info("Binding local port on", srcaddr) - - ledger, _ := node.Ledger() - - // Announce ourselves so nodes accepts our connection - ledger.Announce( - ctx, - 10*time.Second, - func() { - // Retrieve current ID for ip in the blockchain - //_, found := ledger.GetKey(protocol.UsersLedgerKey, node.Host().ID().String()) - // If mismatch, update the blockchain - //if !found { - updatedMap := map[string]interface{}{} - updatedMap[node.Host().ID().String()] = &types.User{ - PeerID: node.Host().ID().String(), - Timestamp: time.Now().String(), - } - ledger.Add(protocol.UsersLedgerKey, updatedMap) - // } - }, - ) - - defer l.Close() - for { - select { - case <-ctx.Done(): - return errors.New("context canceled") - default: - log.Debug().Msg("New for connection") - // Listen for an incoming connection. - conn, err := l.Accept() - if err != nil { - fmt.Println("Error accepting: ", err.Error()) - continue - } - - // Handle connections in a new goroutine, forwarding to the p2p service - go func() { - var tunnelAddresses []string - for _, v := range p2p.GetAvailableNodes(p2p.FederatedID) { - if v.IsOnline() { - tunnelAddresses = append(tunnelAddresses, v.TunnelAddress) - } else { - log.Info().Msgf("Node %s is offline", v.ID) - } - } - - // open a TCP stream to one of the tunnels - // chosen randomly - // TODO: optimize this and track usage - tunnelAddr := tunnelAddresses[rand.IntN(len(tunnelAddresses))] - - tunnelConn, err := net.Dial("tcp", tunnelAddr) - if err != nil { - log.Error().Err(err).Msg("Error connecting to tunnel") - return - } - - log.Info().Msgf("Redirecting %s to %s", conn.LocalAddr().String(), tunnelConn.RemoteAddr().String()) - closer := make(chan struct{}, 2) - go copyStream(closer, tunnelConn, conn) - go copyStream(closer, conn, tunnelConn) - <-closer - - tunnelConn.Close() - conn.Close() - // ll.Infof("(service %s) Done handling %s", serviceID, l.Addr().String()) - }() - } - } - -} - -func copyStream(closer chan struct{}, dst io.Writer, src io.Reader) { - defer func() { closer <- struct{}{} }() // connection is closed, send signal to stop proxy - io.Copy(dst, src) + return fs.Start(context.Background()) } diff --git a/core/cli/run.go b/core/cli/run.go index d7b45f77..b3d91632 100644 --- a/core/cli/run.go +++ b/core/cli/run.go @@ -119,7 +119,7 @@ func (r *RunCMD) Run(ctx *cliContext.Context) error { } log.Info().Msg("Starting P2P server discovery...") - if err := p2p.ServiceDiscoverer(context.Background(), node, token, "", func() { + if err := p2p.ServiceDiscoverer(context.Background(), node, token, "", func(serviceID string, node p2p.NodeData) { var tunnelAddresses []string for _, v := range p2p.GetAvailableNodes("") { if v.IsOnline() { diff --git a/core/config/backend_config.go b/core/config/backend_config.go index 1e647ceb..383686cd 100644 --- a/core/config/backend_config.go +++ b/core/config/backend_config.go @@ -32,7 +32,7 @@ type BackendConfig struct { Threads *int `yaml:"threads"` Debug *bool `yaml:"debug"` Roles map[string]string `yaml:"roles"` - Embeddings bool `yaml:"embeddings"` + Embeddings *bool `yaml:"embeddings"` Backend string `yaml:"backend"` TemplateConfig TemplateConfig `yaml:"template"` @@ -338,6 +338,10 @@ func (cfg *BackendConfig) SetDefaults(opts ...ConfigLoaderOption) { cfg.LowVRAM = &falseV } + if cfg.Embeddings == nil { + cfg.Embeddings = &falseV + } + // Value passed by the top level are treated as default (no implicit defaults) // defaults are set by the user if ctx == 0 { diff --git a/core/config/guesser.go b/core/config/guesser.go index 7cc3e99b..6c6ef430 100644 --- a/core/config/guesser.go +++ b/core/config/guesser.go @@ -20,6 +20,7 @@ const ( ChatML Mistral03 Gemma + DeepSeek2 ) type settingsConfig struct { @@ -37,6 +38,17 @@ var defaultsSettings map[familyType]settingsConfig = map[familyType]settingsConf Completion: "{{.Input}}", }, }, + DeepSeek2: { + StopWords: []string{"<|end▁of▁sentence|>"}, + TemplateConfig: TemplateConfig{ + ChatMessage: `{{if eq .RoleName "user" -}}User: {{.Content }} +{{ end -}} +{{if eq .RoleName "assistant" -}}Assistant: {{.Content}}<|end▁of▁sentence|>{{end}} +{{if eq .RoleName "system" -}}{{.Content}} +{{end -}}`, + Chat: "{{.Input -}}\nAssistant: ", + }, + }, LLaMa3: { StopWords: []string{"<|eot_id|>"}, TemplateConfig: TemplateConfig{ @@ -208,8 +220,11 @@ func identifyFamily(f *gguf.GGUFFile) familyType { qwen2 := arch == "qwen2" phi3 := arch == "phi-3" gemma := strings.HasPrefix(f.Model().Name, "gemma") + deepseek2 := arch == "deepseek2" switch { + case deepseek2: + return DeepSeek2 case gemma: return Gemma case llama3: diff --git a/core/gallery/gallery.go b/core/gallery/gallery.go index 231dce6d..d102eac8 100644 --- a/core/gallery/gallery.go +++ b/core/gallery/gallery.go @@ -7,9 +7,10 @@ import ( "path/filepath" "strings" - "github.com/imdario/mergo" + "dario.cat/mergo" "github.com/mudler/LocalAI/core/config" "github.com/mudler/LocalAI/pkg/downloader" + "github.com/mudler/LocalAI/pkg/utils" "github.com/rs/zerolog/log" "gopkg.in/yaml.v2" ) @@ -189,6 +190,12 @@ func DeleteModelFromSystem(basePath string, name string, additionalFiles []strin galleryFile := filepath.Join(basePath, galleryFileName(name)) + for _, f := range []string{configFile, galleryFile} { + if err := utils.VerifyPath(f, basePath); err != nil { + return fmt.Errorf("failed to verify path %s: %w", f, err) + } + } + var err error // Delete all the files associated to the model // read the model config diff --git a/core/gallery/models.go b/core/gallery/models.go index 28a2e3f2..32460a9c 100644 --- a/core/gallery/models.go +++ b/core/gallery/models.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - "github.com/imdario/mergo" + "dario.cat/mergo" lconfig "github.com/mudler/LocalAI/core/config" "github.com/mudler/LocalAI/pkg/downloader" "github.com/mudler/LocalAI/pkg/utils" diff --git a/core/http/endpoints/jina/rerank.go b/core/http/endpoints/jina/rerank.go index ddeee745..04fdf031 100644 --- a/core/http/endpoints/jina/rerank.go +++ b/core/http/endpoints/jina/rerank.go @@ -12,6 +12,11 @@ import ( "github.com/rs/zerolog/log" ) +// JINARerankEndpoint acts like the Jina reranker endpoint (https://jina.ai/reranker/) +// @Summary Reranks a list of phrases by relevance to a given text query. +// @Param request body schema.JINARerankRequest true "query params" +// @Success 200 {object} schema.JINARerankResponse "Response" +// @Router /v1/rerank [post] func JINARerankEndpoint(cl *config.BackendConfigLoader, ml *model.ModelLoader, appConfig *config.ApplicationConfig) func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { req := new(schema.JINARerankRequest) diff --git a/core/http/endpoints/localai/backend_monitor.go b/core/http/endpoints/localai/backend_monitor.go index b211d7bb..fa11b5c3 100644 --- a/core/http/endpoints/localai/backend_monitor.go +++ b/core/http/endpoints/localai/backend_monitor.go @@ -6,6 +6,11 @@ import ( "github.com/mudler/LocalAI/core/services" ) +// BackendMonitorEndpoint returns the status of the specified backend +// @Summary Backend monitor endpoint +// @Param request body schema.BackendMonitorRequest true "Backend statistics request" +// @Success 200 {object} proto.StatusResponse "Response" +// @Router /backend/monitor [get] func BackendMonitorEndpoint(bm *services.BackendMonitorService) func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { @@ -23,6 +28,10 @@ func BackendMonitorEndpoint(bm *services.BackendMonitorService) func(c *fiber.Ct } } +// BackendMonitorEndpoint shuts down the specified backend +// @Summary Backend monitor endpoint +// @Param request body schema.BackendMonitorRequest true "Backend statistics request" +// @Router /backend/shutdown [post] func BackendShutdownEndpoint(bm *services.BackendMonitorService) func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { input := new(schema.BackendMonitorRequest) diff --git a/core/http/endpoints/localai/gallery.go b/core/http/endpoints/localai/gallery.go index 9c49d641..23c5d4b8 100644 --- a/core/http/endpoints/localai/gallery.go +++ b/core/http/endpoints/localai/gallery.go @@ -9,6 +9,7 @@ import ( "github.com/google/uuid" "github.com/mudler/LocalAI/core/config" "github.com/mudler/LocalAI/core/gallery" + "github.com/mudler/LocalAI/core/schema" "github.com/mudler/LocalAI/core/services" "github.com/rs/zerolog/log" ) @@ -33,6 +34,10 @@ func CreateModelGalleryEndpointService(galleries []config.Gallery, modelPath str } } +// GetOpStatusEndpoint returns the job status +// @Summary Returns the job status +// @Success 200 {object} gallery.GalleryOpStatus "Response" +// @Router /models/jobs/{uuid} [get] func (mgs *ModelGalleryEndpointService) GetOpStatusEndpoint() func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { status := mgs.galleryApplier.GetStatus(c.Params("uuid")) @@ -43,12 +48,21 @@ func (mgs *ModelGalleryEndpointService) GetOpStatusEndpoint() func(c *fiber.Ctx) } } +// GetAllStatusEndpoint returns all the jobs status progress +// @Summary Returns all the jobs status progress +// @Success 200 {object} map[string]gallery.GalleryOpStatus "Response" +// @Router /models/jobs [get] func (mgs *ModelGalleryEndpointService) GetAllStatusEndpoint() func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { return c.JSON(mgs.galleryApplier.GetAllStatus()) } } +// ApplyModelGalleryEndpoint installs a new model to a LocalAI instance from the model gallery +// @Summary Install models to LocalAI. +// @Param request body GalleryModel true "query params" +// @Success 200 {object} schema.GalleryResponse "Response" +// @Router /models/apply [post] func (mgs *ModelGalleryEndpointService) ApplyModelGalleryEndpoint() func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { input := new(GalleryModel) @@ -68,13 +82,15 @@ func (mgs *ModelGalleryEndpointService) ApplyModelGalleryEndpoint() func(c *fibe Galleries: mgs.galleries, ConfigURL: input.ConfigURL, } - return c.JSON(struct { - ID string `json:"uuid"` - StatusURL string `json:"status"` - }{ID: uuid.String(), StatusURL: c.BaseURL() + "/models/jobs/" + uuid.String()}) + return c.JSON(schema.GalleryResponse{ID: uuid.String(), StatusURL: c.BaseURL() + "/models/jobs/" + uuid.String()}) } } +// DeleteModelGalleryEndpoint lets delete models from a LocalAI instance +// @Summary delete models to LocalAI. +// @Param name path string true "Model name" +// @Success 200 {object} schema.GalleryResponse "Response" +// @Router /models/delete/{name} [post] func (mgs *ModelGalleryEndpointService) DeleteModelGalleryEndpoint() func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { modelName := c.Params("name") @@ -89,13 +105,14 @@ func (mgs *ModelGalleryEndpointService) DeleteModelGalleryEndpoint() func(c *fib return err } - return c.JSON(struct { - ID string `json:"uuid"` - StatusURL string `json:"status"` - }{ID: uuid.String(), StatusURL: c.BaseURL() + "/models/jobs/" + uuid.String()}) + return c.JSON(schema.GalleryResponse{ID: uuid.String(), StatusURL: c.BaseURL() + "/models/jobs/" + uuid.String()}) } } +// ListModelFromGalleryEndpoint list the available models for installation from the active galleries +// @Summary List installable models. +// @Success 200 {object} []gallery.GalleryModel "Response" +// @Router /models/available [get] func (mgs *ModelGalleryEndpointService) ListModelFromGalleryEndpoint() func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { log.Debug().Msgf("Listing models from galleries: %+v", mgs.galleries) @@ -116,6 +133,10 @@ func (mgs *ModelGalleryEndpointService) ListModelFromGalleryEndpoint() func(c *f } } +// ListModelGalleriesEndpoint list the available galleries configured in LocalAI +// @Summary List all Galleries +// @Success 200 {object} []config.Gallery "Response" +// @Router /models/galleries [get] // NOTE: This is different (and much simpler!) than above! This JUST lists the model galleries that have been loaded, not their contents! func (mgs *ModelGalleryEndpointService) ListModelGalleriesEndpoint() func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { @@ -128,6 +149,11 @@ func (mgs *ModelGalleryEndpointService) ListModelGalleriesEndpoint() func(c *fib } } +// AddModelGalleryEndpoint adds a gallery in LocalAI +// @Summary Adds a gallery in LocalAI +// @Param request body config.Gallery true "Gallery details" +// @Success 200 {object} []config.Gallery "Response" +// @Router /models/galleries [post] func (mgs *ModelGalleryEndpointService) AddModelGalleryEndpoint() func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { input := new(config.Gallery) @@ -150,6 +176,11 @@ func (mgs *ModelGalleryEndpointService) AddModelGalleryEndpoint() func(c *fiber. } } +// RemoveModelGalleryEndpoint remove a gallery in LocalAI +// @Summary removes a gallery from LocalAI +// @Param request body config.Gallery true "Gallery details" +// @Success 200 {object} []config.Gallery "Response" +// @Router /models/galleries [delete] func (mgs *ModelGalleryEndpointService) RemoveModelGalleryEndpoint() func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { input := new(config.Gallery) @@ -165,6 +196,10 @@ func (mgs *ModelGalleryEndpointService) RemoveModelGalleryEndpoint() func(c *fib mgs.galleries = slices.DeleteFunc(mgs.galleries, func(gallery config.Gallery) bool { return gallery.Name == input.Name }) - return c.Send(nil) + dat, err := json.Marshal(mgs.galleries) + if err != nil { + return err + } + return c.Send(dat) } } diff --git a/core/http/endpoints/localai/metrics.go b/core/http/endpoints/localai/metrics.go index a7e6c99d..8fcc0a7a 100644 --- a/core/http/endpoints/localai/metrics.go +++ b/core/http/endpoints/localai/metrics.go @@ -9,8 +9,11 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" ) +// LocalAIMetricsEndpoint returns the metrics endpoint for LocalAI +// @Summary Prometheus metrics endpoint +// @Param request body config.Gallery true "Gallery details" +// @Router /metrics [get] func LocalAIMetricsEndpoint() fiber.Handler { - return adaptor.HTTPHandler(promhttp.Handler()) } diff --git a/core/http/endpoints/localai/p2p.go b/core/http/endpoints/localai/p2p.go new file mode 100644 index 00000000..cab0bb5d --- /dev/null +++ b/core/http/endpoints/localai/p2p.go @@ -0,0 +1,28 @@ +package localai + +import ( + "github.com/gofiber/fiber/v2" + "github.com/mudler/LocalAI/core/config" + "github.com/mudler/LocalAI/core/p2p" + "github.com/mudler/LocalAI/core/schema" +) + +// ShowP2PNodes returns the P2P Nodes +// @Summary Returns available P2P nodes +// @Success 200 {object} []schema.P2PNodesResponse "Response" +// @Router /api/p2p [get] +func ShowP2PNodes(c *fiber.Ctx) error { + // Render index + return c.JSON(schema.P2PNodesResponse{ + Nodes: p2p.GetAvailableNodes(""), + FederatedNodes: p2p.GetAvailableNodes(p2p.FederatedID), + }) +} + +// ShowP2PToken returns the P2P token +// @Summary Show the P2P token +// @Success 200 {string} string "Response" +// @Router /api/p2p/token [get] +func ShowP2PToken(appConfig *config.ApplicationConfig) func(*fiber.Ctx) error { + return func(c *fiber.Ctx) error { return c.Send([]byte(appConfig.P2PToken)) } +} diff --git a/core/http/endpoints/openai/assistant.go b/core/http/endpoints/openai/assistant.go index ba2ebcde..ff218730 100644 --- a/core/http/endpoints/openai/assistant.go +++ b/core/http/endpoints/openai/assistant.go @@ -11,6 +11,7 @@ import ( "github.com/gofiber/fiber/v2" "github.com/mudler/LocalAI/core/config" + "github.com/mudler/LocalAI/core/schema" "github.com/mudler/LocalAI/core/services" model "github.com/mudler/LocalAI/pkg/model" "github.com/mudler/LocalAI/pkg/utils" @@ -125,6 +126,14 @@ func generateRandomID() int64 { return currentId } +// ListAssistantsEndpoint is the OpenAI Assistant API endpoint to list assistents https://platform.openai.com/docs/api-reference/assistants/listAssistants +// @Summary List available assistents +// @Param limit query int false "Limit the number of assistants returned" +// @Param order query string false "Order of assistants returned" +// @Param after query string false "Return assistants created after the given ID" +// @Param before query string false "Return assistants created before the given ID" +// @Success 200 {object} []Assistant "Response" +// @Router /v1/assistants [get] func ListAssistantsEndpoint(cl *config.BackendConfigLoader, ml *model.ModelLoader, appConfig *config.ApplicationConfig) func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { // Because we're altering the existing assistants list we should just duplicate it for now. @@ -230,13 +239,11 @@ func modelExists(cl *config.BackendConfigLoader, ml *model.ModelLoader, modelNam return } +// DeleteAssistantEndpoint is the OpenAI Assistant API endpoint to delete assistents https://platform.openai.com/docs/api-reference/assistants/deleteAssistant +// @Summary Delete assistents +// @Success 200 {object} schema.DeleteAssistantResponse "Response" +// @Router /v1/assistants/{assistant_id} [delete] func DeleteAssistantEndpoint(cl *config.BackendConfigLoader, ml *model.ModelLoader, appConfig *config.ApplicationConfig) func(c *fiber.Ctx) error { - type DeleteAssistantResponse struct { - ID string `json:"id"` - Object string `json:"object"` - Deleted bool `json:"deleted"` - } - return func(c *fiber.Ctx) error { assistantID := c.Params("assistant_id") if assistantID == "" { @@ -247,7 +254,7 @@ func DeleteAssistantEndpoint(cl *config.BackendConfigLoader, ml *model.ModelLoad if assistant.ID == assistantID { Assistants = append(Assistants[:i], Assistants[i+1:]...) utils.SaveConfig(appConfig.ConfigsDir, AssistantsConfigFile, Assistants) - return c.Status(fiber.StatusOK).JSON(DeleteAssistantResponse{ + return c.Status(fiber.StatusOK).JSON(schema.DeleteAssistantResponse{ ID: assistantID, Object: "assistant.deleted", Deleted: true, @@ -256,7 +263,7 @@ func DeleteAssistantEndpoint(cl *config.BackendConfigLoader, ml *model.ModelLoad } log.Warn().Msgf("Unable to find assistant %s for deletion", assistantID) - return c.Status(fiber.StatusNotFound).JSON(DeleteAssistantResponse{ + return c.Status(fiber.StatusNotFound).JSON(schema.DeleteAssistantResponse{ ID: assistantID, Object: "assistant.deleted", Deleted: false, @@ -264,6 +271,10 @@ func DeleteAssistantEndpoint(cl *config.BackendConfigLoader, ml *model.ModelLoad } } +// GetAssistantEndpoint is the OpenAI Assistant API endpoint to get assistents https://platform.openai.com/docs/api-reference/assistants/getAssistant +// @Summary Get assistent data +// @Success 200 {object} Assistant "Response" +// @Router /v1/assistants/{assistant_id} [get] func GetAssistantEndpoint(cl *config.BackendConfigLoader, ml *model.ModelLoader, appConfig *config.ApplicationConfig) func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { assistantID := c.Params("assistant_id") @@ -293,19 +304,9 @@ var ( AssistantsFileConfigFile = "assistantsFile.json" ) -type AssistantFileRequest struct { - FileID string `json:"file_id"` -} - -type DeleteAssistantFileResponse struct { - ID string `json:"id"` - Object string `json:"object"` - Deleted bool `json:"deleted"` -} - func CreateAssistantFileEndpoint(cl *config.BackendConfigLoader, ml *model.ModelLoader, appConfig *config.ApplicationConfig) func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { - request := new(AssistantFileRequest) + request := new(schema.AssistantFileRequest) if err := c.BodyParser(request); err != nil { return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{"error": "Cannot parse JSON"}) } @@ -346,7 +347,7 @@ func CreateAssistantFileEndpoint(cl *config.BackendConfigLoader, ml *model.Model func ListAssistantFilesEndpoint(cl *config.BackendConfigLoader, ml *model.ModelLoader, appConfig *config.ApplicationConfig) func(c *fiber.Ctx) error { type ListAssistantFiles struct { - Data []File + Data []schema.File Object string } @@ -464,7 +465,7 @@ func DeleteAssistantFileEndpoint(cl *config.BackendConfigLoader, ml *model.Model // Remove the file from the assistantFiles slice AssistantFiles = append(AssistantFiles[:i], AssistantFiles[i+1:]...) utils.SaveConfig(appConfig.ConfigsDir, AssistantsFileConfigFile, AssistantFiles) - return c.Status(fiber.StatusOK).JSON(DeleteAssistantFileResponse{ + return c.Status(fiber.StatusOK).JSON(schema.DeleteAssistantFileResponse{ ID: fileId, Object: "assistant.file.deleted", Deleted: true, @@ -480,7 +481,7 @@ func DeleteAssistantFileEndpoint(cl *config.BackendConfigLoader, ml *model.Model AssistantFiles = append(AssistantFiles[:i], AssistantFiles[i+1:]...) utils.SaveConfig(appConfig.ConfigsDir, AssistantsFileConfigFile, AssistantFiles) - return c.Status(fiber.StatusNotFound).JSON(DeleteAssistantFileResponse{ + return c.Status(fiber.StatusNotFound).JSON(schema.DeleteAssistantFileResponse{ ID: fileId, Object: "assistant.file.deleted", Deleted: true, @@ -491,7 +492,7 @@ func DeleteAssistantFileEndpoint(cl *config.BackendConfigLoader, ml *model.Model } log.Warn().Msgf("Unable to find assistant: %s", assistantID) - return c.Status(fiber.StatusNotFound).JSON(DeleteAssistantFileResponse{ + return c.Status(fiber.StatusNotFound).JSON(schema.DeleteAssistantFileResponse{ ID: fileId, Object: "assistant.file.deleted", Deleted: false, diff --git a/core/http/endpoints/openai/assistant_test.go b/core/http/endpoints/openai/assistant_test.go index 7d6c0c06..6858f65d 100644 --- a/core/http/endpoints/openai/assistant_test.go +++ b/core/http/endpoints/openai/assistant_test.go @@ -14,6 +14,7 @@ import ( "github.com/gofiber/fiber/v2" "github.com/mudler/LocalAI/core/config" + "github.com/mudler/LocalAI/core/schema" "github.com/mudler/LocalAI/pkg/model" "github.com/stretchr/testify/assert" ) @@ -26,7 +27,7 @@ type MockLoader struct { func tearDown() func() { return func() { - UploadedFiles = []File{} + UploadedFiles = []schema.File{} Assistants = []Assistant{} AssistantFiles = []AssistantFile{} _ = os.Remove(filepath.Join(configsDir, AssistantsConfigFile)) @@ -294,7 +295,7 @@ func TestAssistantEndpoints(t *testing.T) { file, assistant, err := createFileAndAssistant(t, app, appConfig) assert.NoError(t, err) - afr := AssistantFileRequest{FileID: file.ID} + afr := schema.AssistantFileRequest{FileID: file.ID} af, _, err := createAssistantFile(app, afr, assistant.ID) assert.NoError(t, err) @@ -305,7 +306,7 @@ func TestAssistantEndpoints(t *testing.T) { file, assistant, err := createFileAndAssistant(t, app, appConfig) assert.NoError(t, err) - afr := AssistantFileRequest{FileID: file.ID} + afr := schema.AssistantFileRequest{FileID: file.ID} af, _, err := createAssistantFile(app, afr, assistant.ID) assert.NoError(t, err) @@ -316,7 +317,7 @@ func TestAssistantEndpoints(t *testing.T) { file, assistant, err := createFileAndAssistant(t, app, appConfig) assert.NoError(t, err) - afr := AssistantFileRequest{FileID: file.ID} + afr := schema.AssistantFileRequest{FileID: file.ID} af, _, err := createAssistantFile(app, afr, assistant.ID) assert.NoError(t, err) t.Cleanup(cleanupAssistantFile(t, app, af.ID, af.AssistantID)) @@ -338,7 +339,7 @@ func TestAssistantEndpoints(t *testing.T) { file, assistant, err := createFileAndAssistant(t, app, appConfig) assert.NoError(t, err) - afr := AssistantFileRequest{FileID: file.ID} + afr := schema.AssistantFileRequest{FileID: file.ID} af, _, err := createAssistantFile(app, afr, assistant.ID) assert.NoError(t, err) @@ -349,7 +350,7 @@ func TestAssistantEndpoints(t *testing.T) { } -func createFileAndAssistant(t *testing.T, app *fiber.App, o *config.ApplicationConfig) (File, Assistant, error) { +func createFileAndAssistant(t *testing.T, app *fiber.App, o *config.ApplicationConfig) (schema.File, Assistant, error) { ar := &AssistantRequest{ Model: "ggml-gpt4all-j", Name: "3.5-turbo", @@ -362,7 +363,7 @@ func createFileAndAssistant(t *testing.T, app *fiber.App, o *config.ApplicationC assistant, _, err := createAssistant(app, *ar) if err != nil { - return File{}, Assistant{}, err + return schema.File{}, Assistant{}, err } t.Cleanup(cleanupAllAssistants(t, app, []string{assistant.ID})) @@ -374,7 +375,7 @@ func createFileAndAssistant(t *testing.T, app *fiber.App, o *config.ApplicationC return file, assistant, nil } -func createAssistantFile(app *fiber.App, afr AssistantFileRequest, assistantId string) (AssistantFile, *http.Response, error) { +func createAssistantFile(app *fiber.App, afr schema.AssistantFileRequest, assistantId string) (AssistantFile, *http.Response, error) { afrJson, err := json.Marshal(afr) if err != nil { return AssistantFile{}, nil, err @@ -451,7 +452,7 @@ func cleanupAssistantFile(t *testing.T, app *fiber.App, fileId, assistantId stri resp, err := app.Test(request) assert.NoError(t, err) - var dafr DeleteAssistantFileResponse + var dafr schema.DeleteAssistantFileResponse err = json.NewDecoder(resp.Body).Decode(&dafr) assert.NoError(t, err) assert.True(t, dafr.Deleted) diff --git a/core/http/endpoints/openai/chat.go b/core/http/endpoints/openai/chat.go index 763e3f69..f63a9913 100644 --- a/core/http/endpoints/openai/chat.go +++ b/core/http/endpoints/openai/chat.go @@ -225,18 +225,10 @@ func ChatEndpoint(cl *config.BackendConfigLoader, ml *model.ModelLoader, startup } // Update input grammar - // Handle if we should return "name" instead of "functions" - if config.FunctionsConfig.FunctionName { - jsStruct := funcs.ToJSONNameStructure() - config.Grammar = jsStruct.Grammar(config.FunctionsConfig.GrammarConfig.Options()...) - } else { - jsStruct := funcs.ToJSONFunctionStructure() - config.Grammar = jsStruct.Grammar(config.FunctionsConfig.GrammarConfig.Options()...) - } + jsStruct := funcs.ToJSONStructure(config.FunctionsConfig.FunctionNameKey, config.FunctionsConfig.FunctionNameKey) + config.Grammar = jsStruct.Grammar(config.FunctionsConfig.GrammarConfig.Options()...) case input.JSONFunctionGrammarObject != nil: config.Grammar = input.JSONFunctionGrammarObject.Grammar(config.FunctionsConfig.GrammarConfig.Options()...) - case input.JSONFunctionGrammarObjectName != nil: - config.Grammar = input.JSONFunctionGrammarObjectName.Grammar(config.FunctionsConfig.GrammarConfig.Options()...) default: // Force picking one of the functions by the request if config.FunctionToCall() != "" { diff --git a/core/http/endpoints/openai/edit.go b/core/http/endpoints/openai/edit.go index bb43ac3b..12fb4035 100644 --- a/core/http/endpoints/openai/edit.go +++ b/core/http/endpoints/openai/edit.go @@ -16,6 +16,11 @@ import ( "github.com/rs/zerolog/log" ) +// EditEndpoint is the OpenAI edit API endpoint +// @Summary OpenAI edit endpoint +// @Param request body schema.OpenAIRequest true "query params" +// @Success 200 {object} schema.OpenAIResponse "Response" +// @Router /v1/edits [post] func EditEndpoint(cl *config.BackendConfigLoader, ml *model.ModelLoader, appConfig *config.ApplicationConfig) func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { modelFile, input, err := readRequest(c, cl, ml, appConfig, true) diff --git a/core/http/endpoints/openai/files.go b/core/http/endpoints/openai/files.go index d7741580..903484b4 100644 --- a/core/http/endpoints/openai/files.go +++ b/core/http/endpoints/openai/files.go @@ -9,25 +9,16 @@ import ( "time" "github.com/mudler/LocalAI/core/config" + "github.com/mudler/LocalAI/core/schema" "github.com/gofiber/fiber/v2" "github.com/mudler/LocalAI/pkg/utils" ) -var UploadedFiles []File +var UploadedFiles []schema.File const UploadedFilesFile = "uploadedFiles.json" -// File represents the structure of a file object from the OpenAI API. -type File struct { - ID string `json:"id"` // Unique identifier for the file - Object string `json:"object"` // Type of the object (e.g., "file") - Bytes int `json:"bytes"` // Size of the file in bytes - CreatedAt time.Time `json:"created_at"` // The time at which the file was created - Filename string `json:"filename"` // The name of the file - Purpose string `json:"purpose"` // The purpose of the file (e.g., "fine-tune", "classifications", etc.) -} - // UploadFilesEndpoint https://platform.openai.com/docs/api-reference/files/create func UploadFilesEndpoint(cm *config.BackendConfigLoader, appConfig *config.ApplicationConfig) func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { @@ -61,7 +52,7 @@ func UploadFilesEndpoint(cm *config.BackendConfigLoader, appConfig *config.Appli return c.Status(fiber.StatusInternalServerError).SendString("Failed to save file: " + err.Error()) } - f := File{ + f := schema.File{ ID: fmt.Sprintf("file-%d", getNextFileId()), Object: "file", Bytes: int(file.Size), @@ -84,14 +75,13 @@ func getNextFileId() int64 { } // ListFilesEndpoint https://platform.openai.com/docs/api-reference/files/list +// @Summary List files. +// @Success 200 {object} schema.ListFiles "Response" +// @Router /v1/files [get] func ListFilesEndpoint(cm *config.BackendConfigLoader, appConfig *config.ApplicationConfig) func(c *fiber.Ctx) error { - type ListFiles struct { - Data []File - Object string - } return func(c *fiber.Ctx) error { - var listFiles ListFiles + var listFiles schema.ListFiles purpose := c.Query("purpose") if purpose == "" { @@ -108,7 +98,7 @@ func ListFilesEndpoint(cm *config.BackendConfigLoader, appConfig *config.Applica } } -func getFileFromRequest(c *fiber.Ctx) (*File, error) { +func getFileFromRequest(c *fiber.Ctx) (*schema.File, error) { id := c.Params("file_id") if id == "" { return nil, fmt.Errorf("file_id parameter is required") @@ -125,7 +115,7 @@ func getFileFromRequest(c *fiber.Ctx) (*File, error) { // GetFilesEndpoint is the OpenAI API endpoint to get files https://platform.openai.com/docs/api-reference/files/retrieve // @Summary Returns information about a specific file. -// @Success 200 {object} File "Response" +// @Success 200 {object} schema.File "Response" // @Router /v1/files/{file_id} [get] func GetFilesEndpoint(cm *config.BackendConfigLoader, appConfig *config.ApplicationConfig) func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { diff --git a/core/http/endpoints/openai/files_test.go b/core/http/endpoints/openai/files_test.go index 80b01eb9..b8cb5da3 100644 --- a/core/http/endpoints/openai/files_test.go +++ b/core/http/endpoints/openai/files_test.go @@ -14,6 +14,7 @@ import ( "github.com/rs/zerolog/log" "github.com/mudler/LocalAI/core/config" + "github.com/mudler/LocalAI/core/schema" "github.com/gofiber/fiber/v2" utils2 "github.com/mudler/LocalAI/pkg/utils" @@ -22,11 +23,6 @@ import ( "testing" ) -type ListFiles struct { - Data []File - Object string -} - func startUpApp() (app *fiber.App, option *config.ApplicationConfig, loader *config.BackendConfigLoader) { // Preparing the mocked objects loader = &config.BackendConfigLoader{} @@ -159,7 +155,7 @@ func TestUploadFileExceedSizeLimit(t *testing.T) { resp, _ := app.Test(req) assert.Equal(t, 200, resp.StatusCode) - var listFiles ListFiles + var listFiles schema.ListFiles if err := json.Unmarshal(bodyToByteArray(resp, t), &listFiles); err != nil { t.Errorf("Failed to decode response: %v", err) return @@ -201,7 +197,7 @@ func CallFilesUploadEndpoint(t *testing.T, app *fiber.App, fileName, tag, purpos return app.Test(req) } -func CallFilesUploadEndpointWithCleanup(t *testing.T, app *fiber.App, fileName, tag, purpose string, fileSize int, appConfig *config.ApplicationConfig) File { +func CallFilesUploadEndpointWithCleanup(t *testing.T, app *fiber.App, fileName, tag, purpose string, fileSize int, appConfig *config.ApplicationConfig) schema.File { // Create a file that exceeds the limit testName := strings.Split(t.Name(), "/")[1] file := createTestFile(t, testName+"-"+fileName, fileSize, appConfig) @@ -280,8 +276,8 @@ func bodyToByteArray(resp *http.Response, t *testing.T) []byte { return bodyBytes } -func responseToFile(t *testing.T, resp *http.Response) File { - var file File +func responseToFile(t *testing.T, resp *http.Response) schema.File { + var file schema.File responseToString := bodyToString(resp, t) err := json.NewDecoder(strings.NewReader(responseToString)).Decode(&file) @@ -292,8 +288,8 @@ func responseToFile(t *testing.T, resp *http.Response) File { return file } -func responseToListFile(t *testing.T, resp *http.Response) ListFiles { - var listFiles ListFiles +func responseToListFile(t *testing.T, resp *http.Response) schema.ListFiles { + var listFiles schema.ListFiles responseToString := bodyToString(resp, t) err := json.NewDecoder(strings.NewReader(responseToString)).Decode(&listFiles) diff --git a/core/http/routes/localai.go b/core/http/routes/localai.go index cc0b9d49..b8a811b5 100644 --- a/core/http/routes/localai.go +++ b/core/http/routes/localai.go @@ -59,16 +59,8 @@ func RegisterLocalAIRoutes(app *fiber.App, // p2p if p2p.IsP2PEnabled() { - app.Get("/api/p2p", auth, func(c *fiber.Ctx) error { - // Render index - return c.JSON(map[string]interface{}{ - "Nodes": p2p.GetAvailableNodes(""), - "FederatedNodes": p2p.GetAvailableNodes(p2p.FederatedID), - }) - }) - app.Get("/api/p2p/token", auth, func(c *fiber.Ctx) error { - return c.Send([]byte(appConfig.P2PToken)) - }) + app.Get("/api/p2p", auth, localai.ShowP2PNodes) + app.Get("/api/p2p/token", auth, localai.ShowP2PToken(appConfig)) } app.Get("/version", auth, func(c *fiber.Ctx) error { diff --git a/core/p2p/federated.go b/core/p2p/federated.go new file mode 100644 index 00000000..c76ff7b0 --- /dev/null +++ b/core/p2p/federated.go @@ -0,0 +1,15 @@ +package p2p + +const FederatedID = "federated" + +type FederatedServer struct { + listenAddr, service, p2ptoken string +} + +func NewFederatedServer(listenAddr, service, p2pToken string) *FederatedServer { + return &FederatedServer{ + listenAddr: listenAddr, + service: service, + p2ptoken: p2pToken, + } +} diff --git a/core/p2p/federated_server.go b/core/p2p/federated_server.go new file mode 100644 index 00000000..db5957e7 --- /dev/null +++ b/core/p2p/federated_server.go @@ -0,0 +1,127 @@ +//go:build p2p +// +build p2p + +package p2p + +import ( + "context" + "errors" + "fmt" + "net" + "time" + + "math/rand/v2" + + "github.com/mudler/edgevpn/pkg/node" + "github.com/mudler/edgevpn/pkg/protocol" + "github.com/mudler/edgevpn/pkg/types" + "github.com/rs/zerolog/log" +) + +func (f *FederatedServer) Start(ctx context.Context) error { + + n, err := NewNode(f.p2ptoken) + if err != nil { + return fmt.Errorf("creating a new node: %w", err) + } + err = n.Start(ctx) + if err != nil { + return fmt.Errorf("creating a new node: %w", err) + } + + if err := ServiceDiscoverer(ctx, n, f.p2ptoken, f.service, func(servicesID string, tunnel NodeData) { + log.Debug().Msgf("Discovered node: %s", tunnel.ID) + }); err != nil { + return err + } + + return f.proxy(ctx, n) +} + +func (fs *FederatedServer) proxy(ctx context.Context, node *node.Node) error { + + log.Info().Msgf("Allocating service '%s' on: %s", fs.service, fs.listenAddr) + // Open local port for listening + l, err := net.Listen("tcp", fs.listenAddr) + if err != nil { + log.Error().Err(err).Msg("Error listening") + return err + } + // ll.Info("Binding local port on", srcaddr) + + ledger, _ := node.Ledger() + + // Announce ourselves so nodes accepts our connection + ledger.Announce( + ctx, + 10*time.Second, + func() { + // Retrieve current ID for ip in the blockchain + //_, found := ledger.GetKey(protocol.UsersLedgerKey, node.Host().ID().String()) + // If mismatch, update the blockchain + //if !found { + updatedMap := map[string]interface{}{} + updatedMap[node.Host().ID().String()] = &types.User{ + PeerID: node.Host().ID().String(), + Timestamp: time.Now().String(), + } + ledger.Add(protocol.UsersLedgerKey, updatedMap) + // } + }, + ) + + defer l.Close() + for { + select { + case <-ctx.Done(): + return errors.New("context canceled") + default: + log.Debug().Msg("New for connection") + // Listen for an incoming connection. + conn, err := l.Accept() + if err != nil { + fmt.Println("Error accepting: ", err.Error()) + continue + } + + // Handle connections in a new goroutine, forwarding to the p2p service + go func() { + var tunnelAddresses []string + for _, v := range GetAvailableNodes(fs.service) { + if v.IsOnline() { + tunnelAddresses = append(tunnelAddresses, v.TunnelAddress) + } else { + log.Info().Msgf("Node %s is offline", v.ID) + } + } + + if len(tunnelAddresses) == 0 { + log.Error().Msg("No available nodes yet") + return + } + + // open a TCP stream to one of the tunnels + // chosen randomly + // TODO: optimize this and track usage + tunnelAddr := tunnelAddresses[rand.IntN(len(tunnelAddresses))] + + tunnelConn, err := net.Dial("tcp", tunnelAddr) + if err != nil { + log.Error().Err(err).Msg("Error connecting to tunnel") + return + } + + log.Info().Msgf("Redirecting %s to %s", conn.LocalAddr().String(), tunnelConn.RemoteAddr().String()) + closer := make(chan struct{}, 2) + go copyStream(closer, tunnelConn, conn) + go copyStream(closer, conn, tunnelConn) + <-closer + + tunnelConn.Close() + conn.Close() + // ll.Infof("(service %s) Done handling %s", serviceID, l.Addr().String()) + }() + } + } + +} diff --git a/core/p2p/node.go b/core/p2p/node.go index 1d5356e6..6394498f 100644 --- a/core/p2p/node.go +++ b/core/p2p/node.go @@ -6,7 +6,6 @@ import ( ) const defaultServicesID = "services_localai" -const FederatedID = "federated" type NodeData struct { Name string diff --git a/core/p2p/p2p.go b/core/p2p/p2p.go index e0e46170..927f0e24 100644 --- a/core/p2p/p2p.go +++ b/core/p2p/p2p.go @@ -137,14 +137,9 @@ func allocateLocalService(ctx context.Context, node *node.Node, listenAddr, serv } -func copyStream(closer chan struct{}, dst io.Writer, src io.Reader) { - defer func() { closer <- struct{}{} }() // connection is closed, send signal to stop proxy - io.Copy(dst, src) -} - // This is the main of the server (which keeps the env variable updated) // This starts a goroutine that keeps LLAMACPP_GRPC_SERVERS updated with the discovered services -func ServiceDiscoverer(ctx context.Context, n *node.Node, token, servicesID string, discoveryFunc func()) error { +func ServiceDiscoverer(ctx context.Context, n *node.Node, token, servicesID string, discoveryFunc func(serviceID string, node NodeData)) error { if servicesID == "" { servicesID = defaultServicesID } @@ -166,7 +161,7 @@ func ServiceDiscoverer(ctx context.Context, n *node.Node, token, servicesID stri case tunnel := <-tunnels: AddNode(servicesID, tunnel) if discoveryFunc != nil { - discoveryFunc() + discoveryFunc(servicesID, tunnel) } } } @@ -396,3 +391,8 @@ func newNodeOpts(token string) ([]node.Option, error) { return nodeOpts, nil } + +func copyStream(closer chan struct{}, dst io.Writer, src io.Reader) { + defer func() { closer <- struct{}{} }() // connection is closed, send signal to stop proxy + io.Copy(dst, src) +} diff --git a/core/p2p/p2p_disabled.go b/core/p2p/p2p_disabled.go index 340a4fb4..ab1d69dc 100644 --- a/core/p2p/p2p_disabled.go +++ b/core/p2p/p2p_disabled.go @@ -14,7 +14,11 @@ func GenerateToken() string { return "not implemented" } -func ServiceDiscoverer(ctx context.Context, node *node.Node, token, servicesID string, fn func()) error { +func (f *FederatedServer) Start(ctx context.Context) error { + return fmt.Errorf("not implemented") +} + +func ServiceDiscoverer(ctx context.Context, node *node.Node, token, servicesID string, fn func(string, NodeData)) error { return fmt.Errorf("not implemented") } diff --git a/core/schema/localai.go b/core/schema/localai.go index 9bbfe28b..1b75e384 100644 --- a/core/schema/localai.go +++ b/core/schema/localai.go @@ -1,6 +1,7 @@ package schema import ( + "github.com/mudler/LocalAI/core/p2p" gopsutil "github.com/shirou/gopsutil/v3/process" ) @@ -14,6 +15,11 @@ type BackendMonitorResponse struct { CPUPercent float64 } +type GalleryResponse struct { + ID string `json:"uuid"` + StatusURL string `json:"status"` +} + // @Description TTS request body type TTSRequest struct { Model string `json:"model" yaml:"model"` // model name or full path @@ -59,3 +65,8 @@ type StoresFindResponse struct { Values []string `json:"values" yaml:"values"` Similarities []float32 `json:"similarities" yaml:"similarities"` } + +type P2PNodesResponse struct { + Nodes []p2p.NodeData `json:"nodes" yaml:"nodes"` + FederatedNodes []p2p.NodeData `json:"federated_nodes" yaml:"federated_nodes"` +} diff --git a/core/schema/openai.go b/core/schema/openai.go index 9735bb32..3b39eaf3 100644 --- a/core/schema/openai.go +++ b/core/schema/openai.go @@ -2,6 +2,7 @@ package schema import ( "context" + "time" functions "github.com/mudler/LocalAI/pkg/functions" ) @@ -99,6 +100,37 @@ type OpenAIModel struct { Object string `json:"object"` } +type DeleteAssistantResponse struct { + ID string `json:"id"` + Object string `json:"object"` + Deleted bool `json:"deleted"` +} + +// File represents the structure of a file object from the OpenAI API. +type File struct { + ID string `json:"id"` // Unique identifier for the file + Object string `json:"object"` // Type of the object (e.g., "file") + Bytes int `json:"bytes"` // Size of the file in bytes + CreatedAt time.Time `json:"created_at"` // The time at which the file was created + Filename string `json:"filename"` // The name of the file + Purpose string `json:"purpose"` // The purpose of the file (e.g., "fine-tune", "classifications", etc.) +} + +type ListFiles struct { + Data []File + Object string +} + +type AssistantFileRequest struct { + FileID string `json:"file_id"` +} + +type DeleteAssistantFileResponse struct { + ID string `json:"id"` + Object string `json:"object"` + Deleted bool `json:"deleted"` +} + type ImageGenerationResponseFormat string type ChatCompletionResponseFormatType string @@ -147,8 +179,7 @@ type OpenAIRequest struct { // A grammar to constrain the LLM output Grammar string `json:"grammar" yaml:"grammar"` - JSONFunctionGrammarObject *functions.JSONFunctionStructureFunction `json:"grammar_json_functions" yaml:"grammar_json_functions"` - JSONFunctionGrammarObjectName *functions.JSONFunctionStructureName `json:"grammar_json_name" yaml:"grammar_json_name"` + JSONFunctionGrammarObject *functions.JSONFunctionStructure `json:"grammar_json_functions" yaml:"grammar_json_functions"` Backend string `json:"backend" yaml:"backend"` diff --git a/core/startup/config_file_watcher.go b/core/startup/config_file_watcher.go index c70df8ba..df72483f 100644 --- a/core/startup/config_file_watcher.go +++ b/core/startup/config_file_watcher.go @@ -9,7 +9,7 @@ import ( "time" "github.com/fsnotify/fsnotify" - "github.com/imdario/mergo" + "dario.cat/mergo" "github.com/mudler/LocalAI/core/config" "github.com/rs/zerolog/log" ) diff --git a/docs/content/docs/advanced/advanced-usage.md b/docs/content/docs/advanced/advanced-usage.md index 4bbd8a30..35d3a2e4 100644 --- a/docs/content/docs/advanced/advanced-usage.md +++ b/docs/content/docs/advanced/advanced-usage.md @@ -112,6 +112,8 @@ name: "" # Model name, used to identify the model in API calls. # Precision settings for the model, reducing precision can enhance performance on some hardware. f16: null # Whether to use 16-bit floating-point precision. +embeddings: true # Enable embeddings for the model. + # Concurrency settings for the application. threads: null # Number of threads to use for processing. @@ -150,7 +152,8 @@ function: replace_function_results: [] # Placeholder to replace function call results with arbitrary strings or patterns. replace_llm_results: [] # Replace language model results with arbitrary strings or patterns. capture_llm_results: [] # Capture language model results as text result, among JSON, in function calls. For instance, if a model returns a block for "thinking" and a block for "response", this will allow you to capture the thinking block. - return_name_in_function_response: false # Some models might prefer to use "name" rather then "function" when returning JSON data. This will allow to use "name" as a key in the JSON response. + function_name_key: "name" + function_arguments_key: "arguments" # Feature gating flags to enable experimental or optional features. feature_flags: {} diff --git a/docs/content/docs/advanced/run-other-models.md b/docs/content/docs/advanced/run-other-models.md index b0efabe7..cfea4631 100644 --- a/docs/content/docs/advanced/run-other-models.md +++ b/docs/content/docs/advanced/run-other-models.md @@ -8,9 +8,9 @@ icon = "rocket_launch" ## Running other models -> _Do you have already a model file? Skip to [Run models manually]({{%relref "docs/getting-started/manual" %}})_. +> _Do you have already a model file? Skip to [Run models manually]({{%relref "docs/getting-started/models" %}})_. -To load models into LocalAI, you can either [use models manually]({{%relref "docs/getting-started/manual" %}}) or configure LocalAI to pull the models from external sources, like Huggingface and configure the model. +To load models into LocalAI, you can either [use models manually]({{%relref "docs/getting-started/models" %}}) or configure LocalAI to pull the models from external sources, like Huggingface and configure the model. To do that, you can point LocalAI to an URL to a YAML configuration file - however - LocalAI does also have some popular model configuration embedded in the binary as well. Below you can find a list of the models configuration that LocalAI has pre-built, see [Model customization]({{%relref "docs/getting-started/customize-model" %}}) on how to configure models from URLs. diff --git a/docs/content/docs/faq.md b/docs/content/docs/faq.md index 9b2a5479..c1dc24ec 100644 --- a/docs/content/docs/faq.md +++ b/docs/content/docs/faq.md @@ -16,6 +16,10 @@ Here are answers to some of the most common questions. Most gguf-based models should work, but newer models may require additions to the API. If a model doesn't work, please feel free to open up issues. However, be cautious about downloading models from the internet and directly onto your machine, as there may be security vulnerabilities in lama.cpp or ggml that could be maliciously exploited. Some models can be found on Hugging Face: https://huggingface.co/models?search=gguf, or models from gpt4all are compatible too: https://github.com/nomic-ai/gpt4all. +### Benchmarking LocalAI and llama.cpp shows different results! + +LocalAI applies a set of defaults when loading models with the llama.cpp backend, one of these is mirostat sampling - while it achieves better results, it slows down the inference. You can disable this by setting `mirostat: 0` in the model config file. See also the advanced section ({{%relref "docs/advanced/advanced-usage" %}}) for more information and [this issue](https://github.com/mudler/LocalAI/issues/2780). + ### What's the difference with Serge, or XXX? LocalAI is a multi-model solution that doesn't focus on a specific model type (e.g., llama.cpp or alpaca.cpp), and it handles all of these internally for faster inference, easy to set up locally and deploy to Kubernetes. diff --git a/docs/content/docs/getting-started/build.md b/docs/content/docs/getting-started/build.md index c8428c2d..f21a5b48 100644 --- a/docs/content/docs/getting-started/build.md +++ b/docs/content/docs/getting-started/build.md @@ -55,8 +55,8 @@ apt install cmake golang libgrpc-dev make protobuf-compiler-grpc python3-grpc-to After you have golang installed and working, you can install the required binaries for compiling the golang protobuf components via the following commands ```bash -go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.0 -go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@8ba23be9613c672d40ae261d2a1335d639bdd59b +go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 +go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@1958fcbe2ca8bd93af633f11e97d44e567e945af ``` diff --git a/docs/content/docs/getting-started/manual.md b/docs/content/docs/getting-started/models.md similarity index 64% rename from docs/content/docs/getting-started/manual.md rename to docs/content/docs/getting-started/models.md index ed8d8017..a57fa994 100644 --- a/docs/content/docs/getting-started/manual.md +++ b/docs/content/docs/getting-started/models.md @@ -1,21 +1,69 @@ ---- ++++ +disableToc = false +title = "Install and Run Models" +weight = 4 +icon = "rocket_launch" ++++ -disableToc: false -title: "Run models manually" -weight: 5 -icon: "rocket_launch" +To install models with LocalAI, you can: ---- +- Browse the Model Gallery from the Web Interface and install models with a couple of clicks. For more details, refer to the [Gallery Documentation]({{% relref "docs/features/model-gallery" %}}). +- Specify a model from the LocalAI gallery during startup, e.g., `local-ai run `. +- Use a URI to specify a model file (e.g., `huggingface://...`, `oci://`, or `ollama://`) when starting LocalAI, e.g., `local-ai run huggingface://TheBloke/phi-2-GGUF/phi-2.Q8_0.gguf`. +- Specify a URL to a model configuration file when starting LocalAI, e.g., `local-ai run https://gist.githubusercontent.com/.../phi-2.yaml`. +- Manually install the models by copying the files into the models directory (`--models`). -# Run Models Manually +## Run and Install Models via the Gallery + +To run models available in the LocalAI gallery, you can use the WebUI or specify the model name when starting LocalAI. Models can be found in the gallery via the Web interface, the [model gallery](https://models.localai.io), or the CLI with: `local-ai models list`. + +To install a model from the gallery, use the model name as the URI. For example, to run LocalAI with the Hermes model, execute: + +```bash +local-ai run hermes-2-theta-llama-3-8b +``` + +To install only the model, use: + +```bash +local-ai models install hermes-2-theta-llama-3-8b +``` + +Note: The galleries available in LocalAI can be customized to point to a different URL or a local directory. For more information on how to setup your own gallery, see the [Gallery Documentation]({{% relref "docs/features/model-gallery" %}}). + +## Run Models via URI + +To run models via URI, specify a URI to a model file or a configuration file when starting LocalAI. Valid syntax includes: + +- `file://path/to/model` +- `huggingface://repository_id/model_file` (e.g., `huggingface://TheBloke/phi-2-GGUF/phi-2.Q8_0.gguf`) +- From OCIs: `oci://container_image:tag`, `ollama://model_id:tag` +- From configuration files: `https://gist.githubusercontent.com/.../phi-2.yaml` + +Configuration files can be used to customize the model defaults and settings. For advanced configurations, refer to the [Customize Models section]({{% relref "docs/getting-started/customize-model" %}}). + +### Examples + +```bash +# Start LocalAI with the phi-2 model +local-ai run huggingface://TheBloke/phi-2-GGUF/phi-2.Q8_0.gguf +# Install and run a model from the Ollama OCI registry +local-ai run ollama://gemma:2b +# Run a model from a configuration file +local-ai run https://gist.githubusercontent.com/.../phi-2.yaml +# Install and run a model from a standard OCI registry (e.g., Docker Hub) +local-ai run oci://localai/phi-2:latest +``` + +## Run Models Manually Follow these steps to manually run models using LocalAI: 1. **Prepare Your Model and Configuration Files**: - Ensure you have a model file and a configuration YAML file, if necessary. Customize model defaults and specific settings with a configuration file. For advanced configurations, refer to the [Advanced Documentation]({{% relref "docs/advanced" %}}). + Ensure you have a model file and, if necessary, a configuration YAML file. Customize model defaults and settings with a configuration file. For advanced configurations, refer to the [Advanced Documentation]({{% relref "docs/advanced" %}}). 2. **GPU Acceleration**: - For instructions on GPU acceleration, visit the [GPU acceleration]({{% relref "docs/features/gpu-acceleration" %}}) page. + For instructions on GPU acceleration, visit the [GPU Acceleration]({{% relref "docs/features/gpu-acceleration" %}}) page. 3. **Run LocalAI**: Choose one of the following methods to run LocalAI: @@ -160,5 +208,3 @@ For instructions on building LocalAI from source, see the [Build Section]({{% re {{< /tabs >}} For more model configurations, visit the [Examples Section](https://github.com/mudler/LocalAI/tree/master/examples/configurations). - ---- \ No newline at end of file diff --git a/docs/content/docs/getting-started/quickstart.md b/docs/content/docs/getting-started/quickstart.md index 3417669b..5defa7fc 100644 --- a/docs/content/docs/getting-started/quickstart.md +++ b/docs/content/docs/getting-started/quickstart.md @@ -38,13 +38,13 @@ For detailed instructions, see [Using container images]({{% relref "docs/getting ## Running LocalAI with All-in-One (AIO) Images -> _Already have a model file? Skip to [Run models manually]({{% relref "docs/getting-started/manual" %}})_. +> _Already have a model file? Skip to [Run models manually]({{% relref "docs/getting-started/models" %}})_. LocalAI's All-in-One (AIO) images are pre-configured with a set of models and backends to fully leverage almost all the features of LocalAI. If pre-configured models are not required, you can use the standard [images]({{% relref "docs/getting-started/container-images" %}}). These images are available for both CPU and GPU environments. AIO images are designed for ease of use and require no additional configuration. -It is recommended to use AIO images if you prefer not to configure the models manually or via the web interface. For running specific models, refer to the [manual method]({{% relref "docs/getting-started/manual" %}}). +It is recommended to use AIO images if you prefer not to configure the models manually or via the web interface. For running specific models, refer to the [manual method]({{% relref "docs/getting-started/models" %}}). The AIO images come pre-configured with the following features: - Text to Speech (TTS) @@ -66,5 +66,5 @@ Explore additional resources and community contributions: - [Run from Container images]({{% relref "docs/getting-started/container-images" %}}) - [Examples to try from the CLI]({{% relref "docs/getting-started/try-it-out" %}}) - [Build LocalAI and the container image]({{% relref "docs/getting-started/build" %}}) -- [Run models manually]({{% relref "docs/getting-started/manual" %}}) +- [Run models manually]({{% relref "docs/getting-started/models" %}}) - [Examples](https://github.com/mudler/LocalAI/tree/master/examples#examples) diff --git a/docs/content/docs/getting-started/try-it-out.md b/docs/content/docs/getting-started/try-it-out.md index f50e74cb..26fb6e45 100644 --- a/docs/content/docs/getting-started/try-it-out.md +++ b/docs/content/docs/getting-started/try-it-out.md @@ -17,10 +17,10 @@ After installation, install new models by navigating the model gallery, or by us To install models with the WebUI, see the [Models section]({{%relref "docs/features/model-gallery" %}}). With the CLI you can list the models with `local-ai models list` and install them with `local-ai models install `. -You can also [run models manually]({{%relref "docs/getting-started/manual" %}}) by copying files into the `models` directory. +You can also [run models manually]({{%relref "docs/getting-started/models" %}}) by copying files into the `models` directory. {{% /alert %}} -You can test out the API endpoints using `curl`, few examples are listed below. The models we are refering here (`gpt-4`, `gpt-4-vision-preview`, `tts-1`, `whisper-1`) are the default models that come with the AIO images - you can also use any other model you have installed. +You can test out the API endpoints using `curl`, few examples are listed below. The models we are referring here (`gpt-4`, `gpt-4-vision-preview`, `tts-1`, `whisper-1`) are the default models that come with the AIO images - you can also use any other model you have installed. ### Text Generation @@ -193,4 +193,4 @@ Don't use the model file as `model` in the request unless you want to handle the Use the model names like you would do with OpenAI like in the examples below. For instance `gpt-4-vision-preview`, or `gpt-4`. -{{% /alert %}} \ No newline at end of file +{{% /alert %}} diff --git a/docs/themes/hugo-theme-relearn b/docs/themes/hugo-theme-relearn index c25bc2a2..1b2e1395 160000 --- a/docs/themes/hugo-theme-relearn +++ b/docs/themes/hugo-theme-relearn @@ -1 +1 @@ -Subproject commit c25bc2a27ab46649393ef7b310e14fff1311116d +Subproject commit 1b2e139512106f8074ac7d4a884135d159720cc4 diff --git a/examples/chainlit/Dockerfile b/examples/chainlit/Dockerfile index 4aa00a72..5cf7a67d 100644 --- a/examples/chainlit/Dockerfile +++ b/examples/chainlit/Dockerfile @@ -1,5 +1,5 @@ # Use an official Python runtime as a parent image -FROM harbor.home.sfxworks.net/docker/library/python:3.9-slim +FROM python:3.12-slim # Set the working directory in the container WORKDIR /app @@ -7,8 +7,17 @@ WORKDIR /app # Copy the current directory contents into the container at /app COPY requirements.txt /app +# Install c++ compiler +RUN apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + # Install any needed packages specified in requirements.txt -RUN pip install -r requirements.txt +RUN pip install --no-cache-dir -r requirements.txt \ + && DEBIAN_FRONTEND=noninteractive apt-get remove -y build-essential \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* COPY . /app diff --git a/examples/chainlit/requirements.txt b/examples/chainlit/requirements.txt index 8519033e..116b7b61 100644 --- a/examples/chainlit/requirements.txt +++ b/examples/chainlit/requirements.txt @@ -1,7 +1,6 @@ -llama_hub==0.0.41 -llama_index==0.8.55 -Requests==2.31.0 -weaviate_client==3.25.1 +llama_index==0.10.55 +requests==2.32.3 +weaviate_client==4.6.5 transformers torch -chainlit \ No newline at end of file +chainlit diff --git a/examples/functions/Dockerfile b/examples/functions/Dockerfile index b23a3c6f..df362442 100644 --- a/examples/functions/Dockerfile +++ b/examples/functions/Dockerfile @@ -1,5 +1,5 @@ -FROM python:3.10-bullseye +FROM python:3.12-slim-bullseye COPY . /app WORKDIR /app RUN pip install --no-cache-dir -r requirements.txt -ENTRYPOINT [ "python", "./functions-openai.py" ]; \ No newline at end of file +ENTRYPOINT [ "python", "./functions-openai.py" ] diff --git a/examples/functions/requirements.txt b/examples/functions/requirements.txt index 759c5b03..481af898 100644 --- a/examples/functions/requirements.txt +++ b/examples/functions/requirements.txt @@ -1,2 +1,2 @@ -langchain==0.1.0 -openai==0.27.8 +langchain==0.2.8 +openai==1.35.13 diff --git a/examples/k8sgpt/broken-pod.yaml b/examples/k8sgpt/broken-pod.yaml index 8b7e8e0f..9d5289de 100644 --- a/examples/k8sgpt/broken-pod.yaml +++ b/examples/k8sgpt/broken-pod.yaml @@ -5,7 +5,7 @@ metadata: spec: containers: - name: broken-pod - image: nginx:1.a.b.c + image: nginx:1.27.0 livenessProbe: httpGet: path: / diff --git a/examples/k8sgpt/values.yaml b/examples/k8sgpt/values.yaml index cfceabea..e0075de4 100644 --- a/examples/k8sgpt/values.yaml +++ b/examples/k8sgpt/values.yaml @@ -2,7 +2,7 @@ replicaCount: 1 deployment: # https://quay.io/repository/go-skynet/local-ai?tab=tags - image: quay.io/go-skynet/local-ai:v1.23.0 + image: quay.io/go-skynet/local-ai:v1.40.0 env: threads: 4 debug: "true" @@ -93,4 +93,4 @@ nodeSelector: {} tolerations: [] -affinity: {} \ No newline at end of file +affinity: {} diff --git a/examples/langchain-chroma/requirements.txt b/examples/langchain-chroma/requirements.txt index cdf466b9..0e6d8c4d 100644 --- a/examples/langchain-chroma/requirements.txt +++ b/examples/langchain-chroma/requirements.txt @@ -1,4 +1,4 @@ -langchain==0.1.0 -openai==0.27.6 -chromadb==0.3.21 -llama-index==0.9.36 \ No newline at end of file +langchain==0.2.8 +openai==1.35.13 +chromadb==0.5.4 +llama-index==0.10.55 \ No newline at end of file diff --git a/examples/langchain/JS.Dockerfile b/examples/langchain/JS.Dockerfile index 10320931..29c20c3b 100644 --- a/examples/langchain/JS.Dockerfile +++ b/examples/langchain/JS.Dockerfile @@ -1,6 +1,6 @@ -FROM node:latest +FROM node:lts-alpine COPY ./langchainjs-localai-example /app WORKDIR /app RUN npm install RUN npm run build -ENTRYPOINT [ "npm", "run", "start" ] \ No newline at end of file +ENTRYPOINT [ "npm", "run", "start" ] diff --git a/examples/langchain/PY.Dockerfile b/examples/langchain/PY.Dockerfile index 15b0e42e..efc7a876 100644 --- a/examples/langchain/PY.Dockerfile +++ b/examples/langchain/PY.Dockerfile @@ -1,5 +1,5 @@ -FROM python:3.10-bullseye +FROM python:3.12-bullseye COPY ./langchainpy-localai-example /app WORKDIR /app RUN pip install --no-cache-dir -r requirements.txt -ENTRYPOINT [ "python", "./full_demo.py" ]; \ No newline at end of file +ENTRYPOINT [ "python", "./full_demo.py" ] diff --git a/examples/langchain/langchainpy-localai-example/requirements.txt b/examples/langchain/langchainpy-localai-example/requirements.txt index 695d309b..01a75d46 100644 --- a/examples/langchain/langchainpy-localai-example/requirements.txt +++ b/examples/langchain/langchainpy-localai-example/requirements.txt @@ -1,32 +1,33 @@ -aiohttp==3.9.4 +aiohttp==3.9.5 aiosignal==1.3.1 -async-timeout==4.0.2 -attrs==23.1.0 -certifi==2023.7.22 -charset-normalizer==3.1.0 +async-timeout==4.0.3 +attrs==23.2.0 +certifi==2024.7.4 +charset-normalizer==3.3.2 colorama==0.4.6 -dataclasses-json==0.5.7 -debugpy==1.6.7 -frozenlist==1.3.3 -greenlet==2.0.2 +dataclasses-json==0.6.7 +debugpy==1.8.2 +frozenlist==1.4.1 +greenlet==3.0.3 idna==3.7 -langchain==0.1.0 -marshmallow==3.19.0 +langchain==0.2.8 +langchain-community==0.2.7 +marshmallow==3.21.3 marshmallow-enum==1.5.1 -multidict==6.0.4 +multidict==6.0.5 mypy-extensions==1.0.0 -numexpr==2.8.4 -numpy==1.24.3 -openai==0.27.6 +numexpr==2.10.1 +numpy==1.26.4 +openai==1.35.13 openapi-schema-pydantic==1.2.4 -packaging==23.1 -pydantic==1.10.13 -PyYAML==6.0 -requests==2.31.0 -SQLAlchemy==2.0.12 -tenacity==8.2.2 -tqdm==4.66.3 -typing-inspect==0.8.0 -typing_extensions==4.5.0 -urllib3==1.26.18 -yarl==1.9.2 +packaging>=23.2 +pydantic==2.8.2 +PyYAML==6.0.1 +requests==2.32.3 +SQLAlchemy==2.0.30 +tenacity==8.5.0 +tqdm==4.66.4 +typing-inspect==0.9.0 +typing_extensions==4.12.2 +urllib3==2.2.2 +yarl==1.9.4 diff --git a/examples/semantic-todo/go.mod b/examples/semantic-todo/go.mod index 7869e329..56e563ec 100644 --- a/examples/semantic-todo/go.mod +++ b/examples/semantic-todo/go.mod @@ -1,10 +1,10 @@ module semantic-todo -go 1.21.6 +go 1.22 require ( - github.com/gdamore/tcell/v2 v2.7.1 - github.com/rivo/tview v0.0.0-20240307173318-e804876934a1 + github.com/gdamore/tcell/v2 v2.7.4 + github.com/rivo/tview v0.0.0-20240524063012-037df494fb76 ) require ( diff --git a/examples/semantic-todo/go.sum b/examples/semantic-todo/go.sum index 320d4060..bdd4979f 100644 --- a/examples/semantic-todo/go.sum +++ b/examples/semantic-todo/go.sum @@ -1,13 +1,13 @@ github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= -github.com/gdamore/tcell/v2 v2.7.1 h1:TiCcmpWHiAU7F0rA2I3S2Y4mmLmO9KHxJ7E1QhYzQbc= -github.com/gdamore/tcell/v2 v2.7.1/go.mod h1:dSXtXTSK0VsW1biw65DZLZ2NKr7j0qP/0J7ONmsraWg= +github.com/gdamore/tcell/v2 v2.7.4 h1:sg6/UnTM9jGpZU+oFYAsDahfchWAFW8Xx2yFinNSAYU= +github.com/gdamore/tcell/v2 v2.7.4/go.mod h1:dSXtXTSK0VsW1biw65DZLZ2NKr7j0qP/0J7ONmsraWg= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/rivo/tview v0.0.0-20240307173318-e804876934a1 h1:bWLHTRekAy497pE7+nXSuzXwwFHI0XauRzz6roUvY+s= -github.com/rivo/tview v0.0.0-20240307173318-e804876934a1/go.mod h1:02iFIz7K/A9jGCvrizLPvoqr4cEIx7q54RH5Qudkrss= +github.com/rivo/tview v0.0.0-20240524063012-037df494fb76 h1:iqvDlgyjmqleATtFbA7c14djmPh2n4mCYUv7JlD/ruA= +github.com/rivo/tview v0.0.0-20240524063012-037df494fb76/go.mod h1:02iFIz7K/A9jGCvrizLPvoqr4cEIx7q54RH5Qudkrss= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= diff --git a/examples/streamlit-bot/requirements.txt b/examples/streamlit-bot/requirements.txt index 1fcd5093..ed2a5980 100644 --- a/examples/streamlit-bot/requirements.txt +++ b/examples/streamlit-bot/requirements.txt @@ -1,2 +1,2 @@ -streamlit==1.30.0 +streamlit==1.36.0 requests \ No newline at end of file diff --git a/gallery/deepseek.yaml b/gallery/deepseek.yaml new file mode 100644 index 00000000..fa8870a1 --- /dev/null +++ b/gallery/deepseek.yaml @@ -0,0 +1,20 @@ +--- +name: "deepseek" + +config_file: | + mmap: true + context_size: 8192 + template: + chat_message: |- + {{if eq .RoleName "user" -}}User: {{.Content }} + {{ end -}} + {{if eq .RoleName "assistant" -}}Assistant: {{.Content}}<|end▁of▁sentence|>{{end}} + {{if eq .RoleName "system" -}}{{.Content}} + {{end -}} + chat: | + {{.Input -}} + Assistant: # Space is preserved for templating reasons, but line does not end with one for the linter. + completion: | + {{.Input}} + stopwords: + - '<|end▁of▁sentence|>' diff --git a/gallery/index.yaml b/gallery/index.yaml index 05638187..b7795362 100644 --- a/gallery/index.yaml +++ b/gallery/index.yaml @@ -1,6 +1,31 @@ --- -## Start QWEN2 +## Deepseek +- &deepseek + url: "github:mudler/LocalAI/gallery/deepseek.yaml@master" + name: "deepseek-coder-v2-lite-instruct" + icon: "https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/logo.svg?raw=true" + license: deepseek + description: | + DeepSeek-Coder-V2, an open-source Mixture-of-Experts (MoE) code language model that achieves performance comparable to GPT4-Turbo in code-specific tasks. Specifically, DeepSeek-Coder-V2 is further pre-trained from DeepSeek-Coder-V2-Base with 6 trillion tokens sourced from a high-quality and multi-source corpus. Through this continued pre-training, DeepSeek-Coder-V2 substantially enhances the coding and mathematical reasoning capabilities of DeepSeek-Coder-V2-Base, while maintaining comparable performance in general language tasks. Compared to DeepSeek-Coder, DeepSeek-Coder-V2 demonstrates significant advancements in various aspects of code-related tasks, as well as reasoning and general capabilities. Additionally, DeepSeek-Coder-V2 expands its support for programming languages from 86 to 338, while extending the context length from 16K to 128K. + In standard benchmark evaluations, DeepSeek-Coder-V2 achieves superior performance compared to closed-source models such as GPT4-Turbo, Claude 3 Opus, and Gemini 1.5 Pro in coding and math benchmarks. The list of supported programming languages can be found in the paper. + urls: + - https://github.com/deepseek-ai/DeepSeek-Coder-V2/tree/main + - https://huggingface.co/LoneStriker/DeepSeek-Coder-V2-Lite-Instruct-GGUF + tags: + - llm + - gguf + - gpu + - deepseek + - cpu + overrides: + parameters: + model: DeepSeek-Coder-V2-Lite-Instruct-Q4_K_M.gguf + files: + - filename: DeepSeek-Coder-V2-Lite-Instruct-Q4_K_M.gguf + sha256: 50ec78036433265965ed1afd0667c00c71c12aa70bcf383be462cb8e159db6c0 + uri: huggingface://LoneStriker/DeepSeek-Coder-V2-Lite-Instruct-GGUF/DeepSeek-Coder-V2-Lite-Instruct-Q4_K_M.gguf - &qwen2 + ## Start QWEN2 url: "github:mudler/LocalAI/gallery/chatml.yaml@master" name: "qwen2-7b-instruct" license: apache-2.0 @@ -208,6 +233,37 @@ - filename: "Mistral-7B-Instruct-v0.3.Q4_K_M.gguf" sha256: "14850c84ff9f06e9b51d505d64815d5cc0cea0257380353ac0b3d21b21f6e024" uri: "huggingface://MaziyarPanahi/Mistral-7B-Instruct-v0.3-GGUF/Mistral-7B-Instruct-v0.3.Q4_K_M.gguf" +- !!merge <<: *mistral03 + name: "mathstral-7b-v0.1-imat" + url: "github:mudler/LocalAI/gallery/mathstral.yaml@master" + urls: + - https://huggingface.co/mistralai/mathstral-7B-v0.1 + - https://huggingface.co/InferenceIllusionist/mathstral-7B-v0.1-iMat-GGUF + description: | + Mathstral 7B is a model specializing in mathematical and scientific tasks, based on Mistral 7B. You can read more in the official blog post https://mistral.ai/news/mathstral/. + overrides: + parameters: + model: mathstral-7B-v0.1-iMat-Q4_K_M.gguf + files: + - filename: mathstral-7B-v0.1-iMat-Q4_K_M.gguf + sha256: 3ba94b7a8283ffa319c9ce23657f91ecf221ceada167c1253906cf56d72e8f90 + uri: huggingface://InferenceIllusionist/mathstral-7B-v0.1-iMat-GGUF/mathstral-7B-v0.1-iMat-Q4_K_M.gguf +- !!merge <<: *mistral03 + name: "mahou-1.3d-mistral-7b-i1" + url: "github:mudler/LocalAI/gallery/chatml.yaml@master" + icon: https://huggingface.co/flammenai/Mahou-1.0-mistral-7B/resolve/main/mahou1.png + urls: + - https://huggingface.co/flammenai/Mahou-1.3d-mistral-7B + - https://huggingface.co/mradermacher/Mahou-1.3d-mistral-7B-i1-GGUF + description: | + Mahou is designed to provide short messages in a conversational context. It is capable of casual conversation and character roleplay. + overrides: + parameters: + model: Mahou-1.3d-mistral-7B.i1-Q4_K_M.gguf + files: + - filename: Mahou-1.3d-mistral-7B.i1-Q4_K_M.gguf + sha256: 8272f050e36d612ab282e095cb4e775e2c818e7096f8d522314d256923ef6da9 + uri: huggingface://mradermacher/Mahou-1.3d-mistral-7B-i1-GGUF/Mahou-1.3d-mistral-7B.i1-Q4_K_M.gguf - &mudler ### START mudler's LocalAI specific-models url: "github:mudler/LocalAI/gallery/mudler.yaml@master" @@ -375,7 +431,7 @@ files: - filename: gemma-2-27b-it-Q4_K_M.gguf uri: huggingface://bartowski/gemma-2-27b-it-GGUF/gemma-2-27b-it-Q4_K_M.gguf - sha256: 69a0cdba2bc2e56d8298a9330f2a050ebecd657ed315beb3e51ae427b224dbc7 + sha256: 503a87ab47c9e7fb27545ec8592b4dc4493538bd47b397ceb3197e10a0370d23 - !!merge <<: *gemma name: "gemma-2-9b-it" urls: @@ -389,7 +445,7 @@ files: - filename: gemma-2-9b-it-Q4_K_M.gguf uri: huggingface://bartowski/gemma-2-9b-it-GGUF/gemma-2-9b-it-Q4_K_M.gguf - sha256: 05390244866abc0e7108a2b1e3db07b82df3cd82f006256a75fc21137054151f + sha256: 13b2a7b4115bbd0900162edcebe476da1ba1fc24e718e8b40d32f6e300f56dfe - !!merge <<: *gemma name: "tess-v2.5-gemma-2-27b-alpha" urls: @@ -441,41 +497,14 @@ files: - filename: Gemma-2-9B-It-SPPO-Iter3-Q4_K_M.gguf uri: huggingface://bartowski/Gemma-2-9B-It-SPPO-Iter3-GGUF/Gemma-2-9B-It-SPPO-Iter3-Q4_K_M.gguf - sha256: 7aac221f548beef8d45106eabbec6b2c4e1669a51ad14e4bf640d463dadf36e7 + sha256: c04482b442f05b784ab33af30caa0ea0645deb67fb359d3fad4932f4bb04e12d - !!merge <<: *gemma name: "smegmma-9b-v1" icon: https://cdn-uploads.huggingface.co/production/uploads/65f2fd1c25b848bd061b5c2e/RSuc5p9Sm6CYj6lGOxvx4.gif urls: - https://huggingface.co/TheDrummer/Smegmma-9B-v1 - https://huggingface.co/bartowski/Smegmma-9B-v1-GGUF - description: | - Smegmma 9B v1 🧀 - - The sweet moist of Gemma 2, unhinged. - - image/gif - - smeg - ghem - mah - - An eRP model that will blast you with creamy moist. Finetuned by yours truly. - - The first Gemma 2 9B RP finetune attempt! - What's New? - - Engaging roleplay - Less refusals / censorship - Less commentaries / summaries - More willing AI - Better formatting - Better creativity - Moist alignment - - Notes - - Refusals still exist, but a couple of re-gens may yield the result you want - Formatting and logic may be weaker at the start - Make sure to start strong - May be weaker with certain cards, YMMV and adjust accordingly! + description: "Smegmma 9B v1 \U0001F9C0\n\nThe sweet moist of Gemma 2, unhinged.\n\nsmeg - ghem - mah\n\nAn eRP model that will blast you with creamy moist. Finetuned by yours truly.\n\nThe first Gemma 2 9B RP finetune attempt!\nWhat's New?\n\n Engaging roleplay\n Less refusals / censorship\n Less commentaries / summaries\n More willing AI\n Better formatting\n Better creativity\n Moist alignment\n\nNotes\n\n Refusals still exist, but a couple of re-gens may yield the result you want\n Formatting and logic may be weaker at the start\n Make sure to start strong\n May be weaker with certain cards, YMMV and adjust accordingly!\n" overrides: parameters: model: Smegmma-9B-v1-Q4_K_M.gguf @@ -483,6 +512,73 @@ - filename: Smegmma-9B-v1-Q4_K_M.gguf uri: huggingface://bartowski/Smegmma-9B-v1-GGUF/Smegmma-9B-v1-Q4_K_M.gguf sha256: abd9da0a6bf5cbc0ed6bb0d7e3ee7aea3f6b1edbf8c64e51d0fa25001975aed7 +- !!merge <<: *gemma + name: "smegmma-deluxe-9b-v1" + icon: https://cdn-uploads.huggingface.co/production/uploads/65f2fd1c25b848bd061b5c2e/RSuc5p9Sm6CYj6lGOxvx4.gif + urls: + - https://huggingface.co/TheDrummer/Smegmma-Deluxe-9B-v1 + - https://huggingface.co/bartowski/Smegmma-Deluxe-9B-v1-GGUF + description: "Smegmma Deluxe 9B v1 \U0001F9C0\n\nThe sweet moist of Gemma 2, unhinged.\n\nsmeg - ghem - mah\n\nAn eRP model that will blast you with creamy moist. Finetuned by yours truly.\n\nThe first Gemma 2 9B RP finetune attempt!\n\nWhat's New?\n\n Engaging roleplay\n Less refusals / censorship\n Less commentaries / summaries\n More willing AI\n Better formatting\n Better creativity\n Moist alignment\n" + overrides: + parameters: + model: Smegmma-Deluxe-9B-v1-Q4_K_M.gguf + files: + - filename: Smegmma-Deluxe-9B-v1-Q4_K_M.gguf + uri: huggingface://bartowski/Smegmma-Deluxe-9B-v1-GGUF/Smegmma-Deluxe-9B-v1-Q4_K_M.gguf + sha256: 732ecb253ea0115453438fc1f4e3e31507719ddcf81890a86ad1d734beefdb6f +- !!merge <<: *gemma + name: "tiger-gemma-9b-v1-i1" + icon: https://cdn-uploads.huggingface.co/production/uploads/65f2fd1c25b848bd061b5c2e/A97OlLKeT4XOnv4IG1b6m.png + urls: + - https://huggingface.co/TheDrummer/Tiger-Gemma-9B-v1 + - https://huggingface.co/mradermacher/Tiger-Gemma-9B-v1-i1-GGUF + description: | + Tiger Gemma 9B v1 + + Decensored Gemma 9B. No refusals so far. No apparent brain damage. + + In memory of Tiger + overrides: + parameters: + model: Tiger-Gemma-9B-v1.i1-Q4_K_M.gguf + files: + - filename: Tiger-Gemma-9B-v1.i1-Q4_K_M.gguf + sha256: ef10accfee8023b31def5425bf591bf1f0203090f3dd851cd3f37bb235324383 + uri: huggingface://mradermacher/Tiger-Gemma-9B-v1-i1-GGUF/Tiger-Gemma-9B-v1.i1-Q4_K_M.gguf +- !!merge <<: *gemma + name: "hodachi-ezo-humanities-9b-gemma-2-it" + icon: https://cdn-uploads.huggingface.co/production/uploads/657e900beaad53ff67ba84db/0OYFqT8kACowa9bY1EZF6.png + urls: + - https://huggingface.co/HODACHI/EZO-Humanities-9B-gemma-2-it + - https://huggingface.co/mmnga/HODACHI-EZO-Humanities-9B-gemma-2-it-gguf + description: | + This model is based on Gemma-2-9B-it, specially tuned to enhance its performance in Humanities-related tasks. While maintaining its strong foundation in Japanese language processing, it has been optimized to excel in areas such as literature, philosophy, history, and cultural studies. This focused approach allows the model to provide deeper insights and more nuanced responses in Humanities fields, while still being capable of handling a wide range of global inquiries. + + Gemma-2-9B-itをベースとして、人文科学(Humanities)関連タスクでの性能向上に特化したチューニングを施したモデルです。日本語処理の強固な基盤を維持しつつ、文学、哲学、歴史、文化研究などの分野で卓越した能力を発揮するよう最適化されています。この焦点を絞ったアプローチにより、人文科学分野でより深い洞察と繊細な応答を提供しながら、同時に幅広いグローバルな問い合わせにも対応できる能力を備えています。 + overrides: + parameters: + model: HODACHI-EZO-Humanities-9B-gemma-2-it-Q4_K_M.gguf + files: + - filename: HODACHI-EZO-Humanities-9B-gemma-2-it-Q4_K_M.gguf + sha256: 11606130206347355785f5a2720ff2fa671ca7fbe2af3fb4c34b508389952424 + uri: huggingface://mmnga/HODACHI-EZO-Humanities-9B-gemma-2-it-gguf/HODACHI-EZO-Humanities-9B-gemma-2-it-Q4_K_M.gguf +- !!merge <<: *gemma + name: "ezo-common-9b-gemma-2-it" + icon: https://cdn-uploads.huggingface.co/production/uploads/657e900beaad53ff67ba84db/0OYFqT8kACowa9bY1EZF6.png + urls: + - https://huggingface.co/HODACHI/EZO-Common-9B-gemma-2-it + - https://huggingface.co/QuantFactory/EZO-Common-9B-gemma-2-it-GGUF + description: | + This model is based on Gemma-2-9B-it, enhanced with multiple tuning techniques to improve its general performance. While it excels in Japanese language tasks, it's designed to meet diverse needs globally. + + Gemma-2-9B-itをベースとして、複数のチューニング手法を採用のうえ、汎用的に性能を向上させたモデルです。日本語タスクに優れつつ、世界中の多様なニーズに応える設計となっています。 + overrides: + parameters: + model: EZO-Common-9B-gemma-2-it.Q4_K_M.gguf + files: + - filename: EZO-Common-9B-gemma-2-it.Q4_K_M.gguf + sha256: 57678b1828673dccb15f76e52b00672c74aa6169421bbb8620b8955955322cfd + uri: huggingface://QuantFactory/EZO-Common-9B-gemma-2-it-GGUF/EZO-Common-9B-gemma-2-it.Q4_K_M.gguf - &llama3 url: "github:mudler/LocalAI/gallery/llama3-instruct.yaml@master" icon: https://cdn-uploads.huggingface.co/production/uploads/642cc1c253e76b4c2286c58e/aJJxKus1wP5N-euvHEUq7.png @@ -1733,9 +1829,9 @@ - !!merge <<: *llama3 name: "hathor_tahsin-l3-8b-v0.85" description: | - Hathor_Tahsin [v-0.85] is designed to seamlessly integrate the qualities of creativity, intelligence, and robust performance. - Note: Hathor_Tahsin [v0.85] is trained on 3 epochs of Private RP, STEM (Intruction/Dialogs), Opus instructons, mixture light/classical novel data, roleplaying chat pairs over llama 3 8B instruct. - Additional Note's: (Based on Hathor_Fractionate-v0.5 instead of Hathor_Aleph-v0.72, should be less repetitive than either 0.72 or 0.8) + Hathor_Tahsin [v-0.85] is designed to seamlessly integrate the qualities of creativity, intelligence, and robust performance. + Note: Hathor_Tahsin [v0.85] is trained on 3 epochs of Private RP, STEM (Intruction/Dialogs), Opus instructons, mixture light/classical novel data, roleplaying chat pairs over llama 3 8B instruct. + Additional Note's: (Based on Hathor_Fractionate-v0.5 instead of Hathor_Aleph-v0.72, should be less repetitive than either 0.72 or 0.8) icon: https://cdn-uploads.huggingface.co/production/uploads/642265bc01c62c1e4102dc36/MY9tjLnEG5hOQOyKk06PK.jpeg urls: - https://huggingface.co/Nitral-AI/Hathor_Tahsin-L3-8B-v0.85 @@ -1747,6 +1843,50 @@ - filename: Hathor_Tahsin-L3-8B-v0.85-Q4_K_M.gguf sha256: c82f39489e767a842925fc58cafb5dec0cc71313d904a53fdb46186be899ecb0 uri: huggingface://bartowski/Hathor_Tahsin-L3-8B-v0.85-GGUF/Hathor_Tahsin-L3-8B-v0.85-Q4_K_M.gguf +- !!merge <<: *llama3 + name: "replete-coder-instruct-8b-merged" + icon: https://cdn-uploads.huggingface.co/production/uploads/642cc1c253e76b4c2286c58e/-0dERC793D9XeFsJ9uHbx.png + description: | + This is a Ties merge between the following models: + + https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct + + https://huggingface.co/Replete-AI/Llama3-8B-Instruct-Replete-Adapted + + The Coding, and Overall performance of this models seems to be better than both base models used in the merge. Benchmarks are coming in the future. + urls: + - https://huggingface.co/Replete-AI/Replete-Coder-Instruct-8b-Merged + - https://huggingface.co/bartowski/Replete-Coder-Instruct-8b-Merged-GGUF + overrides: + parameters: + model: Replete-Coder-Instruct-8b-Merged-Q4_K_M.gguf + files: + - filename: Replete-Coder-Instruct-8b-Merged-Q4_K_M.gguf + sha256: 5374a38023b3d8617d266f94e4eff4c5d996b3197e6c42ae27315110bcc75d33 + uri: huggingface://bartowski/Replete-Coder-Instruct-8b-Merged-GGUF/Replete-Coder-Instruct-8b-Merged-Q4_K_M.gguf +- !!merge <<: *llama3 + name: "arliai-llama-3-8b-formax-v1.0" + description: | + Formax is a model that specializes in following response format instructions. Tell it the format of it's response and it will follow it perfectly. Great for data processing and dataset creation tasks. + + Base model: https://huggingface.co/failspy/Meta-Llama-3-8B-Instruct-abliterated-v3 + + Training: + 4096 sequence length + Training duration is around 2 days on 2x3090Ti + 1 epoch training with a massive dataset for minimized repetition sickness. + LORA with 64-rank 128-alpha resulting in ~2% trainable weights. + urls: + - https://huggingface.co/OwenArli/ArliAI-Llama-3-8B-Formax-v1.0 + - https://huggingface.co/bartowski/ArliAI-Llama-3-8B-Formax-v1.0-GGUF + overrides: + context_size: 4096 + parameters: + model: ArliAI-Llama-3-8B-Formax-v1.0-Q4_K_M.gguf + files: + - filename: ArliAI-Llama-3-8B-Formax-v1.0-Q4_K_M.gguf + sha256: e6a47a11eb67c1d4cd92e3512d3288a5d937c41a3319e95c3b8b2332428af239 + uri: huggingface://bartowski/ArliAI-Llama-3-8B-Formax-v1.0-GGUF/ArliAI-Llama-3-8B-Formax-v1.0-Q4_K_M.gguf - name: "llama-3-sec-chat" url: "github:mudler/LocalAI/gallery/chatml.yaml@master" urls: @@ -2402,14 +2542,14 @@ - https://huggingface.co/SicariusSicariiStuff/LLAMA-3_8B_Unaligned_Alpha - https://huggingface.co/bartowski/LLAMA-3_8B_Unaligned_Alpha-GGUF description: | - Model card description: - As of June 11, 2024, I've finally started training the model! The training is progressing smoothly, although it will take some time. I used a combination of model merges and an abliterated model as base, followed by a comprehensive deep unalignment protocol to unalign the model to its core. A common issue with uncensoring and unaligning models is that it often significantly impacts their base intelligence. To mitigate these drawbacks, I've included a substantial corpus of common sense, theory of mind, and various other elements to counteract the effects of the deep uncensoring process. Given the extensive corpus involved, the training will require at least a week of continuous training. Expected early results: in about 3-4 days. - Additional info: - As of June 13, 2024, I've observed that even after two days of continuous training, the model is still resistant to learning certain aspects. - For example, some of the validation data still shows a loss over , whereas other parts have a loss of < or lower. This is after the model was initially abliterated. - June 18, 2024 Update, After extensive testing of the intermediate checkpoints, significant progress has been made. - The model is slowly — I mean, really slowly — unlearning its alignment. By significantly lowering the learning rate, I was able to visibly observe deep behavioral changes, this process is taking longer than anticipated, but it's going to be worth it. Estimated time to completion: 4 more days.. I'm pleased to report that in several tests, the model not only maintained its intelligence but actually showed a slight improvement, especially in terms of common sense. An intermediate checkpoint of this model was used to create invisietch/EtherealRainbow-v0.3-rc7, with promising results. Currently, it seems like I'm on the right track. I hope this model will serve as a solid foundation for further merges, whether for role-playing (RP) or for uncensoring. This approach also allows us to save on actual fine-tuning, thereby reducing our carbon footprint. The merge process takes just a few minutes of CPU time, instead of days of GPU work. - June 20, 2024 Update, Unaligning was partially successful, and the results are decent, but I am not fully satisfied. I decided to bite the bullet, and do a full finetune, god have mercy on my GPUs. I am also releasing the intermediate checkpoint of this model. + Model card description: + As of June 11, 2024, I've finally started training the model! The training is progressing smoothly, although it will take some time. I used a combination of model merges and an abliterated model as base, followed by a comprehensive deep unalignment protocol to unalign the model to its core. A common issue with uncensoring and unaligning models is that it often significantly impacts their base intelligence. To mitigate these drawbacks, I've included a substantial corpus of common sense, theory of mind, and various other elements to counteract the effects of the deep uncensoring process. Given the extensive corpus involved, the training will require at least a week of continuous training. Expected early results: in about 3-4 days. + Additional info: + As of June 13, 2024, I've observed that even after two days of continuous training, the model is still resistant to learning certain aspects. + For example, some of the validation data still shows a loss over , whereas other parts have a loss of < or lower. This is after the model was initially abliterated. + June 18, 2024 Update, After extensive testing of the intermediate checkpoints, significant progress has been made. + The model is slowly — I mean, really slowly — unlearning its alignment. By significantly lowering the learning rate, I was able to visibly observe deep behavioral changes, this process is taking longer than anticipated, but it's going to be worth it. Estimated time to completion: 4 more days.. I'm pleased to report that in several tests, the model not only maintained its intelligence but actually showed a slight improvement, especially in terms of common sense. An intermediate checkpoint of this model was used to create invisietch/EtherealRainbow-v0.3-rc7, with promising results. Currently, it seems like I'm on the right track. I hope this model will serve as a solid foundation for further merges, whether for role-playing (RP) or for uncensoring. This approach also allows us to save on actual fine-tuning, thereby reducing our carbon footprint. The merge process takes just a few minutes of CPU time, instead of days of GPU work. + June 20, 2024 Update, Unaligning was partially successful, and the results are decent, but I am not fully satisfied. I decided to bite the bullet, and do a full finetune, god have mercy on my GPUs. I am also releasing the intermediate checkpoint of this model. icon: https://i.imgur.com/Kpk1PgZ.png overrides: parameters: @@ -2424,9 +2564,9 @@ - https://huggingface.co/Sao10K/L3-8B-Lunaris-v1 - https://huggingface.co/bartowski/L3-8B-Lunaris-v1-GGUF description: | - A generalist / roleplaying model merge based on Llama 3. Models are selected from my personal experience while using them. + A generalist / roleplaying model merge based on Llama 3. Models are selected from my personal experience while using them. - I personally think this is an improvement over Stheno v3.2, considering the other models helped balance out its creativity and at the same time improving its logic. + I personally think this is an improvement over Stheno v3.2, considering the other models helped balance out its creativity and at the same time improving its logic. overrides: parameters: model: L3-8B-Lunaris-v1-Q4_K_M.gguf @@ -2566,6 +2706,186 @@ - filename: Nymph_8B.i1-Q4_K_M.gguf sha256: 5b35794539d9cd262720f47a54f59dbffd5bf6c601950359b5c68d13f1ce13a0 uri: huggingface://mradermacher/Nymph_8B-i1-GGUF/Nymph_8B.i1-Q4_K_M.gguf +- !!merge <<: *llama3 + name: "l3-ms-astoria-8b" + urls: + - https://huggingface.co/ibrahimkettaneh/L3-MS-Astoria-8b + - https://huggingface.co/mradermacher/L3-MS-Astoria-8b-GGUF + description: | + This is a merge of pre-trained language models created using mergekit. + Merge Method + + This model was merged using the Model Stock merge method using failspy/Meta-Llama-3-8B-Instruct-abliterated-v3 as a base. + Models Merged + + The following models were included in the merge: + + ProbeMedicalYonseiMAILab/medllama3-v20 + migtissera/Tess-2.0-Llama-3-8B + Cas-Warehouse/Llama-3-Psychology-LoRA-Stock-8B + TheSkullery/llama-3-cat-8b-instruct-v1 + overrides: + parameters: + model: L3-MS-Astoria-8b.Q4_K_M.gguf + files: + - filename: L3-MS-Astoria-8b.Q4_K_M.gguf + sha256: cc5db0ef056aa57cb848988f6a7c739701ecde6303a9d8262f5dac76287ba15a + uri: huggingface://mradermacher/L3-MS-Astoria-8b-GGUF/L3-MS-Astoria-8b.Q4_K_M.gguf +- !!merge <<: *llama3 + name: "halomaidrp-v1.33-15b-l3-i1" + urls: + - https://huggingface.co/mradermacher/HaloMaidRP-v1.33-15B-L3-i1-GGUF + - https://huggingface.co/v000000/HaloMaidRP-v1.33-15B-L3 + icon: https://cdn-uploads.huggingface.co/production/uploads/64f74b6e6389380c77562762/MCdGdalCCtOVPn8X7rqha.jpeg + description: | + This is the third iteration "Emerald" of the final four and the one I liked the most. It has had limited testing though, but seems relatively decent. Better than 8B at least. + This is a merge of pre-trained language models created using mergekit. + The following models were included in the merge: + + grimjim/Llama-3-Instruct-abliteration-LoRA-8B + UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter3 + NeverSleep/Llama-3-Lumimaid-8B-v0.1-OAS + maldv/llama-3-fantasy-writer-8b + tokyotech-llm/Llama-3-Swallow-8B-v0.1 + Sao10K/L3-8B-Stheno-v3.2 + ZeusLabs/L3-Aethora-15B-V2 + Nitral-AI/Hathor_Respawn-L3-8B-v0.8 + Blackroot/Llama-3-8B-Abomination-LORA + overrides: + parameters: + model: HaloMaidRP-v1.33-15B-L3.i1-Q4_K_M.gguf + files: + - filename: HaloMaidRP-v1.33-15B-L3.i1-Q4_K_M.gguf + sha256: 94d0bf2de4df7e5a11b9ca4db3518d7d22c6fa062d1ee16e4db52b2bb26bc8b3 + uri: huggingface://mradermacher/HaloMaidRP-v1.33-15B-L3-i1-GGUF/HaloMaidRP-v1.33-15B-L3.i1-Q4_K_M.gguf +- !!merge <<: *llama3 + name: "llama-3-patronus-lynx-70b-instruct" + urls: + - https://huggingface.co/PatronusAI/Llama-3-Patronus-Lynx-70B-Instruct + - https://huggingface.co/mradermacher/Llama-3-Patronus-Lynx-70B-Instruct-GGUF + description: | + Lynx is an open-source hallucination evaluation model. Patronus-Lynx-70B-Instruct was trained on a mix of datasets including CovidQA, PubmedQA, DROP, RAGTruth. The datasets contain a mix of hand-annotated and synthetic data. The maximum sequence length is 8000 tokens. + Model + overrides: + parameters: + model: Llama-3-Patronus-Lynx-70B-Instruct.Q4_K_M.gguf + files: + - filename: Llama-3-Patronus-Lynx-70B-Instruct.Q4_K_M.gguf + sha256: 95a02b71baff287bd84188fc1babcf9dfae25c315e2613391e694cf944f1e5b3 + uri: huggingface://mradermacher/Llama-3-Patronus-Lynx-70B-Instruct-GGUF/Llama-3-Patronus-Lynx-70B-Instruct.Q4_K_M.gguf +- !!merge <<: *llama3 + name: "llamax3-8b-alpaca" + urls: + - https://huggingface.co/LLaMAX/LLaMAX3-8B-Alpaca + - https://huggingface.co/mradermacher/LLaMAX3-8B-Alpaca-GGUF + description: | + LLaMAX is a language model with powerful multilingual capabilities without loss instruction-following capabilities. + + We collected extensive training sets in 102 languages for continued pre-training of Llama2 and leveraged the English instruction fine-tuning dataset, Alpaca, to fine-tune its instruction-following capabilities. + + LLaMAX supports translation between more than 100 languages, surpassing the performance of similarly scaled LLMs. + + Supported Languages + Akrikaans (af), Amharic (am), Arabic (ar), Armenian (hy), Assamese (as), Asturian (ast), Azerbaijani (az), Belarusian (be), Bengali (bn), Bosnian (bs), Bulgarian (bg), Burmese (my), Catalan (ca), Cebuano (ceb), Chinese Simpl (zho), Chinese Trad (zho), Croatian (hr), Czech (cs), Danish (da), Dutch (nl), English (en), Estonian (et), Filipino (tl), Finnish (fi), French (fr), Fulah (ff), Galician (gl), Ganda (lg), Georgian (ka), German (de), Greek (el), Gujarati (gu), Hausa (ha), Hebrew (he), Hindi (hi), Hungarian (hu), Icelandic (is), Igbo (ig), Indonesian (id), Irish (ga), Italian (it), Japanese (ja), Javanese (jv), Kabuverdianu (kea), Kamba (kam), Kannada (kn), Kazakh (kk), Khmer (km), Korean (ko), Kyrgyz (ky), Lao (lo), Latvian (lv), Lingala (ln), Lithuanian (lt), Luo (luo), Luxembourgish (lb), Macedonian (mk), Malay (ms), Malayalam (ml), Maltese (mt), Maori (mi), Marathi (mr), Mongolian (mn), Nepali (ne), Northern Sotho (ns), Norwegian (no), Nyanja (ny), Occitan (oc), Oriya (or), Oromo (om), Pashto (ps), Persian (fa), Polish (pl), Portuguese (pt), Punjabi (pa), Romanian (ro), Russian (ru), Serbian (sr), Shona (sn), Sindhi (sd), Slovak (sk), Slovenian (sl), Somali (so), Sorani Kurdish (ku), Spanish (es), Swahili (sw), Swedish (sv), Tajik (tg), Tamil (ta), Telugu (te), Thai (th), Turkish (tr), Ukrainian (uk), Umbundu (umb), Urdu (ur), Uzbek (uz), Vietnamese (vi), Welsh (cy), Wolof (wo), Xhosa (xh), Yoruba (yo), Zulu (zu) + overrides: + parameters: + model: LLaMAX3-8B-Alpaca.Q4_K_M.gguf + files: + - filename: LLaMAX3-8B-Alpaca.Q4_K_M.gguf + sha256: 4652209c55d4260634b2195989279f945a072d8574872789a40d1f9b86eb255b + uri: huggingface://mradermacher/LLaMAX3-8B-Alpaca-GGUF/LLaMAX3-8B-Alpaca.Q4_K_M.gguf +- !!merge <<: *llama3 + name: "llamax3-8b" + urls: + - https://huggingface.co/LLaMAX/LLaMAX3-8B + - https://huggingface.co/mradermacher/LLaMAX3-8B-GGUF + description: | + LLaMAX is a language model with powerful multilingual capabilities without loss instruction-following capabilities. + + We collected extensive training sets in 102 languages for continued pre-training of Llama2 and leveraged the English instruction fine-tuning dataset, Alpaca, to fine-tune its instruction-following capabilities. + + LLaMAX supports translation between more than 100 languages, surpassing the performance of similarly scaled LLMs. + + Supported Languages + Akrikaans (af), Amharic (am), Arabic (ar), Armenian (hy), Assamese (as), Asturian (ast), Azerbaijani (az), Belarusian (be), Bengali (bn), Bosnian (bs), Bulgarian (bg), Burmese (my), Catalan (ca), Cebuano (ceb), Chinese Simpl (zho), Chinese Trad (zho), Croatian (hr), Czech (cs), Danish (da), Dutch (nl), English (en), Estonian (et), Filipino (tl), Finnish (fi), French (fr), Fulah (ff), Galician (gl), Ganda (lg), Georgian (ka), German (de), Greek (el), Gujarati (gu), Hausa (ha), Hebrew (he), Hindi (hi), Hungarian (hu), Icelandic (is), Igbo (ig), Indonesian (id), Irish (ga), Italian (it), Japanese (ja), Javanese (jv), Kabuverdianu (kea), Kamba (kam), Kannada (kn), Kazakh (kk), Khmer (km), Korean (ko), Kyrgyz (ky), Lao (lo), Latvian (lv), Lingala (ln), Lithuanian (lt), Luo (luo), Luxembourgish (lb), Macedonian (mk), Malay (ms), Malayalam (ml), Maltese (mt), Maori (mi), Marathi (mr), Mongolian (mn), Nepali (ne), Northern Sotho (ns), Norwegian (no), Nyanja (ny), Occitan (oc), Oriya (or), Oromo (om), Pashto (ps), Persian (fa), Polish (pl), Portuguese (pt), Punjabi (pa), Romanian (ro), Russian (ru), Serbian (sr), Shona (sn), Sindhi (sd), Slovak (sk), Slovenian (sl), Somali (so), Sorani Kurdish (ku), Spanish (es), Swahili (sw), Swedish (sv), Tajik (tg), Tamil (ta), Telugu (te), Thai (th), Turkish (tr), Ukrainian (uk), Umbundu (umb), Urdu (ur), Uzbek (uz), Vietnamese (vi), Welsh (cy), Wolof (wo), Xhosa (xh), Yoruba (yo), Zulu (zu) + overrides: + parameters: + model: LLaMAX3-8B.Q4_K_M.gguf + files: + - filename: LLaMAX3-8B.Q4_K_M.gguf + sha256: 862fb2be5d74b171f4294f862f43e7cb6e6dbecce29a9f9167da4f1db230daac + uri: huggingface://mradermacher/LLaMAX3-8B-GGUF/LLaMAX3-8B.Q4_K_M.gguf +- !!merge <<: *llama3 + name: "arliai-llama-3-8b-dolfin-v0.5" + urls: + - https://huggingface.co/OwenArli/ArliAI-Llama-3-8B-Dolfin-v0.5 + - https://huggingface.co/QuantFactory/ArliAI-Llama-3-8B-Dolfin-v0.5-GGUF + description: | + Based on Meta-Llama-3-8b-Instruct, and is governed by Meta Llama 3 License agreement: https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct + + This is a fine tune using an improved Dolphin and WizardLM dataset intended to make the model follow instructions better and refuse less. + + OpenLLM Benchmark: + + Training: + + 2048 sequence length since the dataset has an average length of under 1000 tokens, while the base model is 8192 sequence length. From testing it still performs the same 8192 context just fine. + Training duration is around 2 days on 2xRTX 3090, using 4-bit loading and Qlora 64-rank 128-alpha resulting in ~2% trainable weights. + overrides: + parameters: + model: ArliAI-Llama-3-8B-Dolfin-v0.5.Q4_K_M.gguf + files: + - filename: ArliAI-Llama-3-8B-Dolfin-v0.5.Q4_K_M.gguf + sha256: 71fef02915c606b438ccff2cae6b7760bbb54a558d5f2d39c2421d97b6682fea + uri: huggingface://QuantFactory/ArliAI-Llama-3-8B-Dolfin-v0.5-GGUF/ArliAI-Llama-3-8B-Dolfin-v0.5.Q4_K_M.gguf + +- !!merge <<: *llama3 + name: "llama-3-ezo-8b-common-it" + icon: https://huggingface.co/HODACHI/Llama-3-EZO-8b-Common-it + urls: + - https://huggingface.co/HODACHI/Llama-3-EZO-8b-Common-it + - https://huggingface.co/MCZK/Llama-3-EZO-8b-Common-it-GGUF + description: | + Based on meta-llama/Meta-Llama-3-8B-Instruct, it has been enhanced for Japanese usage through additional pre-training and instruction tuning. (Built with Meta Llama3) + + This model is based on Llama-3-8B-Instruct and is subject to the Llama-3 Terms of Use. For detailed information, please refer to the official Llama-3 license page. + + このモデルはLlama-3-8B-Instructをベースにしており、Llama-3の利用規約に従います。詳細については、Llama-3の公式ライセンスページをご参照ください。 + overrides: + parameters: + model: Llama-3-EZO-8b-Common-it.Q4_K_M.iMatrix.gguf + files: + - filename: Llama-3-EZO-8b-Common-it.Q4_K_M.iMatrix.gguf + sha256: 0a46165b1c35bfb97d7d5b18969a7bfc2bbf37a90bc5e85f8cab11483f5a8adc + uri: huggingface://MCZK/Llama-3-EZO-8b-Common-it-GGUF/Llama-3-EZO-8b-Common-it.Q4_K_M.iMatrix.gguf +- !!merge <<: *llama3 + name: "l3-8b-niitama-v1" + urls: + - https://huggingface.co/Sao10K/L3-8B-Niitama-v1 + - https://huggingface.co/mradermacher/L3-8B-Niitama-v1-GGUF + description: | + Niitama on Horde + overrides: + parameters: + model: L3-8B-Niitama-v1.Q4_K_M.gguf + files: + - filename: L3-8B-Niitama-v1.Q4_K_M.gguf + sha256: a0e6d8972e1c73af7952ee1b8a3898f52c6036701571fea37ff621b71e89eb53 + uri: huggingface://mradermacher/L3-8B-Niitama-v1-GGUF/L3-8B-Niitama-v1.Q4_K_M.gguf +- !!merge <<: *llama3 + name: "l3-8b-niitama-v1-i1" + urls: + - https://huggingface.co/Sao10K/L3-8B-Niitama-v1 + - https://huggingface.co/mradermacher/L3-8B-Niitama-v1-i1-GGUF + description: | + Niitama on Horde (iMatrix quants) + overrides: + parameters: + model: L3-8B-Niitama-v1.i1-Q4_K_M.gguf + files: + - filename: L3-8B-Niitama-v1.i1-Q4_K_M.gguf + sha256: 8c62f831db2a6e34aa75459fe8a98815199ecc2dac1892a460b8b86363b6826e + uri: huggingface://mradermacher/L3-8B-Niitama-v1-i1-GGUF/L3-8B-Niitama-v1.i1-Q4_K_M.gguf - &chatml ### ChatML url: "github:mudler/LocalAI/gallery/chatml.yaml@master" @@ -2636,6 +2956,51 @@ - filename: Llama-3-Hercules-5.0-8B-Q4_K_M.gguf sha256: 83647caf4a23a91697585cff391e7d1236fac867392f9e49a6dab59f81b5f810 uri: huggingface://bartowski/Llama-3-Hercules-5.0-8B-GGUF/Llama-3-Hercules-5.0-8B-Q4_K_M.gguf +- !!merge <<: *llama3 + name: "l3-15b-mythicalmaid-t0.0001" + icon: https://cdn-uploads.huggingface.co/production/uploads/64f74b6e6389380c77562762/Nx5jjEYNH26OS2_87mPTM.png + urls: + - https://huggingface.co/v000000/L3-15B-MythicalMaid-t0.0001 + - https://huggingface.co/mradermacher/L3-15B-MythicalMaid-t0.0001-GGUF + description: | + Llama-3-15B-MythicalMaid-t0.0001 + A merge of the following models using a custom NearSwap(t0.0001) algorithm (inverted): + + ZeusLabs/L3-Aethora-15B-V2 + v000000/HaloMaidRP-v1.33-15B-L3 + + With ZeusLabs/L3-Aethora-15B-V2 as the base model. + + This merge was inverted compared to "L3-15B-EtherealMaid-t0.0001". + overrides: + parameters: + model: L3-15B-MythicalMaid-t0.0001.Q4_K_M.gguf + files: + - filename: L3-15B-MythicalMaid-t0.0001.Q4_K_M.gguf + sha256: ecbd57783006f1a027f8a7f5a5d551dc8b3568912825f566d79fd34a804e8970 + uri: huggingface://mradermacher/L3-15B-MythicalMaid-t0.0001-GGUF/L3-15B-MythicalMaid-t0.0001.Q4_K_M.gguf + +- !!merge <<: *llama3 + name: "l3-15b-etherealmaid-t0.0001-i1" + icon: https://cdn-uploads.huggingface.co/production/uploads/64f74b6e6389380c77562762/FwYXt2h_FdmlL0Z6qYufz.png + urls: + - https://huggingface.co/v000000/L3-15B-EtherealMaid-t0.0001 + - https://huggingface.co/mradermacher/L3-15B-EtherealMaid-t0.0001-i1-GGUF + description: | + Llama-3-15B-EtherealMaid-t0.0001 + A merge of the following models using a custom NearSwap(t0.0001) algorithm: + + v000000/HaloMaidRP-v1.33-15B-L3 + ZeusLabs/L3-Aethora-15B-V2 + + With v000000/HaloMaidRP-v1.33-15B-L3 as the base model. + overrides: + parameters: + model: L3-15B-EtherealMaid-t0.0001.i1-Q4_K_M.gguf + files: + - filename: L3-15B-EtherealMaid-t0.0001.i1-Q4_K_M.gguf + sha256: 2911be6be8e0fd4184998d452410ba847491b4ab71a928749de87cafb0e13757 + uri: huggingface://mradermacher/L3-15B-EtherealMaid-t0.0001-i1-GGUF/L3-15B-EtherealMaid-t0.0001.i1-Q4_K_M.gguf - &command-R ### START Command-r url: "github:mudler/LocalAI/gallery/command-r.yaml@master" @@ -2864,6 +3229,22 @@ - filename: phi3-4x4b-v1-Q4_K_M.gguf uri: huggingface://bartowski/phi3-4x4b-v1-GGUF/phi3-4x4b-v1-Q4_K_M.gguf sha256: fd33220186b7076f4b306f27b3a8913384435a2ca90185a71c9df5a752d3a298 +- !!merge <<: *phi-3 + name: "phi-3.1-mini-4k-instruct" + urls: + - https://huggingface.co/microsoft/Phi-3-mini-4k-instruct + - https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF + description: | + This is an update over the original instruction-tuned Phi-3-mini release based on valuable customer feedback. The model used additional post-training data leading to substantial gains on instruction following and structure output. + + It is based on the original model from Microsoft, but has been updated and quantized using the llama.cpp release b3278. + overrides: + parameters: + model: Phi-3.1-mini-4k-instruct-Q4_K_M.gguf + files: + - filename: Phi-3.1-mini-4k-instruct-Q4_K_M.gguf + sha256: 39458b227a4be763b7eb39d306d240c3d45205e3f8b474ec7bdca7bba0158e69 + uri: huggingface://bartowski/Phi-3.1-mini-4k-instruct-GGUF/Phi-3.1-mini-4k-instruct-Q4_K_M.gguf - &hermes-2-pro-mistral ### START Hermes url: "github:mudler/LocalAI/gallery/hermes-2-pro-mistral.yaml@master" diff --git a/gallery/mathstral.yaml b/gallery/mathstral.yaml new file mode 100644 index 00000000..a1c686b4 --- /dev/null +++ b/gallery/mathstral.yaml @@ -0,0 +1,67 @@ +--- +name: "mathstral" + +config_file: | + context_size: 8192 + mmap: true + stopwords: + - "<|im_end|>" + - "" + - "" + - "<|eot_id|>" + - "<|end_of_text|>" + - "" + - "[/TOOL_CALLS]" + - "[/ACTIONS]" + - "[/INST]" + - "[INST]" + + function: + # disable injecting the "answer" tool + disable_no_action: true + + grammar: + # This allows the grammar to also return messages + #mixed_mode: true + # Not all models have a sketchpad or something to write thoughts on. + # This one will OR reply to strings OR JSON, but not both in the same reply + #no_mixed_free_string: true + # Disable grammar + # Base instructor model doesn't work well with grammars + disable: true + parallel_calls: true + disable_parallel_new_lines: true + + return_name_in_function_response: true + # Without grammar uncomment the lines below + # Warning: this is relying only on the capability of the + # LLM model to generate the correct function call. + json_regex_match: + - "(?s)\\[TOOL\\_CALLS\\](.*)" + replace_function_results: + # Replace everything that is not JSON array or object + - key: '(?s)^[^{\[]*' + value: "" + - key: '(?s)[^}\]]*$' + value: "" + - key: "(?s)\\[TOOL\\_CALLS\\]" + value: "" + - key: "(?s)\\[\\/TOOL\\_CALLS\\]" + value: "" + + template: + join_chat_messages_by_character: "" ## No newlines between messages + chat: | + {{.Input -}} + chat_message: |- + {{- if .FunctionCall -}} + [TOOL_CALLS] {{toJson .FunctionCall}} [/TOOL_CALLS] + {{- else if eq .RoleName "tool" -}} + [TOOL_RESULTS] {{.Content}} [/TOOL_RESULTS] + {{- else -}} + [INST] {{.Content }} [/INST] + {{ end -}} + completion: | + {{.Input}} + function: |- + [AVAILABLE_TOOLS] [{{range .Functions}}{"type": "function", "function": {"name": "{{.Name}}", "description": "{{.Description}}", "parameters": {{toJson .Parameters}} }}{{end}} ] [/AVAILABLE_TOOLS]{{.Input }} diff --git a/go.mod b/go.mod index 8fad65d4..fad40e01 100644 --- a/go.mod +++ b/go.mod @@ -1,87 +1,110 @@ module github.com/mudler/LocalAI -go 1.22 +go 1.22.0 toolchain go1.22.4 require ( - github.com/M0Rf30/go-tiny-dream v0.0.0-20231128165230-772a9c0d9aaf + dario.cat/mergo v1.0.0 + github.com/M0Rf30/go-tiny-dream v0.0.0-20240425104733-c04fa463ace9 github.com/Masterminds/sprig/v3 v3.2.3 github.com/alecthomas/kong v0.9.0 github.com/charmbracelet/glamour v0.7.0 - github.com/chasefleming/elem-go v0.25.0 - github.com/containerd/containerd v1.7.18 + github.com/chasefleming/elem-go v0.26.0 + github.com/containerd/containerd v1.7.19 github.com/donomii/go-rwkv.cpp v0.0.0-20240228065144-661e7ae26d44 github.com/elliotchance/orderedmap/v2 v2.2.0 github.com/fsnotify/fsnotify v1.7.0 - github.com/ggerganov/whisper.cpp/bindings/go v0.0.0-20230628193450-85ed71aaec8e + github.com/ggerganov/whisper.cpp/bindings/go v0.0.0-20240626202019-c118733a29ad github.com/go-audio/wav v1.1.0 - github.com/go-skynet/LocalAI v1.40.0 - github.com/go-skynet/go-bert.cpp v0.0.0-20230716133540-6abe312cded1 - github.com/go-skynet/go-llama.cpp v0.0.0-20231009155254-aeba71ee8428 - github.com/gofiber/fiber/v2 v2.52.4 + github.com/go-skynet/go-bert.cpp v0.0.0-20231028093757-710044b12454 + github.com/go-skynet/go-llama.cpp v0.0.0-20240314183750-6a8041ef6b46 + github.com/gofiber/fiber/v2 v2.52.5 github.com/gofiber/swagger v1.0.0 - github.com/gofiber/template/html/v2 v2.1.1 - github.com/google/go-containerregistry v0.19.1 + github.com/gofiber/template/html/v2 v2.1.2 + github.com/google/go-containerregistry v0.19.2 github.com/google/uuid v1.6.0 github.com/hpcloud/tail v1.0.0 - github.com/imdario/mergo v0.3.16 github.com/ipfs/go-log v1.0.5 github.com/jaypipes/ghw v0.12.0 github.com/joho/godotenv v1.5.1 - github.com/klauspost/cpuid/v2 v2.2.7 - github.com/libp2p/go-libp2p v0.31.0 + github.com/klauspost/cpuid/v2 v2.2.8 + github.com/libp2p/go-libp2p v0.35.2 github.com/mholt/archiver/v3 v3.5.1 github.com/microcosm-cc/bluemonday v1.0.26 - github.com/mudler/edgevpn v0.25.3 + github.com/mudler/edgevpn v0.26.2 github.com/mudler/go-processmanager v0.0.0-20230818213616-f204007f963c - github.com/mudler/go-stable-diffusion v0.0.0-20230605122230-d89260f598af - github.com/nomic-ai/gpt4all/gpt4all-bindings/golang v0.0.0-20231022042237-c25dc5193530 - github.com/onsi/ginkgo/v2 v2.17.1 - github.com/onsi/gomega v1.33.0 + github.com/mudler/go-stable-diffusion v0.0.0-20240429204715-4a3cd6aeae6f + github.com/nomic-ai/gpt4all/gpt4all-bindings/golang v0.0.0-20240606155928-41c9013fa46a + github.com/onsi/ginkgo/v2 v2.19.0 + github.com/onsi/gomega v1.33.1 github.com/ory/dockertest/v3 v3.10.0 - github.com/otiai10/openaigo v1.6.0 + github.com/otiai10/openaigo v1.7.0 github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 - github.com/prometheus/client_golang v1.17.0 - github.com/rs/zerolog v1.32.0 + github.com/prometheus/client_golang v1.19.1 + github.com/rs/zerolog v1.33.0 github.com/russross/blackfriday v1.6.0 - github.com/sashabaranov/go-openai v1.20.4 - github.com/schollz/progressbar/v3 v3.13.1 - github.com/shirou/gopsutil/v3 v3.23.9 + github.com/sashabaranov/go-openai v1.26.2 + github.com/schollz/progressbar/v3 v3.14.4 + github.com/shirou/gopsutil/v3 v3.24.5 github.com/stretchr/testify v1.9.0 github.com/swaggo/swag v1.16.3 - github.com/thxcode/gguf-parser-go v0.0.6 - github.com/tmc/langchaingo v0.0.0-20231019140956-c636b3da7701 - github.com/valyala/fasthttp v1.51.0 - go.opentelemetry.io/otel v1.24.0 - go.opentelemetry.io/otel/exporters/prometheus v0.42.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/sdk/metric v1.19.0 - google.golang.org/grpc v1.64.0 - google.golang.org/protobuf v1.34.1 + github.com/thxcode/gguf-parser-go v0.1.0 + github.com/tmc/langchaingo v0.1.12 + github.com/valyala/fasthttp v1.55.0 + go.opentelemetry.io/otel v1.28.0 + go.opentelemetry.io/otel/exporters/prometheus v0.50.0 + go.opentelemetry.io/otel/metric v1.28.0 + go.opentelemetry.io/otel/sdk/metric v1.28.0 + google.golang.org/grpc v1.65.0 + google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 oras.land/oras-go/v2 v2.5.0 ) require ( - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/pion/datachannel v1.5.6 // indirect + github.com/pion/dtls/v2 v2.2.11 // indirect + github.com/pion/ice/v2 v2.3.25 // indirect + github.com/pion/interceptor v0.1.29 // indirect + github.com/pion/logging v0.2.2 // indirect + github.com/pion/mdns v0.0.12 // indirect + github.com/pion/randutil v0.1.0 // indirect + github.com/pion/rtcp v1.2.14 // indirect + github.com/pion/rtp v1.8.6 // indirect + github.com/pion/sctp v1.8.16 // indirect + github.com/pion/sdp/v3 v3.0.9 // indirect + github.com/pion/srtp/v2 v2.0.18 // indirect + github.com/pion/stun v0.6.1 // indirect + github.com/pion/transport/v2 v2.2.5 // indirect + github.com/pion/turn/v2 v2.1.6 // indirect + github.com/pion/webrtc/v3 v3.2.40 // indirect + go.uber.org/mock v0.4.0 // indirect +) + +require ( + github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/KyleBanks/depth v1.2.1 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/Microsoft/hcsshim v0.11.5 // indirect + github.com/Microsoft/hcsshim v0.11.7 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/alecthomas/chroma/v2 v2.8.0 // indirect - github.com/andybalholm/brotli v1.0.5 // indirect + github.com/andybalholm/brotli v1.1.0 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/c-robinson/iplib v1.0.8 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/containerd/cgroups v1.1.0 // indirect github.com/containerd/continuity v0.4.2 // indirect github.com/containerd/errdefs v0.1.0 // indirect @@ -91,53 +114,50 @@ require ( github.com/creachadair/otp v0.4.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/dlclark/regexp2 v1.8.1 // indirect - github.com/docker/cli v24.0.0+incompatible // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect + github.com/dlclark/regexp2 v1.10.0 // indirect + github.com/docker/cli v27.0.3+incompatible // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.9+incompatible + github.com/docker/docker v27.0.3+incompatible github.com/docker/docker-credential-helpers v0.7.0 // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect github.com/elastic/gosigar v0.14.2 // indirect - github.com/flynn/noise v1.0.0 // indirect + github.com/flynn/noise v1.1.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-audio/audio v1.0.0 // indirect github.com/go-audio/riff v1.0.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/spec v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect - github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect - github.com/gofiber/contrib/fiberzerolog v1.0.0 + github.com/gofiber/contrib/fiberzerolog v1.0.2 github.com/gofiber/template v1.8.3 // indirect github.com/gofiber/utils v1.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.4 // indirect - github.com/golang/snappy v0.0.2 // indirect + github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gopacket v1.1.19 // indirect - github.com/google/pprof v0.0.0-20230821062121-407c9e7a662f // indirect + github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gorilla/css v1.0.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/henvic/httpretty v0.1.3 // indirect github.com/huandu/xstrings v1.3.3 // indirect - github.com/huin/goupnp v1.2.0 // indirect + github.com/huin/goupnp v1.3.0 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/ipfs/boxo v0.10.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect @@ -148,16 +168,16 @@ require ( github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect github.com/josharian/intern v1.0.0 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/pgzip v1.2.5 // indirect github.com/koron/go-ssdp v0.0.4 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/libp2p/go-cidranger v1.1.0 // indirect github.com/libp2p/go-flow-metrics v0.1.0 // indirect - github.com/libp2p/go-libp2p-asn-util v0.3.0 // indirect + github.com/libp2p/go-libp2p-asn-util v0.4.1 // indirect github.com/libp2p/go-libp2p-kad-dht v0.25.2 // indirect github.com/libp2p/go-libp2p-kbucket v0.6.3 // indirect - github.com/libp2p/go-libp2p-pubsub v0.9.3 // indirect + github.com/libp2p/go-libp2p-pubsub v0.11.0 // indirect github.com/libp2p/go-libp2p-record v0.2.0 // indirect github.com/libp2p/go-libp2p-routing-helpers v0.7.2 // indirect github.com/libp2p/go-msgio v0.3.0 // indirect @@ -173,58 +193,55 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/miekg/dns v1.1.59 // indirect + github.com/miekg/dns v1.1.61 // indirect github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/sys/sequential v0.5.0 // indirect - github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect + github.com/moby/term v0.5.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect - github.com/mudler/go-piper v0.0.0-20230621222733-56b8a81b4760 + github.com/mudler/go-piper v0.0.0-20240315144837-9d0100873a7d github.com/mudler/water v0.0.0-20221010214108-8c7313014ce0 // indirect github.com/muesli/reflow v0.3.0 // indirect github.com/muesli/termenv v0.15.2 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.2.0 // indirect - github.com/multiformats/go-multiaddr v0.12.3 // indirect + github.com/multiformats/go-multiaddr v0.13.0 // indirect github.com/multiformats/go-multiaddr-dns v0.3.1 // indirect github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect github.com/multiformats/go-multibase v0.2.0 // indirect github.com/multiformats/go-multicodec v0.9.0 // indirect github.com/multiformats/go-multihash v0.2.3 // indirect - github.com/multiformats/go-multistream v0.4.1 // indirect + github.com/multiformats/go-multistream v0.5.0 // indirect github.com/multiformats/go-varint v0.0.7 // indirect github.com/nwaples/rardecode v1.1.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 github.com/opencontainers/runc v1.1.12 // indirect - github.com/opencontainers/runtime-spec v1.1.0 // indirect + github.com/opencontainers/runtime-spec v1.2.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/philhofer/fwd v1.1.2 // indirect github.com/pierrec/lz4/v4 v4.1.2 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pkoukk/tiktoken-go v0.1.2 // indirect + github.com/pkoukk/tiktoken-go v0.1.6 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/polydawn/refmt v0.89.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.11.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/quic-go/qpack v0.4.0 // indirect - github.com/quic-go/qtls-go1-20 v0.3.3 // indirect - github.com/quic-go/quic-go v0.38.2 // indirect - github.com/quic-go/webtransport-go v0.5.3 // indirect + github.com/quic-go/quic-go v0.44.0 // indirect + github.com/quic-go/webtransport-go v0.8.0 // indirect github.com/raulk/go-watchdog v1.3.0 // indirect - github.com/rivo/uniseg v0.2.0 // indirect + github.com/rivo/uniseg v0.4.7 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect @@ -249,23 +266,23 @@ require ( github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/yuin/goldmark v1.5.4 // indirect github.com/yuin/goldmark-emoji v1.0.2 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.22.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - go.uber.org/dig v1.17.0 // indirect - go.uber.org/fx v1.20.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.uber.org/dig v1.17.1 // indirect + go.uber.org/fx v1.22.1 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.23.0 // indirect + golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.25.0 // indirect + golang.org/x/mod v0.18.0 // indirect + golang.org/x/net v0.26.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/term v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - golang.org/x/tools v0.21.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/term v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/tools v0.22.0 // indirect golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 // indirect golang.zx2c4.com/wireguard v0.0.0-20220703234212-c31a7b1ab478 // indirect golang.zx2c4.com/wireguard/windows v0.5.3 // indirect diff --git a/go.sum b/go.sum index 42dd0cbf..84dd09e6 100644 --- a/go.sum +++ b/go.sum @@ -2,19 +2,21 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= -github.com/M0Rf30/go-tiny-dream v0.0.0-20231128165230-772a9c0d9aaf h1:UgjXLcE9I+VaVz7uBIlzAnyZIXwiDlIiTWqCh159aUI= -github.com/M0Rf30/go-tiny-dream v0.0.0-20231128165230-772a9c0d9aaf/go.mod h1:UOf2Mb/deUri5agct5OJ4SLWjhI+kZKbsUVUeRb24I0= +github.com/M0Rf30/go-tiny-dream v0.0.0-20240425104733-c04fa463ace9 h1:ASsbvw7wQPldWpwKdmYRszJ2A8Cj3oJDr4zO0DiXvN4= +github.com/M0Rf30/go-tiny-dream v0.0.0-20240425104733-c04fa463ace9/go.mod h1:UOf2Mb/deUri5agct5OJ4SLWjhI+kZKbsUVUeRb24I0= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= @@ -23,8 +25,8 @@ github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/Microsoft/hcsshim v0.11.5 h1:haEcLNpj9Ka1gd3B3tAEs9CpE0c+1IhoL59w/exYU38= -github.com/Microsoft/hcsshim v0.11.5/go.mod h1:MV8xMfmECjl5HdO7U/3/hFVnkmSBjAjmA09d4bExKcU= +github.com/Microsoft/hcsshim v0.11.7 h1:vl/nj3Bar/CvJSYo7gIQPyRWc9f3c6IeSNavBTSZNZQ= +github.com/Microsoft/hcsshim v0.11.7/go.mod h1:MV8xMfmECjl5HdO7U/3/hFVnkmSBjAjmA09d4bExKcU= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= @@ -38,8 +40,8 @@ github.com/alecthomas/kong v0.9.0/go.mod h1:Y47y5gKfHp1hDc7CH7OeXgLIpp+Q2m1Ni0L5 github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= -github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= @@ -59,20 +61,20 @@ github.com/c-robinson/iplib v1.0.8/go.mod h1:i3LuuFL1hRT5gFpBRnEydzw8R6yhGkF4szN github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charmbracelet/glamour v0.7.0 h1:2BtKGZ4iVJCDfMF229EzbeR1QRKLWztO9dMtjmqZSng= github.com/charmbracelet/glamour v0.7.0/go.mod h1:jUMh5MeihljJPQbJ/wf4ldw2+yBP59+ctV36jASy7ps= -github.com/chasefleming/elem-go v0.25.0 h1:LYzr1auk39Bh3bdKloArOFV7sOBnOfSOKxsg58eWL0Q= -github.com/chasefleming/elem-go v0.25.0/go.mod h1:hz73qILBIKnTgOujnSMtEj20/epI+f6vg71RUilJAA4= +github.com/chasefleming/elem-go v0.26.0 h1:RB20oElG4J8W2aQx6jfUuESPQJ52KvC37eLEAPxwJDA= +github.com/chasefleming/elem-go v0.26.0/go.mod h1:hz73qILBIKnTgOujnSMtEj20/epI+f6vg71RUilJAA4= github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= -github.com/containerd/containerd v1.7.18 h1:jqjZTQNfXGoEaZdW1WwPU0RqSn1Bm2Ay/KJPUuO8nao= -github.com/containerd/containerd v1.7.18/go.mod h1:IYEk9/IO6wAPUz2bCMVUbsfXjzw5UNP5fLz4PsUygQ4= +github.com/containerd/containerd v1.7.19 h1:/xQ4XRJ0tamDkdzrrBAUy/LE5nCcxFKdBm4EcPrSMEE= +github.com/containerd/containerd v1.7.19/go.mod h1:h4FtNYUUMB4Phr6v+xG89RYKj9XccvbNSCKjdufCrkc= github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM= github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= @@ -101,20 +103,20 @@ github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/dlclark/regexp2 v1.8.1 h1:6Lcdwya6GjPUNsBct8Lg/yRPwMhABj269AAzdGSiR+0= -github.com/dlclark/regexp2 v1.8.1/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/docker/cli v24.0.0+incompatible h1:0+1VshNwBQzQAx9lOl+OYCTCEAD8fKs/qeXMx3O0wqM= -github.com/docker/cli v24.0.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0= +github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/docker/cli v27.0.3+incompatible h1:usGs0/BoBW8MWxGeEtqPMkzOY56jZ6kYlSN5BLDioCQ= +github.com/docker/cli v27.0.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.9+incompatible h1:HPGzNmwfLZWdxHqK9/II92pyi1EpYKsAqcl4G0Of9v0= -github.com/docker/docker v24.0.9+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.0.3+incompatible h1:aBGI9TeQ4MPlhquTQKq9XbK79rKFVwXNUAYz9aXyEBE= +github.com/docker/docker v27.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= @@ -124,8 +126,6 @@ github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 h1:iFaUwBSo5Svw6L github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/elastic/gosigar v0.12.0/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= github.com/elastic/gosigar v0.14.2 h1:Dg80n8cr90OZ7x+bAax/QjoW/XqTI11RmA79ZwIm9/4= github.com/elastic/gosigar v0.14.2/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= @@ -136,8 +136,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/flynn/noise v1.0.0 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ= -github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= +github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg= +github.com/flynn/noise v1.1.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= @@ -146,8 +146,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/ggerganov/whisper.cpp/bindings/go v0.0.0-20230628193450-85ed71aaec8e h1:KtbU2JR3lJuXFASHG2+sVLucfMPBjWKUUKByX6C81mQ= -github.com/ggerganov/whisper.cpp/bindings/go v0.0.0-20230628193450-85ed71aaec8e/go.mod h1:QIjZ9OktHFG7p+/m3sMvrAJKKdWrr1fZIK0rM6HZlyo= +github.com/ggerganov/whisper.cpp/bindings/go v0.0.0-20240626202019-c118733a29ad h1:dQ93Vd6i25o+zH9vvnZ8mu7jtJQ6jT3D+zE3V8Q49n0= +github.com/ggerganov/whisper.cpp/bindings/go v0.0.0-20240626202019-c118733a29ad/go.mod h1:QIjZ9OktHFG7p+/m3sMvrAJKKdWrr1fZIK0rM6HZlyo= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -159,8 +159,8 @@ github.com/go-audio/wav v1.1.0 h1:jQgLtbqBzY7G+BM8fXF7AHUk1uHUviWS4X39d5rsL2g= github.com/go-audio/wav v1.1.0/go.mod h1:mpe9qfwbScEbkd8uybLuIpTgHyrISw/OTuvjUW2iGtE= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -174,32 +174,32 @@ github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9Z github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/go-skynet/LocalAI v1.40.0 h1:H0b94b+pYyrxiZ4/XyICp0wcs6Q+bTVZMonqomNVhy0= -github.com/go-skynet/LocalAI v1.40.0/go.mod h1:tBcD3FuokrMucRcQceYc+VQrxGnMoQRr+1GfdSKdFDA= -github.com/go-skynet/go-bert.cpp v0.0.0-20230716133540-6abe312cded1 h1:yXvc7QfGtoZ51tUW/YVjoTwAfh8HG88XU7UOrbNlz5Y= -github.com/go-skynet/go-bert.cpp v0.0.0-20230716133540-6abe312cded1/go.mod h1:fYjkCDRzC+oRLHSjQoajmYK6AmeJnmEanV27CClAcDc= -github.com/go-skynet/go-llama.cpp v0.0.0-20231009155254-aeba71ee8428 h1:WYjkXL0Nw7dN2uDBMVCWQ8xLavrIhjF/DLczuh5L9TY= -github.com/go-skynet/go-llama.cpp v0.0.0-20231009155254-aeba71ee8428/go.mod h1:iub0ugfTnflE3rcIuqV2pQSo15nEw3GLW/utm5gyERo= +github.com/go-skynet/go-bert.cpp v0.0.0-20231028093757-710044b12454 h1:zn1G3iuSWHvwP45YKMb3oHQlhpS+qB1kv0o5isSqosM= +github.com/go-skynet/go-bert.cpp v0.0.0-20231028093757-710044b12454/go.mod h1:QGX426328K9dyfFK29lmxlsv1ba0bRRZdzN7PBOpMT8= +github.com/go-skynet/go-llama.cpp v0.0.0-20240314183750-6a8041ef6b46 h1:lALhXzDkqtp12udlDLLg+ybXVMmL7Ox9tybqVLWxjPE= +github.com/go-skynet/go-llama.cpp v0.0.0-20240314183750-6a8041ef6b46/go.mod h1:iub0ugfTnflE3rcIuqV2pQSo15nEw3GLW/utm5gyERo= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc= +github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofiber/contrib/fiberzerolog v1.0.0 h1:IB8q+NO2zPNS4VHKde1x5DqtMJ5vGrvDCydnAjlFw3E= -github.com/gofiber/contrib/fiberzerolog v1.0.0/go.mod h1:SOi+Wo7RQlO/HV0jsYTu6uFQy+8ZPTzCZW4fDEKD3l8= -github.com/gofiber/fiber/v2 v2.52.4 h1:P+T+4iK7VaqUsq2PALYEfBBo6bJZ4q3FP8cZ84EggTM= -github.com/gofiber/fiber/v2 v2.52.4/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ= +github.com/gofiber/contrib/fiberzerolog v1.0.2 h1:LMa/luarQVeINoRwZLHtLQYepLPDIwUNB5OmdZKk+s8= +github.com/gofiber/contrib/fiberzerolog v1.0.2/go.mod h1:aTPsgArSgxRWcUeJ/K6PiICz3mbQENR1QOR426QwOoQ= +github.com/gofiber/fiber/v2 v2.52.5 h1:tWoP1MJQjGEe4GB5TUGOi7P2E0ZMMRx5ZTG4rT+yGMo= +github.com/gofiber/fiber/v2 v2.52.5/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ= github.com/gofiber/swagger v1.0.0 h1:BzUzDS9ZT6fDUa692kxmfOjc1DZiloLiPK/W5z1H1tc= github.com/gofiber/swagger v1.0.0/go.mod h1:QrYNF1Yrc7ggGK6ATsJ6yfH/8Zi5bu9lA7wB8TmCecg= github.com/gofiber/template v1.8.3 h1:hzHdvMwMo/T2kouz2pPCA0zGiLCeMnoGsQZBTSYgZxc= github.com/gofiber/template v1.8.3/go.mod h1:bs/2n0pSNPOkRa5VJ8zTIvedcI/lEYxzV3+YPXdBvq8= -github.com/gofiber/template/html/v2 v2.1.1 h1:QEy3O3EBkvwDthy5bXVGUseOyO6ldJoiDxlF4+MJiV8= -github.com/gofiber/template/html/v2 v2.1.1/go.mod h1:2G0GHHOUx70C1LDncoBpe4T6maQbNa4x1CVNFW0wju0= +github.com/gofiber/template/html/v2 v2.1.2 h1:wkK/mYJ3nIhongTkG3t0QgV4ADdgOYJYVSAF2AHnh8Y= +github.com/gofiber/template/html/v2 v2.1.2/go.mod h1:E98Z/FzvpaSib06aWEgYk6GXNf3ctoyaJH8yW5ay5ak= github.com/gofiber/utils v1.1.0 h1:vdEBpn7AzIUJRhe+CiTOJdUcTg4Q9RK+pEa0KPbLdrM= github.com/gofiber/utils v1.1.0/go.mod h1:poZpsnhBykfnY1Mc0KeEa6mSHrS3dV0+oBWyeQmb2e0= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -213,8 +213,6 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4er github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -228,10 +226,9 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= @@ -247,21 +244,22 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.19.1 h1:yMQ62Al6/V0Z7CqIrrS1iYoA5/oQCm88DeNujc7C1KY= -github.com/google/go-containerregistry v0.19.1/go.mod h1:YCMFNQeeXeLF+dnhhWkqDItx/JSkH01j1Kis4PsjzFI= +github.com/google/go-containerregistry v0.19.2 h1:TannFKE1QSajsP6hPWb5oJNgKe1IKjHukIKDUmvsV6w= +github.com/google/go-containerregistry v0.19.2/go.mod h1:YCMFNQeeXeLF+dnhhWkqDItx/JSkH01j1Kis4PsjzFI= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20230821062121-407c9e7a662f h1:pDhu5sgp8yJlEF/g6osliIIpF9K4F5jvkULXa4daRDQ= -github.com/google/pprof v0.0.0-20230821062121-407c9e7a662f/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= @@ -271,8 +269,8 @@ github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c h1:7lF+Vz0LqiRid github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8= github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -280,8 +278,8 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/henvic/httpretty v0.1.3 h1:4A6vigjz6Q/+yAfTD4wqipCv+Px69C7Th/NhT0ApuU8= @@ -292,8 +290,8 @@ github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huin/goupnp v1.2.0 h1:uOKW26NG1hsSSbXIZ1IR7XP9Gjd1U8pnLaCMgntmkmY= -github.com/huin/goupnp v1.2.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= +github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= @@ -341,11 +339,11 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= -github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= +github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/koron/go-ssdp v0.0.4 h1:1IDwrghSKYM7yLf7XCzbByg2sJ/JcNOZRXS2jczTwz0= @@ -367,16 +365,16 @@ github.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38y github.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic= github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= -github.com/libp2p/go-libp2p v0.31.0 h1:LFShhP8F6xthWiBBq3euxbKjZsoRajVEyBS9snfHxYg= -github.com/libp2p/go-libp2p v0.31.0/go.mod h1:W/FEK1c/t04PbRH3fA9i5oucu5YcgrG0JVoBWT1B7Eg= -github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= -github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= +github.com/libp2p/go-libp2p v0.35.2 h1:287oHbuplkrLdAF+syB0n/qDgd50AUBtEODqS0e0HDs= +github.com/libp2p/go-libp2p v0.35.2/go.mod h1:RKCDNt30IkFipGL0tl8wQW/3zVWEGFUZo8g2gAKxwjU= +github.com/libp2p/go-libp2p-asn-util v0.4.1 h1:xqL7++IKD9TBFMgnLPZR6/6iYhawHKHl950SO9L6n94= +github.com/libp2p/go-libp2p-asn-util v0.4.1/go.mod h1:d/NI6XZ9qxw67b4e+NgpQexCIiFYJjErASrYW4PFDN8= github.com/libp2p/go-libp2p-kad-dht v0.25.2 h1:FOIk9gHoe4YRWXTu8SY9Z1d0RILol0TrtApsMDPjAVQ= github.com/libp2p/go-libp2p-kad-dht v0.25.2/go.mod h1:6za56ncRHYXX4Nc2vn8z7CZK0P4QiMcrn77acKLM2Oo= github.com/libp2p/go-libp2p-kbucket v0.6.3 h1:p507271wWzpy2f1XxPzCQG9NiN6R6lHL9GiSErbQQo0= github.com/libp2p/go-libp2p-kbucket v0.6.3/go.mod h1:RCseT7AH6eJWxxk2ol03xtP9pEHetYSPXOaJnOiD8i0= -github.com/libp2p/go-libp2p-pubsub v0.9.3 h1:ihcz9oIBMaCK9kcx+yHWm3mLAFBMAUsM4ux42aikDxo= -github.com/libp2p/go-libp2p-pubsub v0.9.3/go.mod h1:RYA7aM9jIic5VV47WXu4GkcRxRhrdElWf8xtyli+Dzc= +github.com/libp2p/go-libp2p-pubsub v0.11.0 h1:+JvS8Kty0OiyUiN0i8H5JbaCgjnJTRnTHe4rU88dLFc= +github.com/libp2p/go-libp2p-pubsub v0.11.0/go.mod h1:QEb+hEV9WL9wCiUAnpY29FZR6W3zK8qYlaml8R4q6gQ= github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= github.com/libp2p/go-libp2p-routing-helpers v0.7.2 h1:xJMFyhQ3Iuqnk9Q2dYE1eUTzsah7NLw3Qs2zjUV78T0= @@ -409,18 +407,14 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo= github.com/mholt/archiver/v3 v3.5.1/go.mod h1:e3dqJ7H78uzsRSEACH1joayhuSyhnonssnDhppzS1L4= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= @@ -428,8 +422,8 @@ github.com/microcosm-cc/bluemonday v1.0.26 h1:xbqSvqzQMeEHCqMi64VAs4d8uy6Mequs3r github.com/microcosm-cc/bluemonday v1.0.26/go.mod h1:JyzOCs9gkyQyjs+6h10UEVSe02CGwkhd72Xdqh78TWs= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/miekg/dns v1.1.59 h1:C9EXc/UToRwKLhK5wKU/I4QVsBUc8kE6MkHBkeypWZs= -github.com/miekg/dns v1.1.59/go.mod h1:nZpewl5p6IvctfgrckopVx2OlSEHPRO/U4SYkRklrEk= +github.com/miekg/dns v1.1.61 h1:nLxbwF3XxhwVSm8g9Dghm9MHPaUZuqhPiGL+675ZmEs= +github.com/miekg/dns v1.1.61/go.mod h1:mnAarhS3nWaW+NVP2wTkYVIZyHNJ098SJZUki3eykwQ= github.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c h1:bzE/A84HN25pxAuk9Eej1Kz9OUelF97nAc82bDquQI8= github.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c/go.mod h1:0SQS9kMwD2VsyFEB++InYyBJroV/FRmBgcydeSUcJms= github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b h1:z78hV3sbSMAUoyUMM0I83AUIT6Hu17AWfgjzIbtrYFc= @@ -447,30 +441,30 @@ github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa1 github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/mudler/edgevpn v0.25.3 h1:mfz1L8ks+Qdbf6VuD7JhB6xNDgjCYCdcOUE5pUVUemQ= -github.com/mudler/edgevpn v0.25.3/go.mod h1:SQdr1svvxv6vqADXSpdWGn/cMCJse2nNNFDu+AT913M= -github.com/mudler/go-piper v0.0.0-20230621222733-56b8a81b4760 h1:OFVkSxR7CRSRSNm5dvpMRZwmSwWa8EMMnHbc84fW5tU= -github.com/mudler/go-piper v0.0.0-20230621222733-56b8a81b4760/go.mod h1:O7SwdSWMilAWhBZMK9N9Y/oBDyMMzshE3ju8Xkexwig= +github.com/mudler/edgevpn v0.26.2 h1:OK4jfk7sYjuU7vCh+geUJk38lsxRgMk+EdsS9s0hioE= +github.com/mudler/edgevpn v0.26.2/go.mod h1:lplntB9N6LzGNqeSM3XHCq8kyDPsNhY3jqEbWGD2WaQ= +github.com/mudler/go-piper v0.0.0-20240315144837-9d0100873a7d h1:8udOFrDf/I83JL0/u22j6U6Q9z9LoSdby2a/DWdd0/s= +github.com/mudler/go-piper v0.0.0-20240315144837-9d0100873a7d/go.mod h1:O7SwdSWMilAWhBZMK9N9Y/oBDyMMzshE3ju8Xkexwig= github.com/mudler/go-processmanager v0.0.0-20230818213616-f204007f963c h1:CI5uGwqBpN8N7BrSKC+nmdfw+9nPQIDyjHHlaIiitZI= github.com/mudler/go-processmanager v0.0.0-20230818213616-f204007f963c/go.mod h1:gY3wyrhkRySJtmtI/JPt4a2mKv48h/M9pEZIW+SjeC0= -github.com/mudler/go-stable-diffusion v0.0.0-20230605122230-d89260f598af h1:XFq6OUqsWQam0OrEr05okXsJK/TQur3zoZTHbiZD3Ks= -github.com/mudler/go-stable-diffusion v0.0.0-20230605122230-d89260f598af/go.mod h1:8ufRkpz/S/9ahkaxzZ5i4WMgO9w4InEhuRoT7vK5Rnw= +github.com/mudler/go-stable-diffusion v0.0.0-20240429204715-4a3cd6aeae6f h1:cxtMSRkUfy+mjIQ3yMrU0txwQ4It913NEN4m1H8WWgo= +github.com/mudler/go-stable-diffusion v0.0.0-20240429204715-4a3cd6aeae6f/go.mod h1:8ufRkpz/S/9ahkaxzZ5i4WMgO9w4InEhuRoT7vK5Rnw= github.com/mudler/water v0.0.0-20221010214108-8c7313014ce0 h1:Qh6ghkMgTu6siFbTf7L3IszJmshMhXxNL4V+t7IIA6w= github.com/mudler/water v0.0.0-20221010214108-8c7313014ce0/go.mod h1:nViSE8jcOcraZwhi34joEqn7HYFISgs0M8/YujzY5Xk= github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= @@ -483,8 +477,8 @@ github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9 github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= -github.com/multiformats/go-multiaddr v0.12.3 h1:hVBXvPRcKG0w80VinQ23P5t7czWgg65BmIvQKjDydU8= -github.com/multiformats/go-multiaddr v0.12.3/go.mod h1:sBXrNzucqkFJhvKOiwwLyqamGa/P5EIXNPLovyhQCII= +github.com/multiformats/go-multiaddr v0.13.0 h1:BCBzs61E3AGHcYYTv8dqRH43ZfyrqM8RXVPT8t13tLQ= +github.com/multiformats/go-multiaddr v0.13.0/go.mod h1:sBXrNzucqkFJhvKOiwwLyqamGa/P5EIXNPLovyhQCII= github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= @@ -496,20 +490,23 @@ github.com/multiformats/go-multicodec v0.9.0/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI1 github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U= github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= -github.com/multiformats/go-multistream v0.4.1 h1:rFy0Iiyn3YT0asivDUIR05leAdwZq3de4741sbiSdfo= -github.com/multiformats/go-multistream v0.4.1/go.mod h1:Mz5eykRVAjJWckE2U78c6xqdtyNUEhKSM0Lwar2p77Q= +github.com/multiformats/go-multistream v0.5.0 h1:5htLSLl7lvJk3xx3qT/8Zm9J4K8vEOf/QGkvOGQAyiE= +github.com/multiformats/go-multistream v0.5.0/go.mod h1:n6tMZiwiP2wUsR8DgfDWw1dydlEqV3l6N3/GBsX6ILA= github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= -github.com/nomic-ai/gpt4all/gpt4all-bindings/golang v0.0.0-20231022042237-c25dc5193530 h1:YXMxHwHMB9jCBo2Yu5gz3mTB3T1TnZs/HmPLv15LUSA= -github.com/nomic-ai/gpt4all/gpt4all-bindings/golang v0.0.0-20231022042237-c25dc5193530/go.mod h1:4T3CHXyrt+7FQHXaxULZfPjHbD8/99WuDDJa0YVZARI= +github.com/nomic-ai/gpt4all/gpt4all-bindings/golang v0.0.0-20240606155928-41c9013fa46a h1:jLmaG6BYcFvUDGFJM8B9kOM2yfvaTLxrKcFkBn4nstA= +github.com/nomic-ai/gpt4all/gpt4all-bindings/golang v0.0.0-20240606155928-41c9013fa46a/go.mod h1:4T3CHXyrt+7FQHXaxULZfPjHbD8/99WuDDJa0YVZARI= github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ= github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= +github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -517,13 +514,13 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= -github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE= -github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= @@ -531,8 +528,8 @@ github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2sz github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= -github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= +github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= @@ -540,8 +537,8 @@ github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4a github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/otiai10/mint v1.6.1 h1:kgbTJmOpp/0ce7hk3H8jiSuR0MXmpwWRfqUdKww17qg= github.com/otiai10/mint v1.6.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= -github.com/otiai10/openaigo v1.6.0 h1:YTQEbtDSvawETOB/Kmb/6JvuHdHH/eIpSQfHVufiwY8= -github.com/otiai10/openaigo v1.6.0/go.mod h1:kIaXc3V+Xy5JLplcBxehVyGYDtufHp3PFPy04jOwOAI= +github.com/otiai10/openaigo v1.7.0 h1:AOQcOjRRM57ABvz+aI2oJA/Qsz1AydKbdZAlGiKyCqg= +github.com/otiai10/openaigo v1.7.0/go.mod h1:kIaXc3V+Xy5JLplcBxehVyGYDtufHp3PFPy04jOwOAI= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= @@ -552,11 +549,55 @@ github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= github.com/pierrec/lz4/v4 v4.1.2 h1:qvY3YFXRQE/XB8MlLzJH7mSzBs74eA2gg52YTk6jUPM= github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pion/datachannel v1.5.6 h1:1IxKJntfSlYkpUj8LlYRSWpYiTTC02nUrOE8T3DqGeg= +github.com/pion/datachannel v1.5.6/go.mod h1:1eKT6Q85pRnr2mHiWHxJwO50SfZRtWHTsNIVb/NfGW4= +github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= +github.com/pion/dtls/v2 v2.2.11 h1:9U/dpCYl1ySttROPWJgqWKEylUdT0fXp/xst6JwY5Ks= +github.com/pion/dtls/v2 v2.2.11/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE= +github.com/pion/ice/v2 v2.3.25 h1:M5rJA07dqhi3nobJIg+uPtcVjFECTrhcR3n0ns8kDZs= +github.com/pion/ice/v2 v2.3.25/go.mod h1:KXJJcZK7E8WzrBEYnV4UtqEZsGeWfHxsNqhVcVvgjxw= +github.com/pion/interceptor v0.1.29 h1:39fsnlP1U8gw2JzOFWdfCU82vHvhW9o0rZnZF56wF+M= +github.com/pion/interceptor v0.1.29/go.mod h1:ri+LGNjRUc5xUNtDEPzfdkmSqISixVTBF/z/Zms/6T4= +github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= +github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= +github.com/pion/mdns v0.0.12 h1:CiMYlY+O0azojWDmxdNr7ADGrnZ+V6Ilfner+6mSVK8= +github.com/pion/mdns v0.0.12/go.mod h1:VExJjv8to/6Wqm1FXK+Ii/Z9tsVk/F5sD/N70cnYFbk= +github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA= +github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= +github.com/pion/rtcp v1.2.12/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= +github.com/pion/rtcp v1.2.14 h1:KCkGV3vJ+4DAJmvP0vaQShsb0xkRfWkO540Gy102KyE= +github.com/pion/rtcp v1.2.14/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= +github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= +github.com/pion/rtp v1.8.6 h1:MTmn/b0aWWsAzux2AmP8WGllusBVw4NPYPVFFd7jUPw= +github.com/pion/rtp v1.8.6/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= +github.com/pion/sctp v1.8.13/go.mod h1:YKSgO/bO/6aOMP9LCie1DuD7m+GamiK2yIiPM6vH+GA= +github.com/pion/sctp v1.8.16 h1:PKrMs+o9EMLRvFfXq59WFsC+V8mN1wnKzqrv+3D/gYY= +github.com/pion/sctp v1.8.16/go.mod h1:P6PbDVA++OJMrVNg2AL3XtYHV4uD6dvfyOovCgMs0PE= +github.com/pion/sdp/v3 v3.0.9 h1:pX++dCHoHUwq43kuwf3PyJfHlwIj4hXA7Vrifiq0IJY= +github.com/pion/sdp/v3 v3.0.9/go.mod h1:B5xmvENq5IXJimIO4zfp6LAe1fD9N+kFv+V/1lOdz8M= +github.com/pion/srtp/v2 v2.0.18 h1:vKpAXfawO9RtTRKZJbG4y0v1b11NZxQnxRl85kGuUlo= +github.com/pion/srtp/v2 v2.0.18/go.mod h1:0KJQjA99A6/a0DOVTu1PhDSw0CXF2jTkqOoMg3ODqdA= +github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4= +github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8= +github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= +github.com/pion/transport/v2 v2.2.2/go.mod h1:OJg3ojoBJopjEeECq2yJdXH9YVrUJ1uQ++NjXLOUorc= +github.com/pion/transport/v2 v2.2.3/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= +github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= +github.com/pion/transport/v2 v2.2.5 h1:iyi25i/21gQck4hfRhomF6SktmUQjRsRW4WJdhfc3Kc= +github.com/pion/transport/v2 v2.2.5/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= +github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= +github.com/pion/transport/v3 v3.0.2 h1:r+40RJR25S9w3jbA6/5uEPTzcdn7ncyU44RWCbHkLg4= +github.com/pion/transport/v3 v3.0.2/go.mod h1:nIToODoOlb5If2jF9y2Igfx3PFYWfuXi37m0IlWa/D0= +github.com/pion/turn/v2 v2.1.3/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= +github.com/pion/turn/v2 v2.1.6 h1:Xr2niVsiPTB0FPtt+yAWKFUkU1eotQbGgpTIld4x1Gc= +github.com/pion/turn/v2 v2.1.6/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= +github.com/pion/webrtc/v3 v3.2.40 h1:Wtfi6AZMQg+624cvCXUuSmrKWepSB7zfgYDOYqsSOVU= +github.com/pion/webrtc/v3 v3.2.40/go.mod h1:M1RAe3TNTD1tzyvqHrbVODfwdPGSXOUo/OgpoGGJqFY= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHtyHY= -github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= +github.com/pkoukk/tiktoken-go v0.1.6 h1:JF0TlJzhTbrI30wCvFuiw6FzP2+/bR+FIxUdgEAcUsw= +github.com/pkoukk/tiktoken-go v0.1.6/go.mod h1:9NiV+i9mJKGj1rYOT+njbv+ZwA/zJxYdewGl6qVatpg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polydawn/refmt v0.89.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4= @@ -564,50 +605,49 @@ github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/qtls-go1-20 v0.3.3 h1:17/glZSLI9P9fDAeyCHBFSWSqJcwx1byhLwP5eUIDCM= -github.com/quic-go/qtls-go1-20 v0.3.3/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= -github.com/quic-go/quic-go v0.38.2 h1:VWv/6gxIoB8hROQJhx1JEyiegsUQ+zMN3em3kynTGdg= -github.com/quic-go/quic-go v0.38.2/go.mod h1:ijnZM7JsFIkp4cRyjxJNIzdSfCLmUMg9wdyhGmg+SN4= -github.com/quic-go/webtransport-go v0.5.3 h1:5XMlzemqB4qmOlgIus5zB45AcZ2kCgCy2EptUrfOPWU= -github.com/quic-go/webtransport-go v0.5.3/go.mod h1:OhmmgJIzTTqXK5xvtuX0oBpLV2GkLWNDA+UeTGJXErU= +github.com/quic-go/quic-go v0.44.0 h1:So5wOr7jyO4vzL2sd8/pD9Kesciv91zSk8BoFngItQ0= +github.com/quic-go/quic-go v0.44.0/go.mod h1:z4cx/9Ny9UtGITIPzmPTXh1ULfOyWh4qGQlpnPcWmek= +github.com/quic-go/webtransport-go v0.8.0 h1:HxSrwun11U+LlmwpgM1kEqIqH90IT4N8auv/cD7QFJg= +github.com/quic-go/webtransport-go v0.8.0/go.mod h1:N99tjprW432Ut5ONql/aUhSLT0YVSlwHohQsuac9WaM= github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk= github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtDqv66NfsMU= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= -github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sashabaranov/go-openai v1.20.4 h1:095xQ/fAtRa0+Rj21sezVJABgKfGPNbyx/sAN/hJUmg= -github.com/sashabaranov/go-openai v1.20.4/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= -github.com/schollz/progressbar/v3 v3.13.1 h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE= -github.com/schollz/progressbar/v3 v3.13.1/go.mod h1:xvrbki8kfT1fzWzBT/UZd9L6GA+jdL7HAgq2RFnO6fQ= +github.com/sashabaranov/go-openai v1.26.2 h1:cVlQa3gn3eYqNXRW03pPlpy6zLG52EU4g0FrWXc0EFI= +github.com/sashabaranov/go-openai v1.26.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/schollz/progressbar/v3 v3.14.4 h1:W9ZrDSJk7eqmQhd3uxFNNcTr0QL+xuGNI9dEMrw0r74= +github.com/schollz/progressbar/v3 v3.14.4/go.mod h1:aT3UQ7yGm+2ZjeXPqsjTenwL3ddUiuZ0kfQ/2tHlyNI= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil/v3 v3.23.7/go.mod h1:c4gnmoRC0hQuaLqvxnx1//VXQ0Ms/X9UnJF8pddY5z4= -github.com/shirou/gopsutil/v3 v3.23.9 h1:ZI5bWVeu2ep4/DIxB4U9okeYJ7zp/QLTO4auRb/ty/E= -github.com/shirou/gopsutil/v3 v3.23.9/go.mod h1:x/NWSb71eMcjFIO0vhyGW5nZ7oSIgVjrCnADckb85GA= +github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= +github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -661,15 +701,16 @@ github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= @@ -678,8 +719,8 @@ github.com/swaggo/files/v2 v2.0.0/go.mod h1:24kk2Y9NYEJ5lHuCra6iVwkMjIekMCaFq/0J github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg= github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/thxcode/gguf-parser-go v0.0.6 h1:2lbnqA9r/4kyfOUZxy3VWRP60IkfNb31l57GmzOzYKE= -github.com/thxcode/gguf-parser-go v0.0.6/go.mod h1:xHPU1OI4c0KHVTGYjTZIkLRJhBZUb9wDTFYFvkRXo9M= +github.com/thxcode/gguf-parser-go v0.1.0 h1:J4QruXyEQGjrAKeKZFlsD2na9l4XF5+bjR194d+wJS4= +github.com/thxcode/gguf-parser-go v0.1.0/go.mod h1:Tn1PsO/YDEtLIxm1+QDCjIIH9L/9Sr7+KpxZKm0sEuE= github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0= github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= @@ -688,8 +729,8 @@ github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0h github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/tmc/langchaingo v0.0.0-20231019140956-c636b3da7701 h1:LquLgmFiKf6eDXdwoUKCIGn5NsR34cLXC6ySYhiE6bA= -github.com/tmc/langchaingo v0.0.0-20231019140956-c636b3da7701/go.mod h1:SiwyRS7sBSSi6f3NB4dKENw69X6br/wZ2WRkM+8pZWk= +github.com/tmc/langchaingo v0.1.12 h1:yXwSu54f3b1IKw0jJ5/DWu+qFVH1NBblwC0xddBzGJE= +github.com/tmc/langchaingo v0.1.12/go.mod h1:cd62xD6h+ouk8k/QQFhOsjRYBSA1JJ5UVKXSIgm7Ni4= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I= github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -698,8 +739,8 @@ github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60Nt github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA= -github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdIA3Xl7cH8g= +github.com/valyala/fasthttp v1.55.0 h1:Zkefzgt6a7+bVKHnu/YaYSOPfNYNisSVBo/unVCf8k8= +github.com/valyala/fasthttp v1.55.0/go.mod h1:NkY9JtkrpPKmgwV3HTaS2HWaJss9RSIsRVfcxxoHiOM= github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck= @@ -733,34 +774,35 @@ github.com/yuin/goldmark v1.5.4 h1:2uY/xC0roWy8IBEGLgB1ywIoEJFGmRrX21YQcvGZzjU= github.com/yuin/goldmark v1.5.4/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark-emoji v1.0.2 h1:c/RgTShNgHTtc6xdz2KKI74jJr6rWi7FPgnP9GAsO5s= github.com/yuin/goldmark-emoji v1.0.2/go.mod h1:RhP/RWpexdp+KHs7ghKnifRoIs/Bq4nDS7tRbCkOwKY= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.42.0 h1:jwV9iQdvp38fxXi8ZC+lNpxjK16MRcZlpDYvbuO1FiA= -go.opentelemetry.io/otel/exporters/prometheus v0.42.0/go.mod h1:f3bYiqNqhoPxkvI2LrXqQVC546K7BuRDL/kKuxkujhA= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= -go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= -go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k= -go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0 h1:2Ewsda6hejmbhGFyUvWZjUThC98Cf8Zy6g0zkIimOng= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0/go.mod h1:pMm5PkUo5YwbLiuEf7t2xg4wbP0/eSJrMxIMxKosynY= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/dig v1.17.0 h1:5Chju+tUvcC+N7N6EV08BJz41UZuO3BmHcN4A287ZLI= -go.uber.org/dig v1.17.0/go.mod h1:rTxpf7l5I0eBTlE6/9RL+lDybC7WFwY2QH55ZSjy1mU= -go.uber.org/fx v1.20.0 h1:ZMC/pnRvhsthOZh9MZjMq5U8Or3mA9zBSPaLnzs3ihQ= -go.uber.org/fx v1.20.0/go.mod h1:qCUj0btiR3/JnanEr1TYEePfSw6o/4qYJscgvzQ5Ub0= +go.uber.org/dig v1.17.1 h1:Tga8Lz8PcYNsWsyHMZ1Vm0OQOUaJNDyvPImgbAu9YSc= +go.uber.org/dig v1.17.1/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE= +go.uber.org/fx v1.22.1 h1:nvvln7mwyT5s1q201YE29V/BFrGor6vMiDNpU/78Mys= +go.uber.org/fx v1.22.1/go.mod h1:HT2M7d7RHo+ebKGh9NRcrsrHHfpZ60nW3QRubMRfv48= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -783,8 +825,14 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= @@ -801,8 +849,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -826,8 +875,16 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -883,19 +940,33 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -903,10 +974,17 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -924,12 +1002,12 @@ golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -966,8 +1044,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -979,10 +1057,11 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -1018,5 +1097,7 @@ lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI= lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= oras.land/oras-go/v2 v2.5.0 h1:o8Me9kLY74Vp5uw07QXPiitjsw7qNXi8Twd+19Zf02c= oras.land/oras-go/v2 v2.5.0/go.mod h1:z4eisnLP530vwIOUOJeBIj0aGI0L1C3d53atvCBqZHg= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/pkg/functions/functions.go b/pkg/functions/functions.go index f13ffe01..49e9fc93 100644 --- a/pkg/functions/functions.go +++ b/pkg/functions/functions.go @@ -6,6 +6,11 @@ import ( "github.com/rs/zerolog/log" ) +const ( + defaultFunctionNameKey = "name" + defaultFunctionArgumentsKey = "arguments" +) + type Function struct { Name string `json:"name"` Description string `json:"description"` @@ -19,50 +24,18 @@ type Tool struct { } type Tools []Tool -// ToJSONFunctionStructure converts a list of functions to a JSON structure that can be parsed to a grammar -// This allows the LLM to return a response of the type: { "function": "function_name", "arguments": { "arg1": "value1", "arg2": "value2" } } -func (f Functions) ToJSONFunctionStructure() JSONFunctionStructureFunction { - js := JSONFunctionStructureFunction{} - for _, function := range f { - // t := function.Parameters["type"] - //tt := t.(string) - - properties := function.Parameters["properties"] - defs := function.Parameters["$defs"] - dat, _ := json.Marshal(properties) - dat2, _ := json.Marshal(defs) - prop := map[string]interface{}{} - defsD := map[string]interface{}{} - - err := json.Unmarshal(dat, &prop) - if err != nil { - log.Error().Err(err).Msg("error unmarshalling dat") - } - err = json.Unmarshal(dat2, &defsD) - if err != nil { - log.Error().Err(err).Msg("error unmarshalling dat2") - } - if js.Defs == nil { - js.Defs = defsD - } - js.OneOf = append(js.OneOf, ItemFunction{ - Type: "object", - Properties: FunctionProperties{ - Function: FunctionName{Const: function.Name}, - Arguments: Argument{ - Type: "object", - Properties: prop, - }, - }, - }) - } - return js -} - // ToJSONNameStructure converts a list of functions to a JSON structure that can be parsed to a grammar // This allows the LLM to return a response of the type: { "name": "function_name", "arguments": { "arg1": "value1", "arg2": "value2" } } -func (f Functions) ToJSONNameStructure() JSONFunctionStructureName { - js := JSONFunctionStructureName{} +func (f Functions) ToJSONStructure(name, args string) JSONFunctionStructure { + nameKey := defaultFunctionNameKey + argsKey := defaultFunctionArgumentsKey + if name != "" { + nameKey = name + } + if args != "" { + argsKey = args + } + js := JSONFunctionStructure{} for _, function := range f { // t := function.Parameters["type"] //tt := t.(string) @@ -85,15 +58,16 @@ func (f Functions) ToJSONNameStructure() JSONFunctionStructureName { if js.Defs == nil { js.Defs = defsD } - js.OneOf = append(js.OneOf, ItemName{ - Type: "object", - Properties: NameProperties{ - Function: FunctionName{Const: function.Name}, - Arguments: Argument{ - Type: "object", - Properties: prop, - }, - }, + + property := map[string]interface{}{} + property[nameKey] = FunctionName{Const: function.Name} + property[argsKey] = Argument{ + Type: "object", + Properties: prop, + } + js.OneOf = append(js.OneOf, Item{ + Type: "object", + Properties: property, }) } return js diff --git a/pkg/functions/functions_test.go b/pkg/functions/functions_test.go index e82a5f71..2eb0946a 100644 --- a/pkg/functions/functions_test.go +++ b/pkg/functions/functions_test.go @@ -35,21 +35,35 @@ var _ = Describe("LocalAI grammar functions", func() { }, } - js := functions.ToJSONFunctionStructure() + js := functions.ToJSONStructure("function", "arguments") Expect(len(js.OneOf)).To(Equal(2)) - Expect(js.OneOf[0].Properties.Function.Const).To(Equal("create_event")) - Expect(js.OneOf[0].Properties.Arguments.Properties["event_name"].(map[string]interface{})["type"]).To(Equal("string")) - Expect(js.OneOf[0].Properties.Arguments.Properties["event_date"].(map[string]interface{})["type"]).To(Equal("string")) - Expect(js.OneOf[1].Properties.Function.Const).To(Equal("search")) - Expect(js.OneOf[1].Properties.Arguments.Properties["query"].(map[string]interface{})["type"]).To(Equal("string")) + fnName := js.OneOf[0].Properties["function"].(FunctionName) + fnArgs := js.OneOf[0].Properties["arguments"].(Argument) + Expect(fnName.Const).To(Equal("create_event")) + Expect(fnArgs.Properties["event_name"].(map[string]interface{})["type"]).To(Equal("string")) + Expect(fnArgs.Properties["event_date"].(map[string]interface{})["type"]).To(Equal("string")) - jsN := functions.ToJSONNameStructure() + fnName = js.OneOf[1].Properties["function"].(FunctionName) + fnArgs = js.OneOf[1].Properties["arguments"].(Argument) + Expect(fnName.Const).To(Equal("search")) + Expect(fnArgs.Properties["query"].(map[string]interface{})["type"]).To(Equal("string")) + + // Test with custom keys + jsN := functions.ToJSONStructure("name", "arguments") Expect(len(jsN.OneOf)).To(Equal(2)) - Expect(jsN.OneOf[0].Properties.Function.Const).To(Equal("create_event")) - Expect(jsN.OneOf[0].Properties.Arguments.Properties["event_name"].(map[string]interface{})["type"]).To(Equal("string")) - Expect(jsN.OneOf[0].Properties.Arguments.Properties["event_date"].(map[string]interface{})["type"]).To(Equal("string")) - Expect(jsN.OneOf[1].Properties.Function.Const).To(Equal("search")) - Expect(jsN.OneOf[1].Properties.Arguments.Properties["query"].(map[string]interface{})["type"]).To(Equal("string")) + + fnName = jsN.OneOf[0].Properties["name"].(FunctionName) + fnArgs = jsN.OneOf[0].Properties["arguments"].(Argument) + + Expect(fnName.Const).To(Equal("create_event")) + Expect(fnArgs.Properties["event_name"].(map[string]interface{})["type"]).To(Equal("string")) + Expect(fnArgs.Properties["event_date"].(map[string]interface{})["type"]).To(Equal("string")) + + fnName = jsN.OneOf[1].Properties["name"].(FunctionName) + fnArgs = jsN.OneOf[1].Properties["arguments"].(Argument) + + Expect(fnName.Const).To(Equal("search")) + Expect(fnArgs.Properties["query"].(map[string]interface{})["type"]).To(Equal("string")) }) }) Context("Select()", func() { diff --git a/pkg/functions/grammar_json_schema.go b/pkg/functions/grammar_json_schema.go index 2c42e291..7356d01d 100644 --- a/pkg/functions/grammar_json_schema.go +++ b/pkg/functions/grammar_json_schema.go @@ -331,6 +331,7 @@ func (sc *JSONSchemaConverter) resolveReference(ref string, rootSchema map[strin return def } + func (sc *JSONSchemaConverter) Grammar(schema map[string]interface{}, options ...func(*GrammarOption)) string { sc.addRule("freestring", PRIMITIVE_RULES["freestring"]) sc.visit(schema, "", schema) @@ -352,52 +353,23 @@ type FunctionName struct { Const string `json:"const"` } -type FunctionProperties struct { - Function FunctionName `json:"function"` - Arguments Argument `json:"arguments"` -} - -type NameProperties struct { - Function FunctionName `json:"name"` - Arguments Argument `json:"arguments"` -} - type Argument struct { Type string `json:"type"` Properties map[string]interface{} `json:"properties"` } -type ItemName struct { - Type string `json:"type"` - Properties NameProperties `json:"properties"` +type Item struct { + Type string `json:"type"` + Properties map[string]interface{} `json:"properties"` } -type ItemFunction struct { - Type string `json:"type"` - Properties FunctionProperties `json:"properties"` -} - -type JSONFunctionStructureName struct { - OneOf []ItemName `json:"oneOf,omitempty"` - AnyOf []ItemName `json:"anyOf,omitempty"` +type JSONFunctionStructure struct { + OneOf []Item `json:"oneOf,omitempty"` + AnyOf []Item `json:"anyOf,omitempty"` Defs map[string]interface{} `json:"$defs,omitempty"` } -func (j JSONFunctionStructureName) Grammar(options ...func(*GrammarOption)) string { - grammarOpts := &GrammarOption{} - grammarOpts.Apply(options...) - - dat, _ := json.Marshal(j) - return NewJSONSchemaConverter(grammarOpts.PropOrder).GrammarFromBytes(dat, options...) -} - -type JSONFunctionStructureFunction struct { - OneOf []ItemFunction `json:"oneOf,omitempty"` - AnyOf []ItemFunction `json:"anyOf,omitempty"` - Defs map[string]interface{} `json:"$defs,omitempty"` -} - -func (j JSONFunctionStructureFunction) Grammar(options ...func(*GrammarOption)) string { +func (j JSONFunctionStructure) Grammar(options ...func(*GrammarOption)) string { grammarOpts := &GrammarOption{} grammarOpts.Apply(options...) diff --git a/pkg/functions/grammar_json_schema_test.go b/pkg/functions/grammar_json_schema_test.go index 5f72dbd5..bf52bd8d 100644 --- a/pkg/functions/grammar_json_schema_test.go +++ b/pkg/functions/grammar_json_schema_test.go @@ -9,69 +9,65 @@ import ( . "github.com/onsi/gomega" ) -var testFunctions = []ItemFunction{ +func createFunction(field1 string, field2 string, name string, properties map[string]interface{}) map[string]interface{} { + property := map[string]interface{}{} + property[field1] = FunctionName{Const: name} + property[field2] = Argument{ + Type: "object", + Properties: properties, + } + return property +} + +var testFunctions = []Item{ { Type: "object", - Properties: FunctionProperties{ - Function: FunctionName{ - Const: "create_event", + Properties: createFunction( + "function", + "arguments", + "create_event", + map[string]interface{}{ + "title": map[string]string{"type": "string"}, + "date": map[string]string{"type": "string"}, + "time": map[string]string{"type": "string"}, }, - Arguments: Argument{ // this is OpenAI's parameter - Type: "object", - Properties: map[string]interface{}{ - "title": map[string]string{"type": "string"}, - "date": map[string]string{"type": "string"}, - "time": map[string]string{"type": "string"}, - }, - }, - }, + ), }, { Type: "object", - Properties: FunctionProperties{ - Function: FunctionName{ - Const: "search", - }, - Arguments: Argument{ - Type: "object", - Properties: map[string]interface{}{ - "query": map[string]string{"type": "string"}, - }, - }, - }, + Properties: createFunction( + "function", + "arguments", + "search", + map[string]interface{}{ + "query": map[string]string{"type": "string"}, + }), }, } -var testFunctionsName = []ItemName{ +var testFunctionsName = []Item{ { Type: "object", - Properties: NameProperties{ - Function: FunctionName{ - Const: "create_event", + Properties: createFunction( + "name", + "arguments", + "create_event", + map[string]interface{}{ + "title": map[string]string{"type": "string"}, + "date": map[string]string{"type": "string"}, + "time": map[string]string{"type": "string"}, }, - Arguments: Argument{ // this is OpenAI's parameter - Type: "object", - Properties: map[string]interface{}{ - "title": map[string]string{"type": "string"}, - "date": map[string]string{"type": "string"}, - "time": map[string]string{"type": "string"}, - }, - }, - }, + ), }, { Type: "object", - Properties: NameProperties{ - Function: FunctionName{ - Const: "search", - }, - Arguments: Argument{ - Type: "object", - Properties: map[string]interface{}{ - "query": map[string]string{"type": "string"}, - }, - }, - }, + Properties: createFunction( + "name", + "arguments", + "search", + map[string]interface{}{ + "query": map[string]string{"type": "string"}, + }), }, } @@ -270,7 +266,7 @@ var _ = Describe("JSON schema grammar tests", func() { }) It("generates a valid grammar from JSON Objects", func() { - structuredGrammar := JSONFunctionStructureFunction{ + structuredGrammar := JSONFunctionStructure{ OneOf: testFunctions} grammar := structuredGrammar.Grammar() @@ -284,7 +280,7 @@ var _ = Describe("JSON schema grammar tests", func() { }) It("generates a valid grammar from JSON Objects for multiple function return", func() { - structuredGrammar := JSONFunctionStructureFunction{ + structuredGrammar := JSONFunctionStructure{ OneOf: testFunctions} grammar := structuredGrammar.Grammar(functions.EnableMaybeArray) @@ -302,7 +298,7 @@ var _ = Describe("JSON schema grammar tests", func() { }) It("generates a valid grammar from JSON Objects for multiple function return", func() { - structuredGrammar := JSONFunctionStructureName{ + structuredGrammar := JSONFunctionStructure{ OneOf: testFunctionsName} grammar := structuredGrammar.Grammar(functions.EnableMaybeArray) @@ -320,7 +316,7 @@ var _ = Describe("JSON schema grammar tests", func() { }) It("generates a valid grammar from JSON Objects for multiple function return with a suffix and array", func() { - structuredGrammar := JSONFunctionStructureName{ + structuredGrammar := JSONFunctionStructure{ OneOf: testFunctionsName} grammar := structuredGrammar.Grammar( @@ -340,7 +336,7 @@ var _ = Describe("JSON schema grammar tests", func() { Expect(len(results)).To(Equal(len(strings.Split(grammar, "\n"))), grammar) }) It("generates a valid grammar from JSON Objects with a suffix", func() { - structuredGrammar := JSONFunctionStructureName{ + structuredGrammar := JSONFunctionStructure{ OneOf: testFunctionsName} grammar := structuredGrammar.Grammar(functions.SetPrefix("suffix")) @@ -357,7 +353,7 @@ var _ = Describe("JSON schema grammar tests", func() { Expect(len(results)).To(Equal(len(strings.Split(grammar, "\n"))), grammar) }) It("generates a valid grammar from JSON Objects with a suffix and could return string", func() { - structuredGrammar := JSONFunctionStructureName{ + structuredGrammar := JSONFunctionStructure{ OneOf: testFunctionsName} grammar := structuredGrammar.Grammar(functions.SetPrefix("suffix"), functions.EnableMaybeString) @@ -374,7 +370,7 @@ var _ = Describe("JSON schema grammar tests", func() { Expect(len(results)).To(Equal(len(strings.Split(grammar, "\n"))), grammar) }) It("generates a valid grammar from JSON Objects with a suffix that could return text or an array of tools", func() { - structuredGrammar := JSONFunctionStructureName{ + structuredGrammar := JSONFunctionStructure{ OneOf: testFunctionsName} grammar := structuredGrammar.Grammar(functions.SetPrefix("suffix"), functions.EnableMaybeString, functions.EnableMaybeArray) @@ -393,7 +389,7 @@ var _ = Describe("JSON schema grammar tests", func() { }) It("generates a valid grammar from JSON Objects without a suffix that could return text or an array of tools or just string", func() { - structuredGrammar := JSONFunctionStructureName{ + structuredGrammar := JSONFunctionStructure{ OneOf: testFunctionsName} grammar := structuredGrammar.Grammar(functions.EnableMaybeString, functions.EnableMaybeArray) @@ -411,7 +407,7 @@ var _ = Describe("JSON schema grammar tests", func() { }) It("generates a valid grammar from JSON Objects without a suffix that could return text or an array of tools or just string. Disables mixedstring", func() { - structuredGrammar := JSONFunctionStructureName{ + structuredGrammar := JSONFunctionStructure{ OneOf: testFunctionsName} grammar := structuredGrammar.Grammar(functions.EnableMaybeString, functions.EnableMaybeArray, functions.NoMixedFreeString) @@ -429,7 +425,7 @@ var _ = Describe("JSON schema grammar tests", func() { }) It("generates parallel tools without newlines in JSON", func() { - structuredGrammar := JSONFunctionStructureName{ + structuredGrammar := JSONFunctionStructure{ OneOf: testFunctionsName} content := `arr ::= "[" ( diff --git a/pkg/functions/parse.go b/pkg/functions/parse.go index a9eef658..8e848a60 100644 --- a/pkg/functions/parse.go +++ b/pkg/functions/parse.go @@ -2,6 +2,8 @@ package functions import ( "encoding/json" + "errors" + "io" "regexp" "strings" @@ -76,7 +78,8 @@ type FunctionsConfig struct { // FunctionName enable the LLM to return { "name": "function_name", "arguments": { "arg1": "value1", "arg2": "value2" } } // instead of { "function": "function_name", "arguments": { "arg1": "value1", "arg2": "value2" } }. // This might be useful for certain models trained with the function name as the first token. - FunctionName bool `yaml:"return_name_in_function_response"` + FunctionNameKey string `yaml:"function_name_key"` + FunctionArgumentsKey string `yaml:"function_arguments_key"` } type ReplaceResult struct { @@ -145,6 +148,47 @@ func ParseTextContent(llmresult string, functionConfig FunctionsConfig) string { return "" } +// ParseJSON is a function that parses a JSON string that might contain multiple JSON objects +// and syntax errors in between by shifting the offset +// This for e.g. allow to parse +// { "foo": "bar" } invalid { "baz": "qux" } +// into +// [ { "foo": "bar" }, { "baz": "qux" } ] +// Credits to Michael Yang (https://github.com/mxyng) for the original implementation +// This is a slighly reworked version, improved for readability and error handling +func ParseJSON(s string) ([]map[string]any, error) { + var objs []map[string]any + offset := 0 + + for offset < len(s) { + var obj map[string]any + decoder := json.NewDecoder(strings.NewReader(s[offset:])) + + err := decoder.Decode(&obj) + switch { + case errors.Is(err, io.EOF): + return objs, nil + case err == nil: + offset += int(decoder.InputOffset()) + objs = append(objs, obj) + default: // handle the error type + var syntaxErr *json.SyntaxError + var unmarshalTypeErr *json.UnmarshalTypeError + + switch { + case errors.As(err, &syntaxErr): + offset += int(syntaxErr.Offset) + case errors.As(err, &unmarshalTypeErr): + offset += int(unmarshalTypeErr.Offset) + default: + return objs, err + } + } + } + + return objs, nil +} + func ParseFunctionCall(llmresult string, functionConfig FunctionsConfig) []FuncCallResults { log.Debug().Msgf("LLM result: %s", llmresult) @@ -157,9 +201,13 @@ func ParseFunctionCall(llmresult string, functionConfig FunctionsConfig) []FuncC } log.Debug().Msgf("LLM result(function cleanup): %s", llmresult) - functionNameKey := "function" - if functionConfig.FunctionName { - functionNameKey = "name" + functionNameKey := defaultFunctionNameKey + functionArgumentsKey := defaultFunctionArgumentsKey + if functionConfig.FunctionNameKey != "" { + functionNameKey = functionConfig.FunctionNameKey + } + if functionConfig.FunctionArgumentsKey != "" { + functionArgumentsKey = functionConfig.FunctionArgumentsKey } results := []FuncCallResults{} @@ -170,19 +218,13 @@ func ParseFunctionCall(llmresult string, functionConfig FunctionsConfig) []FuncC result = make([]FuncCallResults, 0) for _, s := range results { - var ss []map[string]interface{} + var ss []map[string]any s = utils.EscapeNewLines(s) - err := json.Unmarshal([]byte(s), &ss) + ss, err := ParseJSON(s) + //err := json.Unmarshal([]byte(s), &ss) if err != nil { - // If the LLM result is a single object, try unmarshaling it into a single map - var singleObj map[string]interface{} - err = json.Unmarshal([]byte(s), &singleObj) - if err != nil { - log.Debug().Err(err).Str("escapedLLMResult", s).Msg("unable to unmarshal llm result in a single object or an array of JSON objects") - } else { - ss = []map[string]interface{}{singleObj} - } + log.Debug().Err(err).Str("escapedLLMResult", s).Msg("unable to unmarshal llm result in a single object or an array of JSON objects") } log.Debug().Msgf("Function return: %s %+v", s, ss) @@ -195,7 +237,7 @@ func ParseFunctionCall(llmresult string, functionConfig FunctionsConfig) []FuncC //return result, fmt.Errorf("unable to find function name in result") } // Similarly, while here arguments is a map[string]interface{}, OpenAI actually want a stringified object - args, ok := s["arguments"] // arguments needs to be a string, but we return an object from the grammar result (TODO: fix) + args, ok := s[functionArgumentsKey] // arguments needs to be a string, but we return an object from the grammar result (TODO: fix) if !ok { continue //return result, fmt.Errorf("unable to find arguments in result") @@ -253,7 +295,7 @@ func ParseFunctionCall(llmresult string, functionConfig FunctionsConfig) []FuncC if functionName == "" { return results } - results = append(results, FuncCallResults{Name: result[functionNameKey], Arguments: result["arguments"]}) + results = append(results, FuncCallResults{Name: result[functionNameKey], Arguments: result[functionArgumentsKey]}) } } } else { diff --git a/pkg/functions/parse_test.go b/pkg/functions/parse_test.go index 0e38f9d9..f0783524 100644 --- a/pkg/functions/parse_test.go +++ b/pkg/functions/parse_test.go @@ -16,7 +16,7 @@ var _ = Describe("LocalAI function parse tests", func() { Context("when using grammars and single result expected", func() { It("should parse the function name and arguments correctly", func() { - input := `{"function": "add", "arguments": {"x": 5, "y": 3}}` + input := `{"name": "add", "arguments": {"x": 5, "y": 3}}` results := ParseFunctionCall(input, functionConfig) Expect(results).To(HaveLen(1)) @@ -28,13 +28,22 @@ var _ = Describe("LocalAI function parse tests", func() { Context("when not using grammars and regex is needed", func() { It("should extract function name and arguments from the regex", func() { input := `add({"x":5,"y":3})` - functionConfig.ResponseRegex = []string{`(?P\w+)\s*\((?P.*)\)`} + functionConfig.ResponseRegex = []string{`(?P\w+)\s*\((?P.*)\)`} results := ParseFunctionCall(input, functionConfig) Expect(results).To(HaveLen(1)) Expect(results[0].Name).To(Equal("add")) Expect(results[0].Arguments).To(Equal(`{"x":5,"y":3}`)) }) + It("should extract function name and arguments from the regex", func() { + input := `add({"x":5,"y":3})` + functionConfig.ResponseRegex = []string{`(?P\w+)\s*\((?P.*)\)`} + functionConfig.FunctionNameKey = "function" + results := ParseFunctionCall(input, functionConfig) + Expect(results).To(HaveLen(1)) + Expect(results[0].Name).To(Equal("add")) + Expect(results[0].Arguments).To(Equal(`{"x":5,"y":3}`)) + }) }) Context("when having invalid input", func() { @@ -53,7 +62,7 @@ var _ = Describe("LocalAI function parse tests", func() { Context("when parallel calls are enabled", func() { It("should handle multiple function calls", func() { - input := `[{"function": "add", "arguments": {"x": 5, "y": 3}}, {"function": "subtract", "arguments": {"x": 10, "y": 7}}]` + input := `[{"name": "add", "arguments": {"x": 5, "y": 3}}, {"name": "subtract", "arguments": {"x": 10, "y": 7}}]` results := ParseFunctionCall(input, functionConfig) Expect(results).To(HaveLen(2)) @@ -66,8 +75,8 @@ var _ = Describe("LocalAI function parse tests", func() { Context("without grammars and without regex", func() { It("should parse the function name and arguments correctly with the name key", func() { - input := `{"name": "add", "arguments": {"x": 5, "y": 3}}` - functionConfig.FunctionName = true + input := `{"function": "add", "arguments": {"x": 5, "y": 3}}` + functionConfig.FunctionNameKey = "function" results := ParseFunctionCall(input, functionConfig) Expect(results).To(HaveLen(1)) @@ -76,7 +85,7 @@ var _ = Describe("LocalAI function parse tests", func() { }) It("should parse the function name and arguments correctly with the function key", func() { - input := `{"function": "add", "arguments": {"x": 5, "y": 3}}` + input := `{"name": "add", "arguments": {"x": 5, "y": 3}}` results := ParseFunctionCall(input, functionConfig) Expect(results).To(HaveLen(1)) @@ -87,7 +96,7 @@ var _ = Describe("LocalAI function parse tests", func() { It("should parse the result by matching the JSONRegexMatch", func() { input := ` -{"function": "add", "arguments": {"x": 5, "y": 3}} +{"name": "add", "arguments": {"x": 5, "y": 3}} ` functionConfig.JSONRegexMatch = []string{`(?s)(.*?)`} @@ -100,7 +109,7 @@ var _ = Describe("LocalAI function parse tests", func() { It("should parse the result by matching the JSONRegexMatch", func() { input := ` -{"function": "add", "arguments": {"x": 5, "y": 3}} +{"name": "add", "arguments": {"x": 5, "y": 3}} ` functionConfig.JSONRegexMatch = []string{`(?s)(.*?)`} @@ -110,13 +119,21 @@ var _ = Describe("LocalAI function parse tests", func() { Expect(results[0].Name).To(Equal("add")) Expect(results[0].Arguments).To(Equal(`{"x":5,"y":3}`)) }) + + It("should parse the result even with invalid JSON", func() { + input := `{"name": "add", "arguments": {"x": 5, "y": 3}} invalid {"name": "add", "arguments": {"x": 5, "y": 3}}` + results := ParseFunctionCall(input, functionConfig) + Expect(results).To(HaveLen(2)) + Expect(results[0].Name).To(Equal("add")) + Expect(results[0].Arguments).To(Equal(`{"x":5,"y":3}`)) + }) }) Context("when using ReplaceResults to clean up input", func() { It("should replace text before and after JSON blob", func() { input := ` Some text before the JSON -{"function": "add", "arguments": {"x": 5, "y": 3}} +{"name": "add", "arguments": {"x": 5, "y": 3}} Some text after the JSON ` @@ -134,7 +151,7 @@ Some text after the JSON It("should replace text before and after array JSON blob", func() { input := ` Some text before the JSON -[{"function": "add", "arguments": {"x": 5, "y": 3}}, {"function": "subtract", "arguments": {"x": 10, "y": 7}}] +[{"name": "add", "arguments": {"x": 5, "y": 3}}, {"name": "subtract", "arguments": {"x": 10, "y": 7}}] Some text after the JSON ` functionConfig.ReplaceFunctionResults = []ReplaceResult{ @@ -153,7 +170,7 @@ Some text after the JSON It("should convert single-quoted key-value pairs to double-quoted and escape double quotes within values", func() { input := ` Some text before the JSON -{'function': '"add"', 'arguments': {'x': 5, 'z': '"v"', 'y': 'v"value"'}} +{'name': '"add"', 'arguments': {'x': 5, 'z': '"v"', 'y': 'v"value"'}} Some text after the JSON ` functionConfig.JSONRegexMatch = []string{`(?s)(.*?)`} @@ -186,7 +203,7 @@ Some text after the JSON It("should convert single-quoted key-value pairs to double-quoted and escape double quotes within values", func() { input := ` Some text before the JSON -{'function': '"add"', 'arguments': {'x': 5, 'z': '"v"', 'y': 'v"value"'}} +{'name': '"add"', 'arguments': {'x': 5, 'z': '"v"', 'y': 'v"value"'}} Some text after the JSON ` functionConfig.JSONRegexMatch = []string{`(?s)(.*?)`} @@ -219,8 +236,8 @@ Some text after the JSON It("should detect multiple functions call where the JSONRegexMatch is repeated", func() { input := ` Some text before the JSON -{"function": "add", "arguments": {"x": 5, "y": 3}} -{"function": "subtract", "arguments": {"x": 10, "y": 7}} +{"name": "add", "arguments": {"x": 5, "y": 3}} +{"name": "subtract", "arguments": {"x": 10, "y": 7}} Some text after the JSON ` functionConfig.JSONRegexMatch = []string{`(?s)(.*?)`} @@ -240,7 +257,7 @@ Some text after the JSON roses are red - {"function": "subtract", "arguments": {"x": 10, "y": 7}} + {"name": "subtract", "arguments": {"x": 10, "y": 7}} Some text after the JSON ` functionConfig.CaptureLLMResult = []string{`(?s)(.*?)`} @@ -251,7 +268,7 @@ roses are red It("Defaults to empty if doesn't catch any", func() { input := ` Some text before the JSON - {"function": "subtract", "arguments": {"x": 10, "y": 7}} + {"name": "subtract", "arguments": {"x": 10, "y": 7}} Some text after the JSON ` functionConfig.CaptureLLMResult = []string{`(?s)(.*?)`} @@ -259,4 +276,74 @@ roses are red Expect(results).To(Equal("")) }) }) + Context("ParseJSON - when given valid JSON strings", func() { + It("should parse multiple JSON objects", func() { + input := `{"key1": "value1"} {"key2": "value2"}` + expected := []map[string]any{ + {"key1": "value1"}, + {"key2": "value2"}, + } + result, err := ParseJSON(input) + Expect(err).NotTo(HaveOccurred()) + Expect(result).To(Equal(expected)) + }) + + It("should parse a single JSON object with various types", func() { + input := `{"key1": "value1", "key2": 2}` + expected := []map[string]any{ + {"key1": "value1", "key2": float64(2)}, + } + result, err := ParseJSON(input) + Expect(err).NotTo(HaveOccurred()) + Expect(result).To(Equal(expected)) + }) + It("should handle JSON without syntax errors gracefully", func() { + input := `{"key1": "value1"}` + expected := []map[string]any{ + {"key1": "value1"}, + } + result, err := ParseJSON(input) + Expect(err).NotTo(HaveOccurred()) + Expect(result).To(Equal(expected)) + }) + It("should handle JSON without syntax errors gracefully", func() { + input := `[{"key1": "value1"}]` + expected := []map[string]any{ + {"key1": "value1"}, + } + result, err := ParseJSON(input) + Expect(err).NotTo(HaveOccurred()) + Expect(result).To(Equal(expected)) + }) + }) + + Context("ParseJSON - when given invalid JSON strings", func() { + It("should return an error for completely invalid JSON", func() { + input := `invalid json` + result, err := ParseJSON(input) + Expect(err).To(HaveOccurred()) + Expect(result).To(BeNil()) + }) + + It("should skip invalid JSON parts and parse valid parts", func() { + input := `{"key1": "value1"} invalid {"key2": "value2"}` + expected := []map[string]any{ + {"key1": "value1"}, + {"key2": "value2"}, + } + result, err := ParseJSON(input) + Expect(err).NotTo(HaveOccurred()) + Expect(result).To(Equal(expected)) + }) + + PIt("should handle JSON with syntax errors gracefully", func() { + input := `{"key1": "value1", "key2": }` + expected := []map[string]any{ + {"key1": "value1"}, + } + result, err := ParseJSON(input) + Expect(err).NotTo(HaveOccurred()) + Expect(result).To(Equal(expected)) + }) + }) }) diff --git a/pkg/model/loader.go b/pkg/model/loader.go index c7159f7e..b2570c71 100644 --- a/pkg/model/loader.go +++ b/pkg/model/loader.go @@ -98,6 +98,9 @@ var knownModelsNameSuffixToSkip []string = []string{ ".yaml", ".yml", ".json", + ".txt", + ".md", + ".MD", ".DS_Store", ".", ".partial", diff --git a/scripts/latest_hf.py b/scripts/latest_hf.py new file mode 100644 index 00000000..b971a6bd --- /dev/null +++ b/scripts/latest_hf.py @@ -0,0 +1,35 @@ +## Gets latest GGUF models from HF: +## Example: +## local-ai run hermes-2-theta-llama-3-8b +## OPENAI_BASE_URL="http://192.168.xx.xx:8080" python scripts/latest_hf.py + +import requests +import subprocess +import os +import sys +# get current directory where the script is +current_dir = os.path.dirname(os.path.realpath(__file__)) + +def get_latest_model(): + search_term = "GGUF" + if len(sys.argv) > 2 and sys.argv[1]: + search_term = sys.argv[1] + url = "https://huggingface.co/api/models" + params = {"sort": "lastModified", "direction": -1, "limit": 30, "search": search_term} + response = requests.get(url, params=params) + + if response.status_code == 200: + models = response.json() + if models: + for model in models: + print(f"Model: {model['modelId']}") + subprocess.run(["python", current_dir+"/model_gallery_info.py", model['modelId']]) + + else: + print("No models found.") + else: + print(f"Failed to fetch models. Status code: {response.status_code}") + + +if __name__ == "__main__": + get_latest_model() diff --git a/scripts/model_gallery_info.py b/scripts/model_gallery_info.py new file mode 100644 index 00000000..7df53701 --- /dev/null +++ b/scripts/model_gallery_info.py @@ -0,0 +1,113 @@ +## This script simply help pull off some info from the HF api +## to speed up addition of new models to the gallery. +## It accepts as input a repo_id and returns part of the YAML data +## Use it as: +## OPENAI_BASE_URL="" OPENAI_MODEL="" python .github/add_model.py mradermacher/HaloMaidRP-v1.33-15B-L3-i1-GGUF +## Example: +# local-ai run hermes-2-theta-llama-3-8b +# OPENAI_BASE_URL="http://192.168.xx.xx:8080" OPENAI_MODEL="hermes-2-theta-llama-3-8b" python scripts/model_gallery_info.py mradermacher/HaloMaidRP-v1.33-15B-L3-i1-GGUF + +import sys +import os +from openai import OpenAI +from huggingface_hub import HfFileSystem, get_paths_info + +templated_yaml = """ +- !!merge <<: *llama3 + name: "{model_name}" + urls: + - https://huggingface.co/{repo_id} + description: | + {description} + overrides: + parameters: + model: {file_name} + files: + - filename: {file_name} + sha256: {checksum} + uri: huggingface://{repo_id}/{file_name} +""" + +client = OpenAI() + +model = os.environ.get("OPENAI_MODEL", "hermes-2-theta-llama-3-8b") + + +def summarize(text: str) -> str: + chat_completion = client.chat.completions.create( + messages=[ + { + "role": "user", + "content": "You are a bot which extracts the description of the LLM model from the following text. Return ONLY the description of the model, and nothing else.\n" + text, + }, + ], + model=model, + ) + + return chat_completion.choices[0].message.content + +def format_description(description): + return '\n '.join(description.split('\n')) + +# Example usage +if __name__ == "__main__": + # Get repoid from argv[0] + repo_id = sys.argv[1] + token = "" # Replace with your Hugging Face token if needed + + fs = HfFileSystem() + all_files = fs.ls(repo_id, detail=False) + + print(all_files) + + # Find a file that has Q4_K in the name + file_path = None + file_name = None + readmeFile = None + for file in all_files: + print(f"File found: {file}") + if "readme" in file.lower(): + readmeFile = file + print(f"Found README file: {readmeFile}") + if "q4_k_m" in file.lower(): + file_path = file + + + if file_path is None: + print("No file with Q4_K_M found, using the first file in the list.") + exit(1) + + + # Extract file from full path (is the last element) + if file_path is not None: + file_name = file_path.split("/")[-1] + + + model_name = repo_id.split("/")[-1] + + checksum = None + for file in get_paths_info(repo_id, [file_name], repo_type='model'): + try: + checksum = file.lfs.sha256 + break + except Exception as e: + print(f'Error from Hugging Face Hub: {str(e)}', file=sys.stderr) + sys.exit(2) + + print(checksum) + print(file_name) + print(file_path) + + summarized_readme = "" + + if readmeFile: + # If there is a README file, read it + readme = fs.read_text(readmeFile) + summarized_readme = summarize(readme) + summarized_readme = format_description(summarized_readme) + + print("Model correctly processed") + ## Append to the result YAML file + with open("result.yaml", "a") as f: + f.write(templated_yaml.format(model_name=model_name.lower().replace("-GGUF","").replace("-gguf",""), repo_id=repo_id, description=summarized_readme, file_name=file_name, checksum=checksum, file_path=file_path)) + \ No newline at end of file diff --git a/swagger/docs.go b/swagger/docs.go index 513a6dea..d5ffbc09 100644 --- a/swagger/docs.go +++ b/swagger/docs.go @@ -22,6 +22,250 @@ const docTemplate = `{ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { + "/api/p2p": { + "get": { + "summary": "Returns available P2P nodes", + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/schema.P2PNodesResponse" + } + } + } + } + } + }, + "/api/p2p/token": { + "get": { + "summary": "Show the P2P token", + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "string" + } + } + } + } + }, + "/backend/monitor": { + "get": { + "summary": "Backend monitor endpoint", + "parameters": [ + { + "description": "Backend statistics request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.BackendMonitorRequest" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/proto.StatusResponse" + } + } + } + } + }, + "/backend/shutdown": { + "post": { + "summary": "Backend monitor endpoint", + "parameters": [ + { + "description": "Backend statistics request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.BackendMonitorRequest" + } + } + ], + "responses": {} + } + }, + "/metrics": { + "get": { + "summary": "Prometheus metrics endpoint", + "parameters": [ + { + "description": "Gallery details", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/config.Gallery" + } + } + ], + "responses": {} + } + }, + "/models/apply": { + "post": { + "summary": "Install models to LocalAI.", + "parameters": [ + { + "description": "query params", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/localai.GalleryModel" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.GalleryResponse" + } + } + } + } + }, + "/models/available": { + "get": { + "summary": "List installable models.", + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/gallery.GalleryModel" + } + } + } + } + } + }, + "/models/delete/{name}": { + "post": { + "summary": "delete models to LocalAI.", + "parameters": [ + { + "type": "string", + "description": "Model name", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.GalleryResponse" + } + } + } + } + }, + "/models/galleries": { + "get": { + "summary": "List all Galleries", + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/config.Gallery" + } + } + } + } + }, + "post": { + "summary": "Adds a gallery in LocalAI", + "parameters": [ + { + "description": "Gallery details", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/config.Gallery" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/config.Gallery" + } + } + } + } + }, + "delete": { + "summary": "removes a gallery from LocalAI", + "parameters": [ + { + "description": "Gallery details", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/config.Gallery" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/config.Gallery" + } + } + } + } + } + }, + "/models/jobs": { + "get": { + "summary": "Returns all the jobs status progress", + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/gallery.GalleryOpStatus" + } + } + } + } + } + }, + "/models/jobs/{uuid}": { + "get": { + "summary": "Returns the job status", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/gallery.GalleryOpStatus" + } + } + } + } + }, "/tts": { "post": { "consumes": [ @@ -53,6 +297,46 @@ const docTemplate = `{ } }, "/v1/assistants": { + "get": { + "summary": "List available assistents", + "parameters": [ + { + "type": "integer", + "description": "Limit the number of assistants returned", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "description": "Order of assistants returned", + "name": "order", + "in": "query" + }, + { + "type": "string", + "description": "Return assistants created after the given ID", + "name": "after", + "in": "query" + }, + { + "type": "string", + "description": "Return assistants created before the given ID", + "name": "before", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/openai.Assistant" + } + } + } + } + }, "post": { "summary": "Create an assistant with a model and instructions.", "parameters": [ @@ -76,6 +360,30 @@ const docTemplate = `{ } } }, + "/v1/assistants/{assistant_id}": { + "get": { + "summary": "Get assistent data", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/openai.Assistant" + } + } + } + }, + "delete": { + "summary": "Delete assistents", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.DeleteAssistantResponse" + } + } + } + } + }, "/v1/audio/speech": { "post": { "consumes": [ @@ -189,6 +497,30 @@ const docTemplate = `{ } } }, + "/v1/edits": { + "post": { + "summary": "OpenAI edit endpoint", + "parameters": [ + { + "description": "query params", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.OpenAIRequest" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.OpenAIResponse" + } + } + } + } + }, "/v1/embeddings": { "post": { "summary": "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.", @@ -213,6 +545,19 @@ const docTemplate = `{ } } }, + "/v1/files": { + "get": { + "summary": "List files.", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.ListFiles" + } + } + } + } + }, "/v1/files/{file_id}": { "get": { "summary": "Returns information about a specific file.", @@ -220,7 +565,7 @@ const docTemplate = `{ "200": { "description": "Response", "schema": { - "$ref": "#/definitions/openai.File" + "$ref": "#/definitions/schema.File" } } } @@ -287,6 +632,30 @@ const docTemplate = `{ } } }, + "/v1/rerank": { + "post": { + "summary": "Reranks a list of phrases by relevance to a given text query.", + "parameters": [ + { + "description": "query params", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.JINARerankRequest" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.JINARerankResponse" + } + } + } + } + }, "/v1/text-to-speech/{voice-id}": { "post": { "summary": "Generates audio from the input text.", @@ -320,6 +689,17 @@ const docTemplate = `{ } }, "definitions": { + "config.Gallery": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, "functions.Argument": { "type": "object", "properties": { @@ -452,6 +832,179 @@ const docTemplate = `{ } } }, + "gallery.File": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "sha256": { + "type": "string" + }, + "uri": { + "type": "string" + } + } + }, + "gallery.GalleryModel": { + "type": "object", + "properties": { + "config_file": { + "description": "config_file is read in the situation where URL is blank - and therefore this is a base config.", + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "files": { + "description": "AdditionalFiles are used to add additional files to the model", + "type": "array", + "items": { + "$ref": "#/definitions/gallery.File" + } + }, + "gallery": { + "description": "Gallery is a reference to the gallery which contains the model", + "allOf": [ + { + "$ref": "#/definitions/config.Gallery" + } + ] + }, + "icon": { + "type": "string" + }, + "installed": { + "description": "Installed is used to indicate if the model is installed or not", + "type": "boolean" + }, + "license": { + "type": "string" + }, + "name": { + "type": "string" + }, + "overrides": { + "description": "Overrides are used to override the configuration of the model located at URL", + "type": "object", + "additionalProperties": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "url": { + "type": "string" + }, + "urls": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "gallery.GalleryOpStatus": { + "type": "object", + "properties": { + "deletion": { + "description": "Deletion is true if the operation is a deletion", + "type": "boolean" + }, + "downloaded_size": { + "type": "string" + }, + "error": {}, + "file_name": { + "type": "string" + }, + "file_size": { + "type": "string" + }, + "gallery_model_name": { + "type": "string" + }, + "message": { + "type": "string" + }, + "processed": { + "type": "boolean" + }, + "progress": { + "type": "number" + } + } + }, + "localai.GalleryModel": { + "type": "object", + "properties": { + "config_file": { + "description": "config_file is read in the situation where URL is blank - and therefore this is a base config.", + "type": "object", + "additionalProperties": true + }, + "config_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "files": { + "description": "AdditionalFiles are used to add additional files to the model", + "type": "array", + "items": { + "$ref": "#/definitions/gallery.File" + } + }, + "gallery": { + "description": "Gallery is a reference to the gallery which contains the model", + "allOf": [ + { + "$ref": "#/definitions/config.Gallery" + } + ] + }, + "icon": { + "type": "string" + }, + "id": { + "type": "string" + }, + "installed": { + "description": "Installed is used to indicate if the model is installed or not", + "type": "boolean" + }, + "license": { + "type": "string" + }, + "name": { + "type": "string" + }, + "overrides": { + "description": "Overrides are used to override the configuration of the model located at URL", + "type": "object", + "additionalProperties": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "url": { + "type": "string" + }, + "urls": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "openai.Assistant": { "type": "object", "properties": { @@ -555,7 +1108,127 @@ const docTemplate = `{ } } }, - "openai.File": { + "openai.Tool": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/openai.ToolType" + } + } + }, + "openai.ToolType": { + "type": "string", + "enum": [ + "code_interpreter", + "retrieval", + "function" + ], + "x-enum-varnames": [ + "CodeInterpreter", + "Retrieval", + "Function" + ] + }, + "p2p.NodeData": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "lastSeen": { + "type": "string" + }, + "name": { + "type": "string" + }, + "tunnelAddress": { + "type": "string" + } + } + }, + "proto.MemoryUsageData": { + "type": "object", + "properties": { + "breakdown": { + "type": "object", + "additionalProperties": { + "type": "integer" + } + }, + "total": { + "type": "integer" + } + } + }, + "proto.StatusResponse": { + "type": "object", + "properties": { + "memory": { + "$ref": "#/definitions/proto.MemoryUsageData" + }, + "state": { + "$ref": "#/definitions/proto.StatusResponse_State" + } + } + }, + "proto.StatusResponse_State": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + -1 + ], + "x-enum-varnames": [ + "StatusResponse_UNINITIALIZED", + "StatusResponse_BUSY", + "StatusResponse_READY", + "StatusResponse_ERROR" + ] + }, + "schema.BackendMonitorRequest": { + "type": "object", + "properties": { + "model": { + "type": "string" + } + } + }, + "schema.Choice": { + "type": "object", + "properties": { + "delta": { + "$ref": "#/definitions/schema.Message" + }, + "finish_reason": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "message": { + "$ref": "#/definitions/schema.Message" + }, + "text": { + "type": "string" + } + } + }, + "schema.DeleteAssistantResponse": { + "type": "object", + "properties": { + "deleted": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "object": { + "type": "string" + } + } + }, + "schema.File": { "type": "object", "properties": { "bytes": { @@ -584,47 +1257,6 @@ const docTemplate = `{ } } }, - "openai.Tool": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/openai.ToolType" - } - } - }, - "openai.ToolType": { - "type": "string", - "enum": [ - "code_interpreter", - "retrieval", - "function" - ], - "x-enum-varnames": [ - "CodeInterpreter", - "Retrieval", - "Function" - ] - }, - "schema.Choice": { - "type": "object", - "properties": { - "delta": { - "$ref": "#/definitions/schema.Message" - }, - "finish_reason": { - "type": "string" - }, - "index": { - "type": "integer" - }, - "message": { - "$ref": "#/definitions/schema.Message" - }, - "text": { - "type": "string" - } - } - }, "schema.FunctionCall": { "type": "object", "properties": { @@ -636,6 +1268,17 @@ const docTemplate = `{ } } }, + "schema.GalleryResponse": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "uuid": { + "type": "string" + } + } + }, "schema.Item": { "type": "object", "properties": { @@ -660,6 +1303,90 @@ const docTemplate = `{ } } }, + "schema.JINADocumentResult": { + "type": "object", + "properties": { + "document": { + "$ref": "#/definitions/schema.JINAText" + }, + "index": { + "type": "integer" + }, + "relevance_score": { + "type": "number" + } + } + }, + "schema.JINARerankRequest": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "items": { + "type": "string" + } + }, + "model": { + "type": "string" + }, + "query": { + "type": "string" + }, + "top_n": { + "type": "integer" + } + } + }, + "schema.JINARerankResponse": { + "type": "object", + "properties": { + "model": { + "type": "string" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/schema.JINADocumentResult" + } + }, + "usage": { + "$ref": "#/definitions/schema.JINAUsageInfo" + } + } + }, + "schema.JINAText": { + "type": "object", + "properties": { + "text": { + "type": "string" + } + } + }, + "schema.JINAUsageInfo": { + "type": "object", + "properties": { + "prompt_tokens": { + "type": "integer" + }, + "total_tokens": { + "type": "integer" + } + } + }, + "schema.ListFiles": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/schema.File" + } + }, + "object": { + "type": "string" + } + } + }, "schema.Message": { "type": "object", "properties": { @@ -931,6 +1658,23 @@ const docTemplate = `{ } } }, + "schema.P2PNodesResponse": { + "type": "object", + "properties": { + "federated_nodes": { + "type": "array", + "items": { + "$ref": "#/definitions/p2p.NodeData" + } + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/definitions/p2p.NodeData" + } + } + } + }, "schema.TTSRequest": { "description": "TTS request body", "type": "object", diff --git a/swagger/swagger.json b/swagger/swagger.json index aedfd438..71feb8bb 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -15,6 +15,250 @@ }, "basePath": "/", "paths": { + "/api/p2p": { + "get": { + "summary": "Returns available P2P nodes", + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/schema.P2PNodesResponse" + } + } + } + } + } + }, + "/api/p2p/token": { + "get": { + "summary": "Show the P2P token", + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "string" + } + } + } + } + }, + "/backend/monitor": { + "get": { + "summary": "Backend monitor endpoint", + "parameters": [ + { + "description": "Backend statistics request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.BackendMonitorRequest" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/proto.StatusResponse" + } + } + } + } + }, + "/backend/shutdown": { + "post": { + "summary": "Backend monitor endpoint", + "parameters": [ + { + "description": "Backend statistics request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.BackendMonitorRequest" + } + } + ], + "responses": {} + } + }, + "/metrics": { + "get": { + "summary": "Prometheus metrics endpoint", + "parameters": [ + { + "description": "Gallery details", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/config.Gallery" + } + } + ], + "responses": {} + } + }, + "/models/apply": { + "post": { + "summary": "Install models to LocalAI.", + "parameters": [ + { + "description": "query params", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/localai.GalleryModel" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.GalleryResponse" + } + } + } + } + }, + "/models/available": { + "get": { + "summary": "List installable models.", + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/gallery.GalleryModel" + } + } + } + } + } + }, + "/models/delete/{name}": { + "post": { + "summary": "delete models to LocalAI.", + "parameters": [ + { + "type": "string", + "description": "Model name", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.GalleryResponse" + } + } + } + } + }, + "/models/galleries": { + "get": { + "summary": "List all Galleries", + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/config.Gallery" + } + } + } + } + }, + "post": { + "summary": "Adds a gallery in LocalAI", + "parameters": [ + { + "description": "Gallery details", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/config.Gallery" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/config.Gallery" + } + } + } + } + }, + "delete": { + "summary": "removes a gallery from LocalAI", + "parameters": [ + { + "description": "Gallery details", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/config.Gallery" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/config.Gallery" + } + } + } + } + } + }, + "/models/jobs": { + "get": { + "summary": "Returns all the jobs status progress", + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/gallery.GalleryOpStatus" + } + } + } + } + } + }, + "/models/jobs/{uuid}": { + "get": { + "summary": "Returns the job status", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/gallery.GalleryOpStatus" + } + } + } + } + }, "/tts": { "post": { "consumes": [ @@ -46,6 +290,46 @@ } }, "/v1/assistants": { + "get": { + "summary": "List available assistents", + "parameters": [ + { + "type": "integer", + "description": "Limit the number of assistants returned", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "description": "Order of assistants returned", + "name": "order", + "in": "query" + }, + { + "type": "string", + "description": "Return assistants created after the given ID", + "name": "after", + "in": "query" + }, + { + "type": "string", + "description": "Return assistants created before the given ID", + "name": "before", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/openai.Assistant" + } + } + } + } + }, "post": { "summary": "Create an assistant with a model and instructions.", "parameters": [ @@ -69,6 +353,30 @@ } } }, + "/v1/assistants/{assistant_id}": { + "get": { + "summary": "Get assistent data", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/openai.Assistant" + } + } + } + }, + "delete": { + "summary": "Delete assistents", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.DeleteAssistantResponse" + } + } + } + } + }, "/v1/audio/speech": { "post": { "consumes": [ @@ -182,6 +490,30 @@ } } }, + "/v1/edits": { + "post": { + "summary": "OpenAI edit endpoint", + "parameters": [ + { + "description": "query params", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.OpenAIRequest" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.OpenAIResponse" + } + } + } + } + }, "/v1/embeddings": { "post": { "summary": "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.", @@ -206,6 +538,19 @@ } } }, + "/v1/files": { + "get": { + "summary": "List files.", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.ListFiles" + } + } + } + } + }, "/v1/files/{file_id}": { "get": { "summary": "Returns information about a specific file.", @@ -213,7 +558,7 @@ "200": { "description": "Response", "schema": { - "$ref": "#/definitions/openai.File" + "$ref": "#/definitions/schema.File" } } } @@ -280,6 +625,30 @@ } } }, + "/v1/rerank": { + "post": { + "summary": "Reranks a list of phrases by relevance to a given text query.", + "parameters": [ + { + "description": "query params", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.JINARerankRequest" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.JINARerankResponse" + } + } + } + } + }, "/v1/text-to-speech/{voice-id}": { "post": { "summary": "Generates audio from the input text.", @@ -313,6 +682,17 @@ } }, "definitions": { + "config.Gallery": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, "functions.Argument": { "type": "object", "properties": { @@ -445,6 +825,179 @@ } } }, + "gallery.File": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "sha256": { + "type": "string" + }, + "uri": { + "type": "string" + } + } + }, + "gallery.GalleryModel": { + "type": "object", + "properties": { + "config_file": { + "description": "config_file is read in the situation where URL is blank - and therefore this is a base config.", + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "files": { + "description": "AdditionalFiles are used to add additional files to the model", + "type": "array", + "items": { + "$ref": "#/definitions/gallery.File" + } + }, + "gallery": { + "description": "Gallery is a reference to the gallery which contains the model", + "allOf": [ + { + "$ref": "#/definitions/config.Gallery" + } + ] + }, + "icon": { + "type": "string" + }, + "installed": { + "description": "Installed is used to indicate if the model is installed or not", + "type": "boolean" + }, + "license": { + "type": "string" + }, + "name": { + "type": "string" + }, + "overrides": { + "description": "Overrides are used to override the configuration of the model located at URL", + "type": "object", + "additionalProperties": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "url": { + "type": "string" + }, + "urls": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "gallery.GalleryOpStatus": { + "type": "object", + "properties": { + "deletion": { + "description": "Deletion is true if the operation is a deletion", + "type": "boolean" + }, + "downloaded_size": { + "type": "string" + }, + "error": {}, + "file_name": { + "type": "string" + }, + "file_size": { + "type": "string" + }, + "gallery_model_name": { + "type": "string" + }, + "message": { + "type": "string" + }, + "processed": { + "type": "boolean" + }, + "progress": { + "type": "number" + } + } + }, + "localai.GalleryModel": { + "type": "object", + "properties": { + "config_file": { + "description": "config_file is read in the situation where URL is blank - and therefore this is a base config.", + "type": "object", + "additionalProperties": true + }, + "config_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "files": { + "description": "AdditionalFiles are used to add additional files to the model", + "type": "array", + "items": { + "$ref": "#/definitions/gallery.File" + } + }, + "gallery": { + "description": "Gallery is a reference to the gallery which contains the model", + "allOf": [ + { + "$ref": "#/definitions/config.Gallery" + } + ] + }, + "icon": { + "type": "string" + }, + "id": { + "type": "string" + }, + "installed": { + "description": "Installed is used to indicate if the model is installed or not", + "type": "boolean" + }, + "license": { + "type": "string" + }, + "name": { + "type": "string" + }, + "overrides": { + "description": "Overrides are used to override the configuration of the model located at URL", + "type": "object", + "additionalProperties": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "url": { + "type": "string" + }, + "urls": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "openai.Assistant": { "type": "object", "properties": { @@ -548,7 +1101,127 @@ } } }, - "openai.File": { + "openai.Tool": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/openai.ToolType" + } + } + }, + "openai.ToolType": { + "type": "string", + "enum": [ + "code_interpreter", + "retrieval", + "function" + ], + "x-enum-varnames": [ + "CodeInterpreter", + "Retrieval", + "Function" + ] + }, + "p2p.NodeData": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "lastSeen": { + "type": "string" + }, + "name": { + "type": "string" + }, + "tunnelAddress": { + "type": "string" + } + } + }, + "proto.MemoryUsageData": { + "type": "object", + "properties": { + "breakdown": { + "type": "object", + "additionalProperties": { + "type": "integer" + } + }, + "total": { + "type": "integer" + } + } + }, + "proto.StatusResponse": { + "type": "object", + "properties": { + "memory": { + "$ref": "#/definitions/proto.MemoryUsageData" + }, + "state": { + "$ref": "#/definitions/proto.StatusResponse_State" + } + } + }, + "proto.StatusResponse_State": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + -1 + ], + "x-enum-varnames": [ + "StatusResponse_UNINITIALIZED", + "StatusResponse_BUSY", + "StatusResponse_READY", + "StatusResponse_ERROR" + ] + }, + "schema.BackendMonitorRequest": { + "type": "object", + "properties": { + "model": { + "type": "string" + } + } + }, + "schema.Choice": { + "type": "object", + "properties": { + "delta": { + "$ref": "#/definitions/schema.Message" + }, + "finish_reason": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "message": { + "$ref": "#/definitions/schema.Message" + }, + "text": { + "type": "string" + } + } + }, + "schema.DeleteAssistantResponse": { + "type": "object", + "properties": { + "deleted": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "object": { + "type": "string" + } + } + }, + "schema.File": { "type": "object", "properties": { "bytes": { @@ -577,47 +1250,6 @@ } } }, - "openai.Tool": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/openai.ToolType" - } - } - }, - "openai.ToolType": { - "type": "string", - "enum": [ - "code_interpreter", - "retrieval", - "function" - ], - "x-enum-varnames": [ - "CodeInterpreter", - "Retrieval", - "Function" - ] - }, - "schema.Choice": { - "type": "object", - "properties": { - "delta": { - "$ref": "#/definitions/schema.Message" - }, - "finish_reason": { - "type": "string" - }, - "index": { - "type": "integer" - }, - "message": { - "$ref": "#/definitions/schema.Message" - }, - "text": { - "type": "string" - } - } - }, "schema.FunctionCall": { "type": "object", "properties": { @@ -629,6 +1261,17 @@ } } }, + "schema.GalleryResponse": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "uuid": { + "type": "string" + } + } + }, "schema.Item": { "type": "object", "properties": { @@ -653,6 +1296,90 @@ } } }, + "schema.JINADocumentResult": { + "type": "object", + "properties": { + "document": { + "$ref": "#/definitions/schema.JINAText" + }, + "index": { + "type": "integer" + }, + "relevance_score": { + "type": "number" + } + } + }, + "schema.JINARerankRequest": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "items": { + "type": "string" + } + }, + "model": { + "type": "string" + }, + "query": { + "type": "string" + }, + "top_n": { + "type": "integer" + } + } + }, + "schema.JINARerankResponse": { + "type": "object", + "properties": { + "model": { + "type": "string" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/schema.JINADocumentResult" + } + }, + "usage": { + "$ref": "#/definitions/schema.JINAUsageInfo" + } + } + }, + "schema.JINAText": { + "type": "object", + "properties": { + "text": { + "type": "string" + } + } + }, + "schema.JINAUsageInfo": { + "type": "object", + "properties": { + "prompt_tokens": { + "type": "integer" + }, + "total_tokens": { + "type": "integer" + } + } + }, + "schema.ListFiles": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/schema.File" + } + }, + "object": { + "type": "string" + } + } + }, "schema.Message": { "type": "object", "properties": { @@ -924,6 +1651,23 @@ } } }, + "schema.P2PNodesResponse": { + "type": "object", + "properties": { + "federated_nodes": { + "type": "array", + "items": { + "$ref": "#/definitions/p2p.NodeData" + } + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/definitions/p2p.NodeData" + } + } + } + }, "schema.TTSRequest": { "description": "TTS request body", "type": "object", diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 9c23c811..e40ef119 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -1,5 +1,12 @@ basePath: / definitions: + config.Gallery: + properties: + name: + type: string + url: + type: string + type: object functions.Argument: properties: properties: @@ -86,6 +93,126 @@ definitions: type: type: string type: object + gallery.File: + properties: + filename: + type: string + sha256: + type: string + uri: + type: string + type: object + gallery.GalleryModel: + properties: + config_file: + additionalProperties: true + description: config_file is read in the situation where URL is blank - and + therefore this is a base config. + type: object + description: + type: string + files: + description: AdditionalFiles are used to add additional files to the model + items: + $ref: '#/definitions/gallery.File' + type: array + gallery: + allOf: + - $ref: '#/definitions/config.Gallery' + description: Gallery is a reference to the gallery which contains the model + icon: + type: string + installed: + description: Installed is used to indicate if the model is installed or not + type: boolean + license: + type: string + name: + type: string + overrides: + additionalProperties: true + description: Overrides are used to override the configuration of the model + located at URL + type: object + tags: + items: + type: string + type: array + url: + type: string + urls: + items: + type: string + type: array + type: object + gallery.GalleryOpStatus: + properties: + deletion: + description: Deletion is true if the operation is a deletion + type: boolean + downloaded_size: + type: string + error: {} + file_name: + type: string + file_size: + type: string + gallery_model_name: + type: string + message: + type: string + processed: + type: boolean + progress: + type: number + type: object + localai.GalleryModel: + properties: + config_file: + additionalProperties: true + description: config_file is read in the situation where URL is blank - and + therefore this is a base config. + type: object + config_url: + type: string + description: + type: string + files: + description: AdditionalFiles are used to add additional files to the model + items: + $ref: '#/definitions/gallery.File' + type: array + gallery: + allOf: + - $ref: '#/definitions/config.Gallery' + description: Gallery is a reference to the gallery which contains the model + icon: + type: string + id: + type: string + installed: + description: Installed is used to indicate if the model is installed or not + type: boolean + license: + type: string + name: + type: string + overrides: + additionalProperties: true + description: Overrides are used to override the configuration of the model + located at URL + type: object + tags: + items: + type: string + type: array + url: + type: string + urls: + items: + type: string + type: array + type: object openai.Assistant: properties: created: @@ -157,7 +284,88 @@ definitions: object: type: string type: object - openai.File: + openai.Tool: + properties: + type: + $ref: '#/definitions/openai.ToolType' + type: object + openai.ToolType: + enum: + - code_interpreter + - retrieval + - function + type: string + x-enum-varnames: + - CodeInterpreter + - Retrieval + - Function + p2p.NodeData: + properties: + id: + type: string + lastSeen: + type: string + name: + type: string + tunnelAddress: + type: string + type: object + proto.MemoryUsageData: + properties: + breakdown: + additionalProperties: + type: integer + type: object + total: + type: integer + type: object + proto.StatusResponse: + properties: + memory: + $ref: '#/definitions/proto.MemoryUsageData' + state: + $ref: '#/definitions/proto.StatusResponse_State' + type: object + proto.StatusResponse_State: + enum: + - 0 + - 1 + - 2 + - -1 + type: integer + x-enum-varnames: + - StatusResponse_UNINITIALIZED + - StatusResponse_BUSY + - StatusResponse_READY + - StatusResponse_ERROR + schema.BackendMonitorRequest: + properties: + model: + type: string + type: object + schema.Choice: + properties: + delta: + $ref: '#/definitions/schema.Message' + finish_reason: + type: string + index: + type: integer + message: + $ref: '#/definitions/schema.Message' + text: + type: string + type: object + schema.DeleteAssistantResponse: + properties: + deleted: + type: boolean + id: + type: string + object: + type: string + type: object + schema.File: properties: bytes: description: Size of the file in bytes @@ -179,34 +387,6 @@ definitions: etc.) type: string type: object - openai.Tool: - properties: - type: - $ref: '#/definitions/openai.ToolType' - type: object - openai.ToolType: - enum: - - code_interpreter - - retrieval - - function - type: string - x-enum-varnames: - - CodeInterpreter - - Retrieval - - Function - schema.Choice: - properties: - delta: - $ref: '#/definitions/schema.Message' - finish_reason: - type: string - index: - type: integer - message: - $ref: '#/definitions/schema.Message' - text: - type: string - type: object schema.FunctionCall: properties: arguments: @@ -214,6 +394,13 @@ definitions: name: type: string type: object + schema.GalleryResponse: + properties: + status: + type: string + uuid: + type: string + type: object schema.Item: properties: b64_json: @@ -230,6 +417,60 @@ definitions: description: Images type: string type: object + schema.JINADocumentResult: + properties: + document: + $ref: '#/definitions/schema.JINAText' + index: + type: integer + relevance_score: + type: number + type: object + schema.JINARerankRequest: + properties: + documents: + items: + type: string + type: array + model: + type: string + query: + type: string + top_n: + type: integer + type: object + schema.JINARerankResponse: + properties: + model: + type: string + results: + items: + $ref: '#/definitions/schema.JINADocumentResult' + type: array + usage: + $ref: '#/definitions/schema.JINAUsageInfo' + type: object + schema.JINAText: + properties: + text: + type: string + type: object + schema.JINAUsageInfo: + properties: + prompt_tokens: + type: integer + total_tokens: + type: integer + type: object + schema.ListFiles: + properties: + data: + items: + $ref: '#/definitions/schema.File' + type: array + object: + type: string + type: object schema.Message: properties: content: @@ -418,6 +659,17 @@ definitions: total_tokens: type: integer type: object + schema.P2PNodesResponse: + properties: + federated_nodes: + items: + $ref: '#/definitions/p2p.NodeData' + type: array + nodes: + items: + $ref: '#/definitions/p2p.NodeData' + type: array + type: object schema.TTSRequest: description: TTS request body properties: @@ -458,6 +710,160 @@ info: title: LocalAI API version: 2.0.0 paths: + /api/p2p: + get: + responses: + "200": + description: Response + schema: + items: + $ref: '#/definitions/schema.P2PNodesResponse' + type: array + summary: Returns available P2P nodes + /api/p2p/token: + get: + responses: + "200": + description: Response + schema: + type: string + summary: Show the P2P token + /backend/monitor: + get: + parameters: + - description: Backend statistics request + in: body + name: request + required: true + schema: + $ref: '#/definitions/schema.BackendMonitorRequest' + responses: + "200": + description: Response + schema: + $ref: '#/definitions/proto.StatusResponse' + summary: Backend monitor endpoint + /backend/shutdown: + post: + parameters: + - description: Backend statistics request + in: body + name: request + required: true + schema: + $ref: '#/definitions/schema.BackendMonitorRequest' + responses: {} + summary: Backend monitor endpoint + /metrics: + get: + parameters: + - description: Gallery details + in: body + name: request + required: true + schema: + $ref: '#/definitions/config.Gallery' + responses: {} + summary: Prometheus metrics endpoint + /models/apply: + post: + parameters: + - description: query params + in: body + name: request + required: true + schema: + $ref: '#/definitions/localai.GalleryModel' + responses: + "200": + description: Response + schema: + $ref: '#/definitions/schema.GalleryResponse' + summary: Install models to LocalAI. + /models/available: + get: + responses: + "200": + description: Response + schema: + items: + $ref: '#/definitions/gallery.GalleryModel' + type: array + summary: List installable models. + /models/delete/{name}: + post: + parameters: + - description: Model name + in: path + name: name + required: true + type: string + responses: + "200": + description: Response + schema: + $ref: '#/definitions/schema.GalleryResponse' + summary: delete models to LocalAI. + /models/galleries: + delete: + parameters: + - description: Gallery details + in: body + name: request + required: true + schema: + $ref: '#/definitions/config.Gallery' + responses: + "200": + description: Response + schema: + items: + $ref: '#/definitions/config.Gallery' + type: array + summary: removes a gallery from LocalAI + get: + responses: + "200": + description: Response + schema: + items: + $ref: '#/definitions/config.Gallery' + type: array + summary: List all Galleries + post: + parameters: + - description: Gallery details + in: body + name: request + required: true + schema: + $ref: '#/definitions/config.Gallery' + responses: + "200": + description: Response + schema: + items: + $ref: '#/definitions/config.Gallery' + type: array + summary: Adds a gallery in LocalAI + /models/jobs: + get: + responses: + "200": + description: Response + schema: + additionalProperties: + $ref: '#/definitions/gallery.GalleryOpStatus' + type: object + summary: Returns all the jobs status progress + /models/jobs/{uuid}: + get: + responses: + "200": + description: Response + schema: + $ref: '#/definitions/gallery.GalleryOpStatus' + summary: Returns the job status /tts: post: consumes: @@ -478,6 +884,32 @@ paths: type: string summary: Generates audio from the input text. /v1/assistants: + get: + parameters: + - description: Limit the number of assistants returned + in: query + name: limit + type: integer + - description: Order of assistants returned + in: query + name: order + type: string + - description: Return assistants created after the given ID + in: query + name: after + type: string + - description: Return assistants created before the given ID + in: query + name: before + type: string + responses: + "200": + description: Response + schema: + items: + $ref: '#/definitions/openai.Assistant' + type: array + summary: List available assistents post: parameters: - description: query params @@ -492,6 +924,21 @@ paths: schema: $ref: '#/definitions/openai.Assistant' summary: Create an assistant with a model and instructions. + /v1/assistants/{assistant_id}: + delete: + responses: + "200": + description: Response + schema: + $ref: '#/definitions/schema.DeleteAssistantResponse' + summary: Delete assistents + get: + responses: + "200": + description: Response + schema: + $ref: '#/definitions/openai.Assistant' + summary: Get assistent data /v1/audio/speech: post: consumes: @@ -564,6 +1011,21 @@ paths: schema: $ref: '#/definitions/schema.OpenAIResponse' summary: Generate completions for a given prompt and model. + /v1/edits: + post: + parameters: + - description: query params + in: body + name: request + required: true + schema: + $ref: '#/definitions/schema.OpenAIRequest' + responses: + "200": + description: Response + schema: + $ref: '#/definitions/schema.OpenAIResponse' + summary: OpenAI edit endpoint /v1/embeddings: post: parameters: @@ -580,6 +1042,14 @@ paths: $ref: '#/definitions/schema.OpenAIResponse' summary: Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. + /v1/files: + get: + responses: + "200": + description: Response + schema: + $ref: '#/definitions/schema.ListFiles' + summary: List files. /v1/files/{file_id}: delete: responses: @@ -593,7 +1063,7 @@ paths: "200": description: Response schema: - $ref: '#/definitions/openai.File' + $ref: '#/definitions/schema.File' summary: Returns information about a specific file. /v1/files/{file_id}/content: get: @@ -626,6 +1096,21 @@ paths: schema: $ref: '#/definitions/schema.ModelsDataResponse' summary: List and describe the various models available in the API. + /v1/rerank: + post: + parameters: + - description: query params + in: body + name: request + required: true + schema: + $ref: '#/definitions/schema.JINARerankRequest' + responses: + "200": + description: Response + schema: + $ref: '#/definitions/schema.JINARerankResponse' + summary: Reranks a list of phrases by relevance to a given text query. /v1/text-to-speech/{voice-id}: post: parameters: