Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: janhq/cortex.cpp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.3-rc1
Choose a base ref
...
head repository: janhq/cortex.cpp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dev
Choose a head ref

Commits on Nov 8, 2024

  1. docs: add cors docs

    namchuai committed Nov 8, 2024
    Copy the full SHA
    ed39e16 View commit details

Commits on Nov 11, 2024

  1. Copy the full SHA
    65547d5 View commit details

Commits on Nov 15, 2024

  1. Copy the full SHA
    ba4c625 View commit details
  2. chore: CORS CLI doc

    gabrielle-ong committed Nov 15, 2024
    Copy the full SHA
    0075e5f View commit details
  3. Copy the full SHA
    7e1dd01 View commit details

Commits on Nov 16, 2024

  1. Copy the full SHA
    3c7022c View commit details

Commits on Nov 17, 2024

  1. Merge pull request #1693 from paopa/chore/update-readme-for-running-b…

    …uilt-in-model-command
    
    chore: update the wrong command for running built-in models
    namchuai authored Nov 17, 2024
    Copy the full SHA
    7bf3f8f View commit details

Commits on Nov 18, 2024

  1. Merge pull request #1691 from janhq/docs/v1.0.3-docs

    Docs/v1.0.3 docs CORS
    gabrielle-ong authored Nov 18, 2024
    Copy the full SHA
    2a8f187 View commit details
  2. Merge pull request #1652 from janhq/j/add-docs-cors

    docs: add cors docs
    namchuai authored Nov 18, 2024
    Copy the full SHA
    6892823 View commit details
  3. feat: add proxy support

    namchuai committed Nov 18, 2024
    Copy the full SHA
    824de03 View commit details
  4. Update API references

    namchuai committed Nov 18, 2024
    Copy the full SHA
    e95ca37 View commit details
  5. Merge pull request #1696 from janhq/dev

    Chore: Sync dev to main
    hiento09 authored Nov 18, 2024
    Copy the full SHA
    8d60c95 View commit details
  6. Add CLI support

    namchuai committed Nov 18, 2024
    Copy the full SHA
    b95b857 View commit details
  7. Merge pull request #1695 from janhq/j/add-proxy-support

    feat: add proxy support
    namchuai authored Nov 18, 2024
    Copy the full SHA
    0ffe3d4 View commit details
  8. docs: add proxy docs

    namchuai committed Nov 18, 2024
    Copy the full SHA
    640d66a View commit details

