chore: sync dev to main by vansangpfiev · Pull Request #2178 · janhq/cortex.cpp

and others added 30 commits

February 27, 2025 12:22
* Enhancement: Use XDG directory specification on Linux

* Use C++ type safety and a bit refactoring

* Ensure parent directory for config file exists in CreateConfigIfNotExist()

* Set XDG helper function name to GetXDGDirectoryPath

* E2E: Test XDG directory folder path on Linux

* Remove extra empty line
* fix: docker CI

* fix: create cortexcpp folder

---------

Co-authored-by: sangjanai <sang@jan.ai>
Co-authored-by: vansangpfiev <vansangpfiev@gmail.com>
* bug/feat: improve subprocess

* log subprocess command for easier debugging
)

* Add a new header file for normalize engine

* Add normalize_engine.cc and update normalize_engine.h

* chore: remove usage of anonymouse namespace

---------

Co-authored-by: vansangpfiev <vansangpfiev@gmail.com>
Co-authored-by: vansangpfiev <vansangpfiev@gmail.com>
#2030)

* feat: implement input validation to allow only valid numeric selections

* chore:refactor function name to follow coding conventions

---------

Co-authored-by: vansangpfiev <vansangpfiev@gmail.com>
* test: add e2e post default engine

* test: fix ci

* test: update the variant non-cuda

---------

Co-authored-by: Harry Le <harry@menlo.ai>
* fix: add simple authentication

* fix: exclude v1/configs

---------

Co-authored-by: sangjanai <sang@jan.ai>
Co-authored-by: sangjanai <sang@jan.ai>
Co-authored-by: Harry Le <harry@menlo.ai>
Co-authored-by: Harry Le <harry@menlo.ai>
* fix: use copy instead of reference

* fix: exclude swagger

---------

Co-authored-by: sangjanai <sang@jan.ai>
* test: add e2e files


---------

Co-authored-by: Harry Le <harry@menlo.ai>
* test: check on ci

* test: check all in ci

* test: fix

* test: fix 2

* test: fix 3

---------

Co-authored-by: Harry Le <harry@menlo.ai>
chore: add .vs to .gitignore to exclude Visual Studio files
* chore: suppress warnings on Windows

* chore: msvc

* chore: remove c-style cast
Co-authored-by: vansangpfiev <vansangpfiev@gmail.com>
* chore:  resolve warnings, handle nodiscard, and add error logging

* Update command_executor.h

use macro PCLOSE to correctly map to _pclose on windows

* fix typo: revert PCLOSE to _pclose for windows

The PCLOSE macro was mistakenly defined as pclose for Windows. This commit fixes the typo, reverting it back to _pclose

* chore: fix formatting

---------

Co-authored-by: vansangpfiev <vansangpfiev@gmail.com>
fix: Exception Handling and multiline comment
Co-authored-by: Harry Le <harry@menlo.ai>
Co-authored-by: sangjanai <sang@jan.ai>
Co-authored-by: sangjanai <sang@jan.ai>
Co-authored-by: vansangpfiev <vansangpfiev@gmail.com>

@vansangpfiev

* remove python engine

* remove docs

* remove old methods

* remove CI

* remove model config

* remove finetuning and some docs update

* remove finetuning
* fix: crash if invalid url is set

* fix: validation for hf

---------

Co-authored-by: sangjanai <sang@jan.ai>
* chore: Move to C++17 and fix extra warnings

* Use maybe_unused attribute

* curl_utils: Use unsigned to make msvc happy

* Fix list init in macos code

* Use unsigned in gguf_parser

* fix list initialization again

* use unsigned in cli_selection_utils.h

* fix formatting

* CMakeLists: Indicate to ensure we use c++17

* fix unit tests

@urmauur

@urmauur

@qnixsynapse

@gau-nernst

Co-authored-by: sangjanai <sang@jan.ai>

@urmauur

* epic: Add compiler optimizations

* Remove -march=native flag
Co-authored-by: Akarshan Biswas <akarshan@menlo.ai>
chore: replace homebrew attr to menlo research

@Minh141120

@Minh141120

@Minh141120

@Minh141120

ci: add cortex docs new release

@vansangpfiev

@sangjanai

@vansangpfiev

* fix: handle options preflight

* fix: better handler

* fix: better comparision for two url paths

---------

Co-authored-by: sangjanai <sang@jan.ai>
)

Co-authored-by: sangjanai <sang@jan.ai>

hiento09