mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00
change semantics
Update README deployment steps and add deploy:secrets script to package.json update local inference script and README update lockfile reconfigure package scripts for development update test execution pass server tests Update README with revised Bun commands and workspace details remove pnpm package manager designator create bun server
This commit is contained in:

committed by
Geoff Seemueller

parent
1055cda2f1
commit
497eb22ad8
9
packages/server/models/ContactRecord.ts
Normal file
9
packages/server/models/ContactRecord.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { types } from "mobx-state-tree";
|
||||
|
||||
export default types.model("ContactRecord", {
|
||||
message: types.string,
|
||||
timestamp: types.string,
|
||||
email: types.string,
|
||||
firstname: types.string,
|
||||
lastname: types.string,
|
||||
});
|
10
packages/server/models/FeedbackRecord.ts
Normal file
10
packages/server/models/FeedbackRecord.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
// FeedbackRecord.ts
|
||||
import { types } from "mobx-state-tree";
|
||||
|
||||
const FeedbackRecord = types.model("FeedbackRecord", {
|
||||
feedback: types.string,
|
||||
timestamp: types.string,
|
||||
user: types.optional(types.string, "Anonymous"),
|
||||
});
|
||||
|
||||
export default FeedbackRecord;
|
18
packages/server/models/Message.ts
Normal file
18
packages/server/models/Message.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
// Base Message
|
||||
import { Instance, types } from "mobx-state-tree";
|
||||
|
||||
export default types
|
||||
.model("Message", {
|
||||
content: types.string,
|
||||
role: types.enumeration(["user", "assistant", "system"]),
|
||||
})
|
||||
.actions((self) => ({
|
||||
setContent(newContent: string) {
|
||||
self.content = newContent;
|
||||
},
|
||||
append(newContent: string) {
|
||||
self.content += newContent;
|
||||
},
|
||||
}));
|
||||
|
||||
export type MessageType = Instance<typeof this>;
|
20
packages/server/models/O1Message.ts
Normal file
20
packages/server/models/O1Message.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { types } from "mobx-state-tree";
|
||||
|
||||
export default types
|
||||
.model("O1Message", {
|
||||
role: types.enumeration(["user", "assistant", "system"]),
|
||||
content: types.array(
|
||||
types.model({
|
||||
type: types.string,
|
||||
text: types.string,
|
||||
}),
|
||||
),
|
||||
})
|
||||
.actions((self) => ({
|
||||
setContent(newContent: string, contentType: string = "text") {
|
||||
self.content = [{ type: contentType, text: newContent }];
|
||||
},
|
||||
append(newContent: string, contentType: string = "text") {
|
||||
self.content.push({ type: contentType, text: newContent });
|
||||
},
|
||||
}));
|
16
packages/server/models/OpenAiMessage.ts
Normal file
16
packages/server/models/OpenAiMessage.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// Models
|
||||
import { types } from "mobx-state-tree";
|
||||
|
||||
export default types
|
||||
.model("Message", {
|
||||
content: types.string,
|
||||
role: types.enumeration(["user", "assistant", "system"]),
|
||||
})
|
||||
.actions((self) => ({
|
||||
setContent(newContent: string) {
|
||||
self.content = newContent;
|
||||
},
|
||||
append(newContent: string) {
|
||||
self.content += newContent;
|
||||
},
|
||||
}));
|
Reference in New Issue
Block a user