Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed Local Models WorkFlow on UI #34

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
f8731fc
Blockchain API: Fix empty errors in JSON payload and in a couple of c…
tshak Sep 25, 2024
374db06
Merge pull request #191 from tshak/dev
alex-sandrk Sep 25, 2024
7fab5a5
feat: split get sessions comments on two
alex-sandrk Sep 25, 2024
7fa744c
Merge branch 'dev' of github.com:Lumerin-protocol/Morpheus-Lumerin-No…
alex-sandrk Sep 25, 2024
ab8ab8e
Merge pull request #195 from Lumerin-protocol/feat/split-commands
alex-sandrk Sep 25, 2024
c2af6c7
fix: improve log
alex-sandrk Sep 30, 2024
b42d597
Merge pull request #196 from Lumerin-protocol/fix/improve-log
alex-sandrk Sep 30, 2024
dc2886a
Fixed issue with Price range
bohdan-titan Oct 2, 2024
1e69e06
Merge pull request #197 from Lumerin-protocol/feature/max-issue
bohdan-titan Oct 2, 2024
8916e1d
Merge pull request #198 from Lumerin-protocol/dev
abs2023 Oct 4, 2024
b1f283d
feat: handle chat context on proxy
alex-sandrk Oct 9, 2024
af24d2c
update prompt api
alex-sandrk Oct 9, 2024
2ca6ed0
feat: abstract ethclient with interface
shev-titan Oct 9, 2024
468019a
feat: ethprovider with multiple endpoints
shev-titan Oct 9, 2024
924a252
feat: polling/subscription modes for getting blockchain events
shev-titan Oct 10, 2024
f5400d4
feat: runtime change of eth node api
shev-titan Oct 10, 2024
b0a2cfa
fix: update swagger
shev-titan Oct 10, 2024
62b5fc5
Merge pull request #200 from Lumerin-protocol/feat/abstract-rpc-client
shev-titan Oct 10, 2024
da20970
Merge pull request #203 from Lumerin-protocol/feat/eth-node-api
shev-titan Oct 10, 2024
0351ba8
Merge pull request #202 from Lumerin-protocol/feat/polling-subscription
shev-titan Oct 10, 2024
fcb9486
feat: eth node url keychain persistence
shev-titan Oct 10, 2024
f86e3ea
Merge pull request #204 from Lumerin-protocol/feat/eth-node-url-persi…
shev-titan Oct 10, 2024
8832b24
fix: ability to reset keychain
shev-titan Oct 10, 2024
fdcb33b
fix: handling local models
alex-sandrk Oct 14, 2024
2740d7e
docs: update readme.md
alex-sandrk Oct 14, 2024
3e57438
Merge pull request #199 from Lumerin-protocol/feature/proxy-chat-context
alex-sandrk Oct 14, 2024
c0c1822
Merge pull request #201 from Lumerin-protocol/feat/rpc-multi-provider
shev-titan Oct 14, 2024
664e9a2
update docker
Oct 14, 2024
bc0a288
remove busybox reference
Oct 14, 2024
7ef183c
update dockerfile
Oct 14, 2024
e5ebc11
update build.sh
Oct 14, 2024
c7f680c
update dockerfile
Oct 14, 2024
bc7979d
update dockerfile 3
Oct 14, 2024
909425e
base sc refactoring
FedokDL Oct 15, 2024
7b171b2
remove new time.ts
FedokDL Oct 15, 2024
53b7432
Added availability check
bohdan-titan Oct 16, 2024
0c45893
Merge pull request #205 from Lumerin-protocol/feature/availability-check
bohdan-titan Oct 17, 2024
f72be00
fix storage for facets, deploy to the testnet
FedokDL Oct 21, 2024
b2f1064
fix .enf and config file
FedokDL Oct 21, 2024
6afd8ae
Merge pull request #26 from MorpheusAIs/feature/global-sc-refactoring-1
FedokDL Oct 21, 2024
3723c38
feat: capacity managing
alex-sandrk Oct 22, 2024
fe415d9
remove unused struct
alex-sandrk Oct 22, 2024
206e6a7
fix: errors on events listener
alex-sandrk Oct 22, 2024
06b6716
Merge pull request #206 from Lumerin-protocol/feat/capacity-managing
alex-sandrk Oct 22, 2024
6a093a5
Merge pull request #207 from Lumerin-protocol/fix/events-listener
alex-sandrk Oct 22, 2024
48975bd
add direct MOR payment for the session. Add docs to the interfaces
FedokDL Oct 24, 2024
a0ef506
remove dev imports
FedokDL Oct 24, 2024
e1cb781
add linter fixes
FedokDL Oct 24, 2024
7574f97
add min and max price fro the bid price per second
FedokDL Oct 25, 2024
5f58b39
fix deployment
FedokDL Oct 25, 2024
3ef7bd7
Changed onboarding
bohdan-titan Oct 25, 2024
1aca66c
applied review
bohdan-titan Oct 25, 2024
f9f984a
Pushed renaming
bohdan-titan Oct 25, 2024
9334806
Added custom eth to settings
bohdan-titan Oct 25, 2024
7f18474
Fixed issue with random wallet
bohdan-titan Oct 25, 2024
11de098
Merge pull request #209 from Lumerin-protocol/feature/ui-onboarding
bohdan-titan Oct 28, 2024
66e6e3a
internal review fixes
FedokDL Oct 28, 2024
91ab359
feat: failover
alex-sandrk Oct 28, 2024
9f0bb90
Merge pull request #211 from Lumerin-protocol/docker-proxy-router
abs2023 Oct 29, 2024
b188857
Merge branch 'dev' of https://github.com/Lumerin-protocol/Morpheus-Lu…
bohdan-titan Oct 29, 2024
0a9bc43
feat: split get sessions comments on two
alex-sandrk Sep 25, 2024
3226196
Blockchain API: Fix empty errors in JSON payload and in a couple of c…
tshak Sep 25, 2024
d935255
fix: improve log
alex-sandrk Sep 30, 2024
de9b1f3
Fixed issue with Price range
bohdan-titan Oct 2, 2024
e27b4ce
feat: abstract ethclient with interface
shev-titan Oct 9, 2024
c64e373
feat: handle chat context on proxy
alex-sandrk Oct 9, 2024
ba1c4c4
update prompt api
alex-sandrk Oct 9, 2024
6c13b53
fix: handling local models
alex-sandrk Oct 14, 2024
81b81c3
docs: update readme.md
alex-sandrk Oct 14, 2024
73bc936
feat: ethprovider with multiple endpoints
shev-titan Oct 9, 2024
47ecce2
feat: polling/subscription modes for getting blockchain events
shev-titan Oct 10, 2024
1060c7a
feat: runtime change of eth node api
shev-titan Oct 10, 2024
0942128
fix: update swagger
shev-titan Oct 10, 2024
d9b6a69
feat: eth node url keychain persistence
shev-titan Oct 10, 2024
d1eab06
fix: ability to reset keychain
shev-titan Oct 10, 2024
7b876f9
Added availability check
bohdan-titan Oct 16, 2024
7200f5a
feat: capacity managing
alex-sandrk Oct 22, 2024
308d5c3
remove unused struct
alex-sandrk Oct 22, 2024
070f40e
fix: errors on events listener
alex-sandrk Oct 22, 2024
54ca4f9
Changed onboarding
bohdan-titan Oct 25, 2024
429579f
applied review
bohdan-titan Oct 25, 2024
100b564
Pushed renaming
bohdan-titan Oct 25, 2024
ad7b05e
Added custom eth to settings
bohdan-titan Oct 25, 2024
d71e150
Fixed issue with random wallet
bohdan-titan Oct 25, 2024
e4616f1
update docker
Oct 14, 2024
1ba8a67
remove busybox reference
Oct 14, 2024
cece046
update dockerfile
Oct 14, 2024
8e9bb05
update build.sh
Oct 14, 2024
c3168cc
update dockerfile
Oct 14, 2024
d9ca7c5
update dockerfile 3
Oct 14, 2024
bc405f1
fix: update proxy to new contracts
shev-titan Oct 7, 2024
23e3c1e
feat: adjust proxy to refactored smart contracts
shev-titan Oct 23, 2024
273b3b5
fix: session open flow
shev-titan Oct 30, 2024
a53d569
Merge branch 'dev' into feat/contracts-update-2
shev-titan Oct 30, 2024
5382280
feat: open session with allowed providers
alex-sandrk Oct 30, 2024
5dee336
Merge pull request #213 from Lumerin-protocol/feat/contracts-update-2
shev-titan Oct 30, 2024
0c71cc4
proxy: consider provider stake in rating system
shev-titan Oct 30, 2024
8d611c4
Replaced v1 contract (0x8e19...5fd) with v2 contract (0x208e..f780)
Oct 30, 2024
4cbe632
update swagger version and readme
Oct 30, 2024
5e1392f
Merge pull request #216 from Lumerin-protocol/fix-v2contract
abs2023 Oct 30, 2024
54e70a7
updated with new v2 Testnet saMOR contract
Oct 30, 2024
4fc63ff
Merge pull request #217 from Lumerin-protocol/fix-v2contract
abs2023 Oct 30, 2024
4bdb823
Merge branch 'dev' into feat/failover
alex-sandrk Oct 30, 2024
0afa934
Merge pull request #214 from Lumerin-protocol/feat/provider-allow-list
alex-sandrk Oct 30, 2024
9b56acc
refactor: spaces
alex-sandrk Oct 30, 2024
67ef445
Merge pull request #215 from Lumerin-protocol/proxy/rating-stake
shev-titan Oct 30, 2024
b57b121
Merge pull request #210 from Lumerin-protocol/feat/failover
alex-sandrk Oct 30, 2024
609b85e
docs: add capacity policy example
alex-sandrk Oct 30, 2024
438ff6b
Merge pull request #218 from Lumerin-protocol/docs/models-config-example
abs2023 Oct 30, 2024
5fa8aa8
udpate .env examples
Oct 30, 2024
8d58eec
Merge pull request #219 from Lumerin-protocol/fix-update-env-examples
LumerinIO Oct 30, 2024
5061e4e
update testnet smart contract to 0x10777...7b10
Oct 30, 2024
7732fa9
Merge pull request #221 from Lumerin-protocol/fix-smartcontract-updat…
abs2023 Oct 30, 2024
57ff54a
fix: updated abi for opensession
shev-titan Oct 30, 2024
0e1ed96
Merge pull request #222 from Lumerin-protocol/fix/abi
shev-titan Oct 30, 2024
ffc49ff
update .env examples to disable provider_allow_list and models_config…
Oct 31, 2024
c6ef7af
add ETH_NODE_USE_SUBSCRIPTIONS example
Nov 1, 2024
9e58196
comment out ETH_NODE_ADDRESS to ensure http default polling is active
Nov 1, 2024
e26a042
chore: remove unused code
shev-titan Nov 1, 2024
ae8be5c
fix: ensure flushing logs before exiting
shev-titan Nov 1, 2024
4805c45
fix: error when providing invalid flag
shev-titan Nov 1, 2024
f2266f7
update .env variations and update default proxy-router port to 8082 t…
Nov 1, 2024
c62a7f1
fix: DEV-79 incorrect polling implementation
shev-titan Nov 1, 2024
c4baf85
Added handling custom messages
bohdan-titan Nov 3, 2024
6cd331c
Merge pull request #228 from Lumerin-protocol/feature/failover-ui
bohdan-titan Nov 4, 2024
66d97bb
Merge pull request #227 from Lumerin-protocol/fix/release-adjustments
shev-titan Nov 4, 2024
2859de6
fixed spacing
Nov 4, 2024
2911261
cicd: bump macos-x86 to v13
loonerin Nov 4, 2024
8d90f38
Merge pull request #226 from Lumerin-protocol/fix-envdefaults
abs2023 Nov 4, 2024
af90379
Merge pull request #229 from Lumerin-protocol/ci-macos13
abs2023 Nov 4, 2024
778fe2e
Fixed issue with path
bohdan-titan Nov 5, 2024
d4e86b8
Merge pull request #231 from Lumerin-protocol/fix/mnemonic-path
bohdan-titan Nov 5, 2024
cd371e4
fix: restart proxy after wallet setup
alex-sandrk Nov 5, 2024
9972ceb
update to minimalist and removed in line comments
Nov 5, 2024
0a83b47
Merge pull request #232 from Lumerin-protocol/fix/restart-after-walle…
abs2023 Nov 5, 2024
9a2b069
Merge pull request #233 from Lumerin-protocol/CleanENVDefaults
abs2023 Nov 5, 2024
723faed
DEV-73 environmnet file confg and update release build to generate re…
Nov 5, 2024
78be0d0
added .env copy to root, changed pathing and updated doc names
Nov 6, 2024
8613f02
models-config.json copy to root for release
Nov 6, 2024
28eb033
Merge pull request #235 from Lumerin-protocol/env-full-doc
abs2023 Nov 6, 2024
5fd3ea1
feat: close session with user report if provider is not available
alex-sandrk Nov 6, 2024
52162cb
update ci-cd to use /actions for DRY
Nov 6, 2024
d4a89c9
updated dependent yml file names actions to action
Nov 6, 2024
35aed72
added shell:bash for action steps
Nov 6, 2024
42c51ca
update go version for builds from 1.21.x to 1.22.x
Nov 6, 2024
8482032
added confirmation and tag from subscript
Nov 6, 2024
8926576
update env.TAG_NAME reference in build.yml
Nov 6, 2024
75c6837
Merge pull request #238 from Lumerin-protocol/env-full-doc
abs2023 Nov 6, 2024
31ab99b
Merge pull request #237 from Lumerin-protocol/feat/close-session-user…
abs2023 Nov 6, 2024
fe897b7
fix: session repo with caching
shev-titan Nov 6, 2024
b7aa4d3
fix: drop ethereum hdwallet
shev-titan Nov 6, 2024
ec98dba
test: correct derivation
shev-titan Nov 7, 2024
813d40a
Merge pull request #241 from Lumerin-protocol/proxy/fix-derivation
shev-titan Nov 7, 2024
69c4dcc
fix: maintain model-session index
shev-titan Nov 7, 2024
8fd5eaa
Merge pull request #240 from Lumerin-protocol/proxy/bid-cache
shev-titan Nov 7, 2024
749ba8b
Fixed missed parts
bohdan-titan Nov 7, 2024
13225e8
Merge pull request #242 from Lumerin-protocol/fix/small-ui-2
shev-titan Nov 7, 2024
d672584
feat: close session on prompt failover
alex-sandrk Nov 7, 2024
e796881
Merge pull request #243 from Lumerin-protocol/feat/failover-2
alex-sandrk Nov 7, 2024
ed1873f
fix: get session from repo when close with user report
alex-sandrk Nov 10, 2024
2111bc5
Added localhost to default public url
bohdan-titan Nov 10, 2024
32ebe84
handled case with double dots
bohdan-titan Nov 10, 2024
e09a68b
feat: session auto close
alex-sandrk Nov 11, 2024
4001071
Merge pull request #247 from Lumerin-protocol/feature/auto-close
abs2023 Nov 11, 2024
5808a6a
Merge pull request #246 from Lumerin-protocol/fix/user-report-close
abs2023 Nov 11, 2024
6534aa8
refator: run expiry handler in proxy goroutine
alex-sandrk Nov 11, 2024
fcd4ffb
Merge pull request #245 from Lumerin-protocol/feature/config-public-url
abs2023 Nov 11, 2024
40b65a5
set draft=true on all but pushes to main
Nov 11, 2024
81c7ec3
Merge pull request #249 from Lumerin-protocol/fix-stg-release-draft
LumerinIO Nov 11, 2024
f68f393
Merge pull request #248 from Lumerin-protocol/feature/auto-close
alex-sandrk Nov 11, 2024
89aa412
set to pre-release (not draft) which is what was intended
Nov 11, 2024
9f35638
Merge pull request #251 from Lumerin-protocol/fix-stg-release-draft
abs2023 Nov 11, 2024
2c6527a
feat: initial implementation
shev-titan Nov 12, 2024
4c3b1e2
feat: abstract chat message format
shev-titan Nov 12, 2024
6cb661e
fix: chat persistence and response headers
shev-titan Nov 13, 2024
43ed950
fix: missing history.go param injection
shev-titan Nov 13, 2024
13d75e4
fix: set models-config.json defaults to match our bundled package
shev-titan Nov 13, 2024
1616d1c
fix: remove unused OPENAI_BASE_URL
shev-titan Nov 13, 2024
a541fc1
fix: bool pointer env var defaulting
shev-titan Nov 13, 2024
77904d3
fix: avoid mutation on AppendChatHistory
shev-titan Nov 13, 2024
a0ad6b0
fix: send actual message to prodia
alex-sandrk Nov 13, 2024
694c13b
Removed useless public
bohdan-titan Nov 13, 2024
c787a62
Changed global scrolls
bohdan-titan Nov 13, 2024
c290d88
Fixed issue with bid creation
bohdan-titan Nov 13, 2024
42fb693
Fixed pottential issue with connectivity
bohdan-titan Nov 13, 2024
5c42720
Merge pull request #253 from Lumerin-protocol/proxy/adapters
shev-titan Nov 14, 2024
5c63e65
Fixed issue with sessions
bohdan-titan Nov 14, 2024
68544a1
Optimization
bohdan-titan Nov 14, 2024
f8f9019
review
bohdan-titan Nov 14, 2024
ef146de
Merge pull request #254 from Lumerin-protocol/fix/bid-session-issues
bohdan-titan Nov 14, 2024
5cd5b51
fix: failover timeout + handling
alex-sandrk Nov 14, 2024
86707bf
remove console.log
alex-sandrk Nov 14, 2024
bd134f8
Merge pull request #255 from Lumerin-protocol/fix/failover-v2
alex-sandrk Nov 14, 2024
195fb3e
feat: enable multicall3
shev-titan Nov 14, 2024
f67c840
Merge pull request #257 from Lumerin-protocol/proxy/multicall3
shev-titan Nov 14, 2024
df35825
Changed local models
bohdan-titan Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/actions/copy_env_files/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Copy Environment Files
description: "Copies environment files based on branch"
runs:
using: "composite"
steps:
- name: Copy Environment Files
shell: bash
run: |
cp ./proxy-router/models-config.json.example ./proxy-router/models-config.json
cp ./proxy-router/models-config.json.example models-config.json
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
cp ./.github/workflows/proxy-router.main.env ./proxy-router/.env
cp ./.github/workflows/proxy-router.main.env .env
cp ./.github/workflows/ui-desktop.main.env ./ui-desktop/.env
elif [[ "${GITHUB_REF}" == "refs/heads/stg" ]]; then
cp ./.github/workflows/proxy-router.test.env ./proxy-router/.env
cp ./.github/workflows/proxy-router.test.env .env
cp ./.github/workflows/ui-desktop.test.env ./ui-desktop/.env
else
cp ./proxy-router/.env.example ./proxy-router/.env
cp ./proxy-router/.env.example .env
cp ./ui-desktop/.env.example ./ui-desktop/.env
fi
21 changes: 21 additions & 0 deletions .github/actions/gen_tag_name/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Generate Tag Name
description: "Generates a tag name based on branch"
runs:
using: "composite"
steps:
- name: Determine tag name
id: tag
shell: bash
run: |
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
echo $SHORT_HASH
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
PREFIX="main-"
elif [[ "${GITHUB_REF}" == "refs/heads/stg" ]]; then
PREFIX="test-"
else
PREFIX="dev-"
fi
TAG_NAME="${PREFIX}${SHORT_HASH}"
echo $TAG_NAME
echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
114 changes: 50 additions & 64 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
push:
branches:
- main
- stg
paths: ['.github/workflows/**', '**/Makefile', '**/*.go', '**/*.json', '**/*.yml', '**/*.ts', '**/*.js']
pull_request:
types: [opened, reopened, synchronize]
Expand All @@ -22,7 +23,7 @@ concurrency:
defaults:
run:
shell: bash