Commits on Nov 19, 2024

  1. feat: linux install script (#1701)

    Co-authored-by: Hien To <tominhhien97@gmail.com>
    hiento09 and hiento09 authored Nov 19, 2024
    Copy the full SHA
    70e25b7 View commit details
  2. Merge pull request #1702 from janhq/dev

    Sync dev to main
    hiento09 authored Nov 19, 2024
    Copy the full SHA
    3932539 View commit details
  3. Copy the full SHA
    81592d8 View commit details
  4. Merge pull request #1700 from janhq/j/proxy-docs

    docs: add proxy docs
    namchuai authored Nov 19, 2024
    Copy the full SHA
    53cfc42 View commit details
  5. feat: install script for linux (#1677)

    * feat: install script for linux
    
    * feat: linux bash install script support both .deb and binary
    
    * docs: update installation instruction for linux
    
    * fix: update updater to support install by bash script
    
    * chore: hardcode url for stable and beta
    
    * fix: update download url
    
    * chore: add warning for cortex update linux docs
    
    ---------
    
    Co-authored-by: Hien To <tominhhien97@gmail.com>
    Co-authored-by: vansangpfiev <sang@jan.ai>
    3 people authored Nov 19, 2024
    Copy the full SHA
    9ff93c5 View commit details
  6. feat: API to configure huggingface_token (#1699)

    * feat: API for configuring huggingface token
    
    * chore: API docs
    
    * chore: Token docs
    
    * chore: docs
    
    ---------
    
    Co-authored-by: vansangpfiev <sang@jan.ai>
    vansangpfiev and sangjanai authored Nov 19, 2024
    Copy the full SHA
    37fecbd View commit details
  7. Merge pull request #1704 from janhq/dev

    sync dev to main 1.0.3-rc1
    hiento09 authored Nov 19, 2024
    Copy the full SHA
    bc217f3 View commit details
  8. Copy the full SHA
    a5b704c View commit details
  9. fix: log level does not work for macOS (#1703)

    * feat: API for configuring huggingface token
    
    * chore: API docs
    
    * chore: Token docs
    
    * chore: docs
    
    * fix: log level
    
    * fix: logging issue
    
    ---------
    
    Co-authored-by: vansangpfiev <sang@jan.ai>
    vansangpfiev and sangjanai authored Nov 19, 2024
    Copy the full SHA
    e5e506a View commit details
  10. fix: bypass check model id if llama_model_path exists (#1706)

    * fix: bypass check model id if llama_model_path exists
    
    * fix: correct logic
    
    * fix: check db first
    
    ---------
    
    Co-authored-by: vansangpfiev <sang@jan.ai>
    vansangpfiev and sangjanai authored Nov 19, 2024
    Copy the full SHA
    e57f80c View commit details
  11. some improvement

    namchuai committed Nov 19, 2024
    Copy the full SHA
    339459e View commit details
  12. fix: cortexrc race condition (#1707)

    Co-authored-by: vansangpfiev <sang@jan.ai>
    vansangpfiev and sangjanai authored Nov 19, 2024
    Copy the full SHA
    027002f View commit details
  13. Merge pull request #1708 from janhq/dev

    Sync dev to main 1.0.3-rc4
    hiento09 authored Nov 19, 2024
    Copy the full SHA
    7938c34 View commit details
  14. fix: windows

    Signed-off-by: James <namnh0122@gmail.com>
    namchuai committed Nov 19, 2024
    Copy the full SHA
    bb69b4e View commit details
  15. fix: linux

    Signed-off-by: James <namnh0122@gmail.com>
    namchuai committed Nov 19, 2024
    Copy the full SHA
    33fea02 View commit details
  16. fix: linux

    Signed-off-by: James <namnh0122@gmail.com>
    namchuai committed Nov 19, 2024
    Copy the full SHA
    32cc072 View commit details
  17. Copy the full SHA
    b8210a9 View commit details

Commits on Nov 20, 2024

  1. update

    namchuai committed Nov 20, 2024
    Copy the full SHA
    f253c0b View commit details
  2. fix: use user setup folder path (#1710)

    * fix: use user setup folder path
    
    * chore: disable docker test
    
    * fix: override data folder path if it is configured
    
    * fix: CI
    
    ---------
    
    Co-authored-by: vansangpfiev <sang@jan.ai>
    vansangpfiev and sangjanai authored Nov 20, 2024
    Copy the full SHA
    f5c3b02 View commit details
  3. fix build

    Signed-off-by: James <namnh0122@gmail.com>
    namchuai committed Nov 20, 2024
    Copy the full SHA
    53e2d51 View commit details
  4. fix build windows

    Signed-off-by: James <namnh0122@gmail.com>
    namchuai committed Nov 20, 2024
    Copy the full SHA
    f4e6e50 View commit details
  5. fix ci

    Signed-off-by: James <namnh0122@gmail.com>
    namchuai committed Nov 20, 2024
    Copy the full SHA
    63e6a29 View commit details
  6. update

    namchuai committed Nov 20, 2024
    Copy the full SHA
    a1a7ce2 View commit details
  7. fix linux

    Signed-off-by: James <namnh0122@gmail.com>
    namchuai committed Nov 20, 2024
    Copy the full SHA
    8c4b046 View commit details
  8. Merge pull request #1712 from janhq/chore/release-1.0.3

    sync dev to main for release 1.0.3
    hiento09 authored Nov 20, 2024
    Copy the full SHA
    9725403 View commit details
  9. fix windows

    Signed-off-by: James <namnh0122@gmail.com>
    namchuai committed Nov 20, 2024
    Copy the full SHA
    e77d439 View commit details

Commits on Nov 21, 2024

  1. Merge pull request #1705 from janhq/j/add-file-watcher

    feat: add file watcher service
    namchuai authored Nov 21, 2024
    Copy the full SHA
    afe556d View commit details
  2. Copy the full SHA
    4c7d4f3 View commit details
  3. chore: update engine API

    namchuai committed Nov 21, 2024
    Copy the full SHA
    26761a8 View commit details

Commits on Nov 22, 2024

  1. Merge pull request #1698 from janhq/j/update-engine-api

    chore: update engine API
    namchuai authored Nov 22, 2024
    Copy the full SHA
    16e7c00 View commit details
  2. fix: set progress bar width base on terminal width (#1713)

    * fix: set progress bar width base on terminal width
    
    * chore: CI
    
    * fix: CI
    
    ---------
    
    Co-authored-by: vansangpfiev <sang@jan.ai>
    vansangpfiev and sangjanai authored Nov 22, 2024
    Copy the full SHA
    8db7e9c View commit details

Commits on Nov 24, 2024

  1. Copy the full SHA
    64d99d8 View commit details

Commits on Nov 25, 2024

  1. feat: data migration (#1692)

    * feat: add schema_version
    
    * temp
    
    * feat: data migration
    
    * fix: unit tests
    
    * fix: logic
    
    * fix: clean
    
    * fix: comments
    
    ---------
    
    Co-authored-by: vansangpfiev <sang@jan.ai>
    vansangpfiev and sangjanai authored Nov 25, 2024
    Copy the full SHA
    adfbda1 View commit details
  2. Copy the full SHA
    c507569 View commit details
  3. chore: docker e2e testing run on selfhosted runner (#1709)

    * chore: docker e2e testing run on selfhosted runner
    
    * chore: Dockerfile with vcpkg cache
    
    ---------
    
    Co-authored-by: Hien To <tominhhien97@gmail.com>
    hiento09 and hiento09 authored Nov 25, 2024
    Copy the full SHA
    aa51b45 View commit details
Showing 368 changed files with 44,897 additions and 7,566 deletions.
18 changes: 18 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM mcr.microsoft.com/devcontainers/cpp:1-ubuntu-24.04

ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="none"

# Optionally install the cmake for vcpkg
COPY ./reinstall-cmake.sh /tmp/

RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \
chmod +x /tmp/reinstall-cmake.sh && /tmp/reinstall-cmake.sh ${REINSTALL_CMAKE_VERSION_FROM_SOURCE}; \
fi \
&& rm -f /tmp/reinstall-cmake.sh

# [Optional] Uncomment this section to install additional vcpkg ports.
# RUN su vscode -c "${VCPKG_ROOT}/vcpkg install <your-port-name-here>"

# [Optional] Uncomment this section to install additional packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
35 changes: 35 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
{
"hostRequirements": {
"cpus": 4,
"memory": "8gb",
"storage": "32gb"
},
"name": "C++",
"build": {
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/stuartleeks/dev-container-features/shell-history:0": {},
"ghcr.io/sebst/devcontainer-features/pkgx:1": {},
"ghcr.io/devcontainers-extra/features/apt-packages:1": {
"clean_ppas": true,
"preserve_apt_list": true,
"packages": "build-essential linux-libc-dev",
"ppas": "ppa:deadsnakes/ppa"
}
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "git submodule update --init",
// Use 'postAttachCommand' to run commands after the container is attached.
"postAttachCommand": "pkgx install npx && npx -y runme run --filename README.md -t devcontainer -y"
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
59 changes: 59 additions & 0 deletions .devcontainer/reinstall-cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/env bash
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
#
set -e

CMAKE_VERSION=${1:-"none"}

if [ "${CMAKE_VERSION}" = "none" ]; then
echo "No CMake version specified, skipping CMake reinstallation"
exit 0
fi

# Cleanup temporary directory and associated files when exiting the script.
cleanup() {
EXIT_CODE=$?
set +e
if [[ -n "${TMP_DIR}" ]]; then
echo "Executing cleanup of tmp files"
rm -Rf "${TMP_DIR}"
fi
exit $EXIT_CODE
}
trap cleanup EXIT


echo "Installing CMake..."
apt-get -y purge --auto-remove cmake
mkdir -p /opt/cmake

architecture=$(dpkg --print-architecture)
case "${architecture}" in
arm64)
ARCH=aarch64 ;;
amd64)
ARCH=x86_64 ;;
*)
echo "Unsupported architecture ${architecture}."
exit 1
;;
esac

CMAKE_BINARY_NAME="cmake-${CMAKE_VERSION}-linux-${ARCH}.sh"
CMAKE_CHECKSUM_NAME="cmake-${CMAKE_VERSION}-SHA-256.txt"
TMP_DIR=$(mktemp -d -t cmake-XXXXXXXXXX)

echo "${TMP_DIR}"
cd "${TMP_DIR}"

curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_BINARY_NAME}" -O
curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_CHECKSUM_NAME}" -O

sha256sum -c --ignore-missing "${CMAKE_CHECKSUM_NAME}"
sh "${TMP_DIR}/${CMAKE_BINARY_NAME}" --prefix=/opt/cmake --skip-license

ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
ln -s /opt/cmake/bin/ctest /usr/local/bin/ctest
52 changes: 48 additions & 4 deletions .github/ISSUE_TEMPLATE/epic-request.md
Original file line number Diff line number Diff line change
@@ -6,12 +6,56 @@ labels: 'type: epic'
assignees: ''

---
## Goal

**Problem**

## Success Criteria

**Success Criteria**
-

**Tasklist**
## Tasklist
- [ ]

## API / CLI Documentation
### API
#### 1. Feature
```
GET /v1/endpoint
```

Body:
```json
{
"key": "value"
}
```
**Response**
```json
200
{
}
Error
{
}
```

### CLI
#### 1. Feature
```
GET /v1/endpoint
```
Response:
```
```
#### Help Command
```
❯ cortex ...
Usage:
cortex [options] [subcommand]
Options:
-h,--help Print this help message and exit
... ...
Subcommands:
start Start a model by ID
... ...
```
28 changes: 24 additions & 4 deletions .github/workflows/beta-build.yml
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ jobs:
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}

build-linux-x64:
uses: ./.github/workflows/template-build-linux-x64.yml
uses: ./.github/workflows/template-build-linux.yml
secrets: inherit
needs: [get-update-version, create-draft-release, get-cortex-llamacpp-latest-version]
with:
@@ -79,6 +79,22 @@ jobs:
channel: beta
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
arch: amd64

build-linux-arm64:
uses: ./.github/workflows/template-build-linux.yml
secrets: inherit
needs: [get-update-version, create-draft-release, get-cortex-llamacpp-latest-version]
with:
ref: ${{ github.ref }}
public_provider: github
new_version: ${{ needs.get-update-version.outputs.new_version }}
runs-on: ubuntu-2004-arm64
cmake-flags: "-DCORTEX_VARIANT=beta -DCORTEX_CPP_VERSION='v${{ needs.get-update-version.outputs.new_version }}' -DCMAKE_TOOLCHAIN_FILE=/home/runner/actions-runner/_work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
channel: beta
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
arch: arm64

build-docker-x64:
uses: ./.github/workflows/template-build-docker-x64.yml
@@ -111,7 +127,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

noti-discord:
needs: [get-update-version, create-draft-release, build-macos, build-windows-x64, build-linux-x64, update_release]
needs: [get-update-version, create-draft-release, build-macos, build-windows-x64, build-linux-x64, build-linux-arm64, update_release]
runs-on: ubuntu-latest
permissions:
contents: write
@@ -136,9 +152,13 @@ jobs:
- Network Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-mac-universal-network-installer.pkg
- Local Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-mac-universal-local-installer.pkg
- Binary: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-mac-universal.tar.gz
- Linux Deb:
- Linux amd64 Deb:
- Network Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-linux-amd64-network-installer.deb
- Local Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-linux-amd64-local-installer.deb
- Binary: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-linux-amd64.tar.gz
- Linux arm64 Deb:
- Network Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-linux-arm64-network-installer.deb
- Local Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-linux-arm64-local-installer.deb
- Binary: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-linux-arm64.tar.gz
- Docker: menloltd/cortex:beta-${{ env.VERSION }}
- Github Release: https://github.com/janhq/cortex.cpp/releases/tag/v${{ env.VERSION }}
- Github Release: https://github.com/janhq/cortex.cpp/releases/tag/v${{ env.VERSION }}
Loading