mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00

- Moved `providers`, `services`, `models`, `lib`, and related files to `src` directory within `server` package. - Adjusted imports across the codebase to reflect the new paths. - Renamed several `.ts` files for consistency. - Introduced an `index.ts` in the `ai/providers` package to export all providers. This improves maintainability and aligns with the project's updated directory structure.
21 lines
576 B
TypeScript
21 lines
576 B
TypeScript
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 });
|
|
},
|
|
}));
|