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

devcontainer v1 #297

Merged
merged 56 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b4993bc
devcontainer v1
franzbischoff Oct 26, 2023
8fd0946
tweaks
franzbischoff Oct 27, 2023
fa6f135
tweaks 2
franzbischoff Oct 27, 2023
a1cd687
rebase
franzbischoff Nov 4, 2023
417b3ee
Update AWS deployment
timothycarambat Oct 29, 2023
e483c7a
mbox parsing improvements v1 (#308)
franzbischoff Oct 30, 2023
b73a59a
282 return relevancy score with similarityresponse (#304)
shatfield4 Oct 30, 2023
d59058a
Rebase
timothycarambat Oct 30, 2023
fe4eeed
fix import path
timothycarambat Oct 30, 2023
5869d8b
Implement retrieval and use of fine-tune models (#314)
timothycarambat Oct 31, 2023
dd4bf0c
patch workspace chat history windows to persist most recent chats, no…
timothycarambat Nov 1, 2023
a5ccd3d
Fix white border around user avatar glitch (#320)
shatfield4 Nov 1, 2023
c0cc9a2
normalize parser struct for all file types (#321)
timothycarambat Nov 1, 2023
73699b4
Use toast in workspace settings tab (#322)
shatfield4 Nov 2, 2023
a70fe43
change how node is installed on docker
timothycarambat Nov 2, 2023
986a54d
bind docker to docker/.env so dumps persist between restarts
timothycarambat Nov 2, 2023
ede764c
Fix admin chat pagination
timothycarambat Nov 2, 2023
5a6c267
Replace old modals to match UI (#328)
shatfield4 Nov 2, 2023
fcde3b1
Fix missing import on API (#333)
timothycarambat Nov 3, 2023
de75269
rebase
franzbischoff Nov 4, 2023
fe96d33
instructions
franzbischoff Nov 5, 2023
9e0848c
Merge branch 'master' into feature/devcont
franzbischoff Nov 5, 2023
7294de8
Infinite prompt input and compression implementation (#332)
franzbischoff Nov 7, 2023
d46c0f7
disable import on hosted instances (#339)
shatfield4 Nov 6, 2023
aa8182a
Add support for gpt-4-turbo 128K model (#340)
timothycarambat Nov 6, 2023
1e05787
315 show citations based on relevancy score (#316)
timothycarambat Nov 7, 2023
400e144
Merge branch 'Mintplex-Labs:master' into feature/devcont
franzbischoff Nov 9, 2023
1cc8891
Merge branch 'master' into feature/devcont
franzbischoff Nov 9, 2023
a4106bb
Merge branch 'master' into feature/devcont
franzbischoff Nov 16, 2023
ce51a3e
Merge branch 'Mintplex-Labs:master' into feature/devcont
franzbischoff Nov 17, 2023
3b8c215
Merge branch 'Mintplex-Labs:master' into feature/devcont
franzbischoff Nov 22, 2023
576a4bd
Add terraform lang server and lint; Add debug launch for collector
franzbischoff Nov 25, 2023
72c74df
fix on web collector dependencies
franzbischoff Nov 29, 2023
f19fc9b
Merge branch 'Mintplex-Labs:master' into feature/devcont
franzbischoff Nov 29, 2023
523790a
automate some things
franzbischoff Nov 30, 2023
9b5658f
another fix
franzbischoff Nov 30, 2023
efae996
final fix
franzbischoff Dec 2, 2023
571504c
Merge branch 'master' into feature/devcont
franzbischoff Dec 10, 2023
3ed4777
Merge branch 'Mintplex-Labs:master' into feature/devcont
franzbischoff Dec 13, 2023
fb9e300
Merge remote-tracking branch 'upstream/master' into feature/devcont
franzbischoff Dec 17, 2023
d598539
upd
franzbischoff Dec 17, 2023
0494e50
Merge branch 'Mintplex-Labs:master' into feature/devcont
franzbischoff Dec 17, 2023
86fac10
Update vite.config.js with new import statement
franzbischoff Dec 17, 2023
a778960
Merge branch 'Mintplex-Labs:master' into feature/devcont
franzbischoff Dec 18, 2023
ca3f744
Add missing dependencies and update Puppeteer launch options
franzbischoff Dec 19, 2023
c82cfb4
Optimize CI workflow and enhance README
franzbischoff Dec 22, 2023
12ae321
asd
franzbischoff Dec 22, 2023
f2fdd55
fix sandbox
franzbischoff Dec 23, 2023
8aefa3e
Merge branch 'Mintplex-Labs:master' into feature/devcont
franzbischoff Dec 28, 2023
207b951
Merge branch 'Mintplex-Labs:master' into feature/devcont
franzbischoff Dec 28, 2023
1f6c1ac
Rewrite README
franzbischoff Dec 29, 2023
ab46276
Merge branch 'Mintplex-Labs:master' into feature/devcont
franzbischoff Jan 5, 2024
40c3bf6
Merge branch 'Mintplex-Labs:master' into feature/devcont
franzbischoff Jan 6, 2024
df68d2d
Merge branch 'Mintplex-Labs:master' into feature/devcont
franzbischoff Jan 8, 2024
01fc074
Merge branch 'Mintplex-Labs:master' into feature/devcont
franzbischoff Jan 8, 2024
8630f35
unset changes to readme
timothycarambat Jan 8, 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
Prev Previous commit
Next Next commit
Fix admin chat pagination
  • Loading branch information
timothycarambat authored and franzbischoff committed Nov 4, 2023
commit ede764c0cd7af2f7534bbe31163dc1cbc4498997
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default function WorkspaceSettings({ workspace }) {
const [totalVectors, setTotalVectors] = useState(null);
const [canDelete, setCanDelete] = useState(false);


useEffect(() => {
async function fetchKeys() {
const canDelete = await System.getCanDeleteWorkspaces();
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,6 @@ dialog::backdrop {
top: 100%;
}

.user-reply>div:first-of-type {
.user-reply > div:first-of-type {
border: 2px solid white;
}
}
16 changes: 3 additions & 13 deletions frontend/src/pages/Admin/Chats/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Admin from "../../../models/admin";
import useQuery from "../../../hooks/useQuery";
import ChatRow from "./ChatRow";

const PAGE_SIZE = 20;
export default function AdminChats() {
return (
<div className="w-screen h-screen overflow-hidden bg-sidebar flex">
Expand Down Expand Up @@ -45,21 +46,10 @@ function ChatsContainer() {
const [canNext, setCanNext] = useState(false);

const handlePrevious = () => {
if (chats.length === 0) {
setOffset(0);
return;
}

const chat = chats.at(-1);
if (chat.id - 20 <= 0) {
setOffset(0);
return;
}

setOffset(chat.id - 1);
setOffset(Math.max(offset - 1, 0));
};
const handleNext = () => {
setOffset(chats[0].id + 1);
setOffset(offset + 1);
};

useEffect(() => {
Expand Down
12 changes: 6 additions & 6 deletions server/endpoints/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,15 @@ function adminEndpoints(app) {

const { offset = 0, limit = 20 } = reqBody(request);
const chats = await WorkspaceChats.whereWithData(
{ id: { gte: offset } },
limit
{},
limit,
offset * limit,
{ id: "desc" }
);
const totalChats = await WorkspaceChats.count();
const hasPages = totalChats > offset + limit;
const hasPages = totalChats > (offset + 1) * limit;

response
.status(200)
.json({ chats: chats.reverse(), hasPages, totalChats });
response.status(200).json({ chats: chats, hasPages, totalChats });
} catch (e) {
console.error(e);
response.sendStatus(500).end();
Expand Down
13 changes: 8 additions & 5 deletions server/endpoints/api/admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,14 +513,17 @@ function apiAdminEndpoints(app) {
response.sendStatus(401).end();
return;
}

const pgSize = 20;
const { offset = 0 } = reqBody(request);
const chats = await WorkspaceChats.whereWithData(
{ id: { gte: offset } },
20
{},
pgSize,
offset * pgSize,
{ id: "desc" }
);
const hasPages = (await WorkspaceChats.count()) > 20;
response.status(200).json({ chats: chats.reverse(), hasPages });

const hasPages = (await WorkspaceChats.count()) > (offset + 1) * pgSize;
response.status(200).json({ chats: chats, hasPages });
} catch (e) {
console.error(e);
response.sendStatus(500).end();
Expand Down
17 changes: 14 additions & 3 deletions server/models/workspaceChats.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,17 @@ const WorkspaceChats = {
}
},

where: async function (clause = {}, limit = null, orderBy = null) {
where: async function (
clause = {},
limit = null,
orderBy = null,
offset = null
) {
try {
const chats = await prisma.workspace_chats.findMany({
where: clause,
...(limit !== null ? { take: limit } : {}),
...(offset !== null ? { skip: offset } : {}),
...(orderBy !== null ? { orderBy } : {}),
});
return chats;
Expand All @@ -134,12 +140,17 @@ const WorkspaceChats = {
}
},

whereWithData: async function (clause = {}, limit = null, orderBy = null) {
whereWithData: async function (
clause = {},
limit = null,
offset = null,
orderBy = null
) {
const { Workspace } = require("./workspace");
const { User } = require("./user");

try {
const results = await this.where(clause, limit, orderBy);
const results = await this.where(clause, limit, orderBy, offset);

for (const res of results) {
const workspace = await Workspace.get({ id: res.workspaceId });
Expand Down