jobs:
Ubuntu-22-x64:
runs-on: ubuntu-22.04
Expand All @@ -34,7 +35,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'
cache-dependency-path: |
launcher/go.sum
proxy-router/go.sum
Expand All @@ -55,49 +56,45 @@ jobs:
cd ../ui-desktop
yarn install --network-timeout 600000

- name: Copy Environment Files
uses: ./.github/actions/copy_env_files

- name: Generate Tag Name
uses: ./.github/actions/gen_tag_name

- name: Build
id: build
run: |
cd launcher
make
cd ../proxy-router
cp ./models-config.json.example ../ui-desktop/models-config.json
make build
cd ../cli
make build
cd ../ui-desktop
cp ./.env.example .env
yarn build:linux

- name: Determine tag name
id: tag
run: |
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
echo "name=${SHORT_HASH}" >> $GITHUB_OUTPUT

- name: Pack artifacts
id: pack_artifacts
run: |
ARTIFACT=mor-launch-${{ steps.tag.outputs.name }}-ubuntu-x64.zip
ARTIFACT="mor-launch-$TAG_NAME-ubuntu-x64.zip"
LLAMACPP=llama-b3256-bin-ubuntu-x64.zip
MODEL=tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf
wget -nv https://github.com/ggerganov/llama.cpp/releases/download/b3256/$LLAMACPP
wget -nv https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF/resolve/main/$MODEL
unzip -o -j $LLAMACPP build/bin/llama-server
echo '{"run":["./llama-server -m ./'$MODEL'","./proxy-router","./ui-desktop-1.0.0.AppImage"]}' > mor-launch.json
cp ./proxy-router/.env.example .env
cp ./proxy-router/models-config.json.example models-config.json
mv ./cli/mor-cli mor-cli
zip -j $ARTIFACT ./LICENSE ./launcher/mor-launch llama-server ./proxy-router/bin/proxy-router .env $MODEL mor-launch.json ./ui-desktop/dist/ui-desktop-1.0.0.AppImage models-config.json mor-cli

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: mor-launch-${{ steps.tag.outputs.name }}-ubuntu-x64.zip
path: mor-launch-${{ env.TAG_NAME }}-ubuntu-x64.zip
name: mor-launch-ubuntu-x64.zip

