23 lines
454 B
JavaScript
23 lines
454 B
JavaScript
'use strict';
|
|
|
|
const crypto = require('crypto');
|
|
|
|
function createState() {
|
|
return {
|
|
conversationId: crypto.randomUUID(),
|
|
allow: 'full_access',
|
|
model: 'kimi',
|
|
thinking: 'thinking',
|
|
tokenUsage: 0,
|
|
baseUrl: 'https://api.example.com/v1',
|
|
apiKey: 'sk-xxxxxxw2y',
|
|
};
|
|
}
|
|
|
|
function newConversation(state) {
|
|
state.conversationId = crypto.randomUUID();
|
|
state.tokenUsage = 0;
|
|
}
|
|
|
|
module.exports = { createState, newConversation };
|