Skip to content

Commit f53bec6

Browse files
authored
OSS bug fixes (#2)
1 parent 1d24e0b commit f53bec6

File tree

19 files changed

+190
-201
lines changed

19 files changed

+190
-201
lines changed

.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ OWL_CONCURRENT_ROWS_BATCH_SIZE=3
2222
OWL_CONCURRENT_COLS_BATCH_SIZE=5
2323

2424
# Frontend config
25-
FRONTEND_PORT=4000
2625
JAMAI_URL=http://owl:${OWL_PORT}
2726
PUBLIC_JAMAI_URL=

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
set +e
8181
while true; do
8282
docker ps
83-
response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:${OWL_PORT:-6969}/health)
83+
response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:${OWL_PORT:-6969}/api/health)
8484
echo $response
8585
if [ $response -eq 200 ]; then
8686
break
@@ -90,11 +90,11 @@ jobs:
9090
done
9191
printf "> DONE\n"
9292
env:
93-
JAMAI_API_KEY: ${{ secrets.JAMAI_API_KEY }}
9493
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
9594
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
9695
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
9796
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }}
97+
# JAMAI_API_KEY: ${{ secrets.JAMAI_API_KEY }}
9898
COMPOSE_DOCKER_CLI_BUILD: 1
9999
DOCKER_BUILDKIT: 1
100100

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ venv/
1313

1414
# Internal references, dependencies, temporary folders & files
1515
/db*/
16+
/infinity_cache/
1617
**/__ref__/
1718
/dependencies/
1819
logs/

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
![JamAI Base Cover](JamAI_Base_Cover.png)
44

5+
<!-- prettier-ignore -->
6+
![Linting](https://github.com/EmbeddedLLM/JamAIBase/actions/workflows/lint.yml/badge.svg)
7+
![CI](https://github.com/EmbeddedLLM/JamAIBase/actions/workflows/ci.yml/badge.svg)
8+
9+
<!-- prettier-ignore -->
10+
> [!TIP]
11+
> [Explore our docs](https://docs.jamaibase.com)
12+
513
## Overview
614

715
Welcome to JamAI Base – the real-time database that orchestrates Large Language Models (LLMs) for you. Designed to simplify AI integration, JamAI Base offers a Backend as a Service (BaaS) platform with an intuitive, spreadsheet-like interface. Focus on defining your data requirements through natural language prompts, and let us handle the complexities of RAG, LLMOps, conversation histories, and LLM orchestration.
@@ -127,7 +135,12 @@ Focus on defining "what" you want to achieve rather than "how" to achieve it.
127135
$ docker compose -f docker/compose.nvidia.yml up --quiet-pull -d
128136
```
129137

130-
4. Try it out:
138+
<!-- prettier-ignore -->
139+
> [!TIP]
140+
> By default, frontend and backend are accessible at ports 4000 and 6969.
141+
> You can change the ports exposed to host by setting env var like so `API_PORT=6970 FRONTEND_PORT=4001 docker compose -f docker/compose.cpu.yml up --quiet-pull -d`
142+
143+
4. Try the command below in your terminal, or open your browser and go to `localhost:4000`.
131144

132145
```shell
133146
$ curl localhost:6969/api/v1/models
157 KB
Loading

clients/typescript/src/resources/base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ export abstract class Base {
8484
if (maxRetries > 0) {
8585
axiosRetry(this.httpClient, {
8686
retries: this.maxRetries,
87-
retryDelay: (retryCount: any) => {
87+
retryDelay: (retryCount) => {
8888
console.log("Retry attempt: ", retryCount);
8989
return retryCount * 1000;
9090
},
91-
retryCondition: (_error: any) => {
91+
retryCondition: (_error) => {
9292
return true;
9393
}
9494
});

docker/compose.cpu.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ services:
1717
restart: unless-stopped
1818
env_file:
1919
- ../.env
20+
volumes:
21+
- ${PWD}/infinity_cache:/app/.cache
2022
networks:
2123
- jamai
2224

@@ -63,8 +65,6 @@ services:
6365
# timeout: 2s
6466
# retries: 5
6567
# start_period: 1m
66-
ports:
67-
- "6379:6379"
6868
# For better performance, consider `host` mode instead `port` to avoid docker NAT.
6969
# `host` mode is NOT currently supported in Swarm Mode.
7070
# https://docs.docker.com/compose/compose-file/compose-file-v3/#network_mode
@@ -102,7 +102,7 @@ services:
102102
- ${PWD}/db:/app/api/db
103103
- ${PWD}/logs:/app/api/logs
104104
ports:
105-
- "6969:${API_PORT:-6969}"
105+
- "${API_PORT:-6969}:6969"
106106
networks:
107107
- jamai
108108

@@ -117,15 +117,15 @@ services:
117117
owl:
118118
condition: service_healthy
119119
# healthcheck:
120-
# test: ["CMD-SHELL", "curl --silent --fail localhost:6968/api/health || exit 1"]
120+
# test: ["CMD-SHELL", "curl --silent --fail --output /dev/null localhost:4000/project/default/action-table || exit 1"]
121121
# interval: 30s
122122
# timeout: 2s
123123
# retries: 5
124124
restart: unless-stopped
125125
environment:
126126
- NODE_ENV=production
127127
- BODY_SIZE_LIMIT=Infinity
128-
- PORT=4000
128+
- FRONTEND_PORT=4000
129129
env_file:
130130
- ../.env
131131
ports:

docker/compose.nvidia.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,10 @@ services:
4747
file: compose.cpu.yml
4848
service: owl
4949

50+
frontend:
51+
extends:
52+
file: compose.cpu.yml
53+
service: frontend
54+
5055
networks:
5156
jamai:

scripts/copy_repo.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
mv .git ../.
6+
rm -rf *
7+
rm -rf .*
8+
mv ../.git .
9+
git clone https://github.com/EmbeddedLLM/JAM.ai.dev
10+
rm -rf JAM.ai.dev/.git
11+
rm -rf JAM.ai.dev/.vscode
12+
rm -rf JAM.ai.dev/archive
13+
cp -r JAM.ai.dev/. .
14+
source scripts/remove_cloud_modules.sh
15+
rm -rf JAM.ai.dev/
16+
sed -i -e 's:JAM.ai.dev:JamAIBase:g' README.md

scripts/remove_cloud_modules.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
find . -type f -name "cloud*.py" -delete
6+
find . -type f -name "compose.*.cloud.yml" -delete
7+
find . -type d -name "(cloud)" -exec rm -rf {} +
8+
rm services/app/ecosystem.config.cjs
9+
rm services/app/ecosystem.json

0 commit comments

Comments
 (0)