macOS-12-x64:
runs-on: macos-12
macOS-13-x64:
runs-on: macos-13
steps:
- name: Clone
uses: actions/checkout@v4
Expand All @@ -106,7 +103,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'
cache-dependency-path: |
launcher/go.sum
proxy-router/go.sum
Expand All @@ -127,38 +124,34 @@ jobs:
cd ../ui-desktop
yarn install --network-timeout 600000

- name: Copy Environment Files
uses: ./.github/actions/copy_env_files

- name: Generate Tag Name
uses: ./.github/actions/gen_tag_name

- name: Build
id: build
run: |
cd launcher
make
cd ../proxy-router
cp ./models-config.json.example ../ui-desktop/models-config.json
make build
cd ../cli
make build
cd ../ui-desktop
cp ./.env.example .env
yarn build:mac

- name: Determine tag name
id: tag
run: |
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
echo "name=${SHORT_HASH}" >> $GITHUB_OUTPUT

- name: Pack artifacts
id: pack_artifacts
run: |
ARTIFACT=mor-launch-${{ steps.tag.outputs.name }}-macos-x64.zip
ARTIFACT="mor-launch-$TAG_NAME-macos-x64.zip"
LLAMACPP=llama-b3256-bin-macos-x64.zip
MODEL=tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf
wget -nv https://github.com/ggerganov/llama.cpp/releases/download/b3256/$LLAMACPP
wget -nv https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF/resolve/main/$MODEL
unzip -o -j $LLAMACPP build/bin/llama-server
echo '{"run":["./llama-server -m ./'$MODEL'","./proxy-router","./ui-desktop.app/Contents/MacOS/ui-desktop"]}' > mor-launch.json
cp ./proxy-router/.env.example .env
cp ./proxy-router/models-config.json.example models-config.json
mv ./cli/mor-cli mor-cli
unzip ./ui-desktop/dist/ui-desktop-1.0.0-mac.zip
zip -j $ARTIFACT ./LICENSE ./launcher/mor-launch ./proxy-router/bin/proxy-router .env llama-server $MODEL mor-launch.json models-config.json mor-cli
Expand All @@ -167,7 +160,7 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: mor-launch-${{ steps.tag.outputs.name }}-macos-x64.zip
path: mor-launch-${{ env.TAG_NAME }}-macos-x64.zip
name: mor-launch-macos-x64.zip

macOS-14-arm64:
Expand All @@ -180,7 +173,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'
cache-dependency-path: |
launcher/go.sum
proxy-router/go.sum
Expand All @@ -201,38 +194,34 @@ jobs:
cd ../ui-desktop
yarn install --network-timeout 600000

- name: Copy Environment Files
uses: ./.github/actions/copy_env_files

- name: Generate Tag Name
uses: ./.github/actions/gen_tag_name

- name: Build
id: build
run: |
cd launcher
make
cd ../proxy-router
cp ./models-config.json.example ../ui-desktop/models-config.json
make build
cd ../cli
make build
cd ../ui-desktop
cp ./.env.example .env
yarn build:mac

- name: Determine tag name
id: tag
run: |
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
echo "name=${SHORT_HASH}" >> $GITHUB_OUTPUT

- name: Pack artifacts
id: pack_artifacts
run: |
ARTIFACT=mor-launch-${{ steps.tag.outputs.name }}-macos-arm64.zip
ARTIFACT="mor-launch-$TAG_NAME-macos-arm64.zip"
LLAMACPP=llama-b3256-bin-macos-arm64.zip
MODEL=tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf
wget -nv https://github.com/ggerganov/llama.cpp/releases/download/b3256/$LLAMACPP
wget -nv https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF/resolve/main/$MODEL
unzip -o -j $LLAMACPP build/bin/llama-server
echo '{"run":["./llama-server -m ./'$MODEL'","./proxy-router","./ui-desktop.app/Contents/MacOS/ui-desktop"]}' > mor-launch.json
cp ./proxy-router/.env.example .env
cp ./proxy-router/models-config.json.example models-config.json
mv ./cli/mor-cli mor-cli
unzip ./ui-desktop/dist/ui-desktop-1.0.0-arm64-mac.zip
zip -j $ARTIFACT ./LICENSE ./launcher/mor-launch ./proxy-router/bin/proxy-router .env llama-server $MODEL mor-launch.json models-config.json mor-cli
Expand All @@ -241,7 +230,7 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: mor-launch-${{ steps.tag.outputs.name }}-macos-arm64.zip
path: mor-launch-${{ env.TAG_NAME }}-macos-arm64.zip
name: mor-launch-macos-arm64.zip

