feat(web): add web demo and polish Lit web components UI and demo tooling
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { getModel } from '@push.rocks/smartai';
|
||||
import { startChat } from '../ts_cli/index.js';
|
||||
|
||||
const apiKey = process.env.ANTHROPIC_TOKEN;
|
||||
if (!apiKey) {
|
||||
console.error('Missing ANTHROPIC_TOKEN environment variable.');
|
||||
console.error('Usage: ANTHROPIC_TOKEN=sk-... tsx demo/demo.cli.ts');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const model = getModel({
|
||||
provider: 'anthropic',
|
||||
model: 'claude-sonnet-4-5-20250929',
|
||||
apiKey,
|
||||
});
|
||||
|
||||
await startChat({
|
||||
model,
|
||||
system: 'You are a friendly, concise assistant. Keep responses short unless asked for detail.',
|
||||
modelName: 'Claude Sonnet',
|
||||
});
|
||||
Reference in New Issue
Block a user