Skip to content

Commit 428d558

Browse files
authored
Updates: Merge changes from internal repo (#8)
This is a huge update that brings in changes from internal repo. It includes many added features, improvements, and bug fixes, which are all listed in the CHANGELOG. This also partially fixes #7
1 parent ec54cdc commit 428d558

File tree

137 files changed

+8918
-6541
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+8918
-6541
lines changed

.env

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,4 @@ DOCIO_DEVICE=cpu
1919
EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
2020
RERANKER_MODEL=cross-encoder/ms-marco-TinyBERT-L-2
2121
OWL_CONCURRENT_ROWS_BATCH_SIZE=3
22-
OWL_CONCURRENT_COLS_BATCH_SIZE=5
23-
24-
# Frontend config
25-
JAMAI_URL=http://owl:${OWL_PORT}
26-
PUBLIC_JAMAI_URL=
22+
OWL_CONCURRENT_COLS_BATCH_SIZE=5
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: 🐛 Bug report
3+
about: Create a report to help us reproduce and fix the bug
4+
title: "[BUG]"
5+
labels: "type: bug"
6+
assignees: ""
7+
---
8+
9+
### Describe the bug
10+
11+
A clear and concise description of what the bug is.
12+
13+
### To Reproduce
14+
15+
Provide the steps to reproduce the behavior.
16+
17+
If relevant, add a **minimal example** so that we can reproduce the error by running the code. We are going to copy-paste your code and we expect to get the same result as you did, so avoid any external data, and include the relevant imports. Please take time to **trim down any irrelevant code** to help us debug efficiently.
18+
19+
### Expected behavior
20+
21+
A clear and concise description of what you expected to happen.
22+
23+
### Screenshots
24+
25+
If applicable, add screenshots to help explain your problem.
26+
27+
### Desktop (please complete the following information):
28+
29+
- OS: [e.g. iOS]
30+
- Browser [e.g. chrome, safari]
31+
- Version [e.g. 22]
32+
33+
### Smartphone (please complete the following information):
34+
35+
- Device: [e.g. iPhone6]
36+
- OS: [e.g. iOS8.1]
37+
- Browser [e.g. stock browser, safari]
38+
- Version [e.g. 22]
39+
40+
### Additional context
41+
42+
Add any other context about the problem here.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: 🚀 Feature request
3+
about: Submit a proposal/request for a new JamAIBase feature
4+
title: "[FEAT]"
5+
labels: "type: enhancement / feature"
6+
assignees: ""
7+
---
8+
9+
### Is your feature request related to a problem? Please describe.
10+
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
### Describe the solution you'd like
14+
15+
A clear and concise description of what you want to happen.
16+
17+
### Describe alternatives you've considered
18+
19+
A clear and concise description of any alternative solutions or features you've considered.
20+
21+
### Additional context
22+
23+
Add any other context or screenshots about the feature request here.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: 📚 Documentation
3+
about: Tell us how we could improve the documentation
4+
title: "[DOC]"
5+
labels: "type: documentation"
6+
assignees: ""
7+
---
8+
9+
Tell us how we could improve the documentation.
10+
11+
Thanks for contributing 🎉!

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 💡 Questions, ideas, discussions
4+
about: Ask a question or ask about a problem in GitHub Discussions.
5+
url: https://github.com/EmbeddedLLM/JAM.ai.dev/discussions

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ jobs:
4141
- name: Check Docker Compose Version
4242
run: docker compose version
4343

44+
- name: Authenticating to the Container registry
45+
run: echo $JH_PAT | docker login ghcr.io -u tanjiahuei@gmail.com --password-stdin
46+
env:
47+
JH_PAT: ${{ secrets.JH_PAT }}
48+
4449
- name: Launch services
4550
timeout-minutes: 15
4651
run: |

CHANGELOG.md

Lines changed: 140 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,146 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7-
The version number mentioned here refers to the cloud version.
7+
- Each section is broken into:
8+
9+
- `ADDED`: New features.
10+
- `CHANGED / FIXED`: Changes in existing functionality, or any bug fixes.
11+
- `DEPRECATED`: Soon-to-be removed features.
12+
- `REMOVED`: Removed features.
13+
- `SECURITY`: Anything related to vulnerabilities.
14+
15+
- The version number mentioned here refers to the cloud version.
16+
17+
## [Unreleased]
18+
19+
### ADDED
20+
21+
`Embeddings` endpoint
22+
23+
- Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. Note that the vectors are NOT normalized.
24+
- Similar to OpenAI's embeddings endpoint
25+
- Resolves #86
26+
27+
Generative Table
28+
29+
- Check existence of Knowledge Table when creating reference in either table creation or update gen_config. Resolves #142.
30+
- Full row data logging when error occurred in table rows add or update. Resolves #140.
31+
- Handle streaming exception by setting `ChatCompletionChunk.finish_reason` as "error". Also applies to chat endpoint.
32+
33+
UI
34+
35+
- Added button to delete projects
36+
- Added title to dashboard
37+
- Added config for building frontend into single-page application
38+
- Setup frontend auth test for future tests
39+
40+
### CHANGED / FIXED
41+
42+
Generative Table
43+
44+
- Conversation Chat table generation config can now be modified. Previously only Agent Chat table can be modified. Resolves #188
45+
- When creating a new table, a LLM model will be assigned dynamically if not specified in its `gen_config`. Resolves #190
46+
- Vector search
47+
- Change default metric to `cosine`; fixes #110
48+
- Reduce default `refine_factor` from 50 to 20 to speed up search
49+
- Hybrid search
50+
- Only do FTS once instead of looping through indexed col one by one (Lance/Tanvity FTS unable to specify search columns); fixes #138
51+
- Added Reciprocal Rank Fusion (RRF) to merge FTS and VS search results without using reranker; fixes #112
52+
- Added retry to search query, to handle possible failure case during FTS index build; fixes #111
53+
- Removed hybrid search with linear score combination (only uses RRF if without reranker)
54+
- Improved handling of mid-stream error
55+
- Any errors encountered mid-stream will yield a completion chunk with error details as `text` and "error" as `finish_reason`
56+
- Errored table column will have its cell value set to `None`
57+
- Missing columns in table row data are filled with `None`. It used to cause row add failure.
58+
- Retrieval Augmented Generation (RAG) is now more robust against missing column data.
59+
- Remap internal `ValidationError` to `RequestValidationError`. Fixes #162
60+
- Improved handling of Timeout errors
61+
- More aggressive Lance DB version cleanup: cleanup versions older than 5 minutes by default. Fixes #163
62+
- Added more tests
63+
- Bug fixes
64+
- If RAG query contains certain keyword in uppercase, it may be interpreted as term search and may lead to `SyntaxError`. It is now escaped. Fixes #187
65+
- Streaming response was not returning token usage. This also applies to chat endpoint.
66+
- Reference chunk `object` field value was incorrectly set as "chat.references" instead of "gen_table.references".
67+
- GenTable column reordering may produce tables with invalid generation config. Fixes #135
68+
- Stricter generation config validation
69+
70+
jamaibase
71+
72+
- Bug fixes: Fix type hinting
73+
- Removed dependency on `uuid-utils`
74+
75+
UI
76+
77+
- Standardize & improve UI errors, including validation errors
78+
- UI design changes
79+
- Obfuscate org secrets
80+
- Allow org members to view jamai keys
81+
- Refactor UI code
82+
- Fix edge case where organization team page would fail to load
83+
- Fix change password button not working
84+
- Fix missing project ID error when performing certain actions
85+
- Fix pagination arrows not working in large tables
86+
87+
Backend - owl (API server)
88+
89+
- Refactor cache into `Cache` class that abstracts away `redis`
90+
- Refactor LLM logic into `LLMEngine` class.
91+
- Rename `owl.utils.get_api_key` -> `owl.utils.filter_external_api_key`
92+
- Limit the number of rows that can be added at one time to 100. Fixes #157
93+
- Chat completion
94+
- Search query rewrite max token increased from 256 to 512.
95+
- If context length is exceeded and stream is False, completion usage is set to `None`.
96+
- Env var
97+
- `owl_redis_purge` changed to `owl_cache_purge`
98+
- `owl_remove_version_older_than_days` changed to `owl_remove_version_older_than_mins`
99+
- Logging
100+
- Add logging into exception handlers
101+
- Suppress `openmeter` logs
102+
- Improve exception logging
103+
- Reduce verbosity of regular logs
104+
- Bug fixes:
105+
- File loading extension checking was case-sensitive. Fixes #164
106+
- Windows: Temporary file must be closed before it can be accessed by other processes or nested contexts. Change to `TemporaryDirectory` instead. Fixes #125
107+
- Better validation error message
108+
- Removed `openai/gpt-4-vision-preview`
109+
- Dependencies
110+
- Pin `unstructured-client` to 0.22.0
111+
- Added `tenacity`
112+
- Bumped dependency versions
113+
114+
Backend - docio (PDF loader)
115+
116+
- Bug fixes:
117+
- Windows: Temporary file must be closed before it can be accessed by other processes or nested contexts. Change to `TemporaryDirectory` instead. Fixes #125
118+
119+
Backend - Admin (cloud)
120+
121+
- Improve insufficient credit error message: include quota/usage type in the message
122+
- Storage usage update is now a background process; fixes #87
123+
- Bug fixes
124+
- Org update previously failed due to incorrect default param for `db_storage_gb` and `file_storage_gb`
125+
- User invite email validation is now case-insensitive
126+
- If self-hosted model is not found in price list, return zero cost.
127+
128+
CI / CD / OSS
129+
130+
- Use our private Dragonfly container to avoid frequent timeouts
131+
- Bug fixes
132+
- Cloud removal script
133+
- Docker Compose health checks (`curl` was removed from `unstructured-io/unstructured-api`)
134+
- Fixed CORS error when uploading files
135+
136+
Misc
137+
138+
- Error responses now have "object" field with value "error"
139+
- Bug fix for cloud removal script
140+
- Mask LLM generations during logging; fixes #96
141+
- Added scripts
142+
- Update DB schema
143+
- Add credit to org
144+
- Update and rename quota reset script
145+
- Sync `owl` version with `jamaibase`
146+
- Documentation fix
8147

9148
## [v0.1] - 2024-06-03
10149

clients/python/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ dependencies = [
8383
"toml>=0.10.2",
8484
"tqdm>=4.66.1",
8585
"typing_extensions>=4.10.0",
86-
"uuid-utils~=0.6.1",
8786
"uuid7~=0.1.0",
8887
]
8988
dynamic = ["version"]

0 commit comments

Comments
 (0)