Function
createModel
(
contextLength: number,
maxTokens?: number,
)
Source from the content-addressed store, hash-verified
| 229 | |
| 230 | describe("shouldAutoCompact", () => { |
| 231 | const createModel = ( |
| 232 | contextLength: number, |
| 233 | maxTokens?: number, |
| 234 | ): ModelConfig => ({ |
| 235 | name: "test-model", |
| 236 | model: "test", |
| 237 | provider: "openai", |
| 238 | defaultCompletionOptions: { |
| 239 | contextLength, |
| 240 | maxTokens, |
| 241 | }, |
| 242 | }); |
| 243 | |
| 244 | const createChatHistory = (tokenCount: number): ChatHistoryItem[] => { |
| 245 | // Create a message that will result in approximately the desired token count |
Tested by
no test coverage detected