Windows-avx2-x64:
Expand All @@ -254,7 +243,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'
cache-dependency-path: |
launcher/go.sum
proxy-router/go.sum
Expand All @@ -266,9 +255,10 @@ jobs:
cache: 'yarn'
cache-dependency-path: ui-desktop/yarn.lock

- name: Install wget
- name: Install wget and sed
run: |
choco install wget --no-progress
choco install sed --no-progress

- name: Install dependencies
run: |
Expand All @@ -279,38 +269,36 @@ jobs:
cd ../ui-desktop
yarn install --network-timeout 600000

- name: Copy Environment Files
uses: ./.github/actions/copy_env_files

- name: Generate Tag Name
uses: ./.github/actions/gen_tag_name

- name: Build
id: build
run: |
cd launcher
make
cd ../proxy-router
cp ./models-config.json.example ../ui-desktop/models-config.json
make build
cd ../cli
make build
cd ../ui-desktop
cp ./.env.example .env
yarn build:win

- name: Determine tag name
id: tag
run: |
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
echo "name=${SHORT_HASH}" >> $GITHUB_OUTPUT

- name: Pack artifacts
id: pack_artifacts
run: |
ARTIFACT=mor-launch-${{ steps.tag.outputs.name }}-win-x64.zip
ARTIFACT="mor-launch-$TAG_NAME-win-x64.zip"
LLAMACPP=llama-b3256-bin-win-avx2-x64.zip
MODEL=tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf
wget -nv https://github.com/ggerganov/llama.cpp/releases/download/b3256/$LLAMACPP
wget -nv https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF/resolve/main/$MODEL
unzip -o -j $LLAMACPP llama-server.exe llama.dll ggml.dll
echo '{"run":["./llama-server.exe -m ./'$MODEL'","./proxy-router.exe","./ui-desktop-1.0.0.exe"]}' > mor-launch.json
cp ./proxy-router/.env.example.win .env
cp ./proxy-router/models-config.json.example models-config.json
mv .env .env.tmp
sed 's|\./data/|.\\data\\|g' .env.tmp > .env
mv ./proxy-router/bin/proxy-router proxy-router.exe
mv ./cli/mor-cli mor-cli.exe
mv ./launcher/mor-launch mor-launch.exe
Expand All @@ -320,27 +308,24 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: mor-launch-${{ steps.tag.outputs.name }}-win-x64.zip
path: mor-launch-${{ env.TAG_NAME }}-win-x64.zip
name: mor-launch-win-x64.zip

release:
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || github.event.inputs.create_release == 'true' }}
if: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/stg')) || github.event.inputs.create_release == 'true' }}
runs-on: ubuntu-latest
needs:
- Ubuntu-22-x64
- macOS-12-x64
- macOS-13-x64
- macOS-14-arm64
- Windows-avx2-x64
steps:
- name: Clone
id: checkout
uses: actions/checkout@v4

- name: Determine tag name
id: tag
run: |
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
echo "name=${SHORT_HASH}" >> $GITHUB_OUTPUT
- name: Generate Tag Name
uses: ./.github/actions/gen_tag_name

- name: Download artifacts
id: download-artifact
Expand All @@ -360,7 +345,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.name }}
tag_name: ${{ env.TAG_NAME }}
prerelease: ${{ github.ref != 'refs/heads/main' }}

- name: Upload release
id: upload_release
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/proxy-router.main.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is used to set the environment variables for the cicd workflow
# To Generate the STG or TestNet release
# Contract and Token current as of 11/5/2024 (and are using the same values as the testnet)
# ...when mainnet release is imminent, update the values

DIAMOND_CONTRACT_ADDRESS=0x10777866547c53cbd69b02c5c76369d7e24e7b10
MOR_TOKEN_ADDRESS=0x34a285a1b1c166420df5b6630132542923b5b27e
EXPLORER_API_URL="https://api-sepolia.arbiscan.io/api"
ETH_NODE_CHAIN_ID=421614
OPENAI_BASE_URL=http://localhost:8080/v1
PROXY_STORE_CHAT_CONTEXT=true
# PROXY_STORAGE_PATH=.\data\ (for windows)
PROXY_STORAGE_PATH=./data/
LOG_COLOR=true
Loading
Loading