@narrative-os/cli 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,32 +91,61 @@ async function configCommand(showOnly = false) {
91
91
  choices: providerInfo.models.map(m => ({ name: m, value: m })),
92
92
  default: provider === 'deepseek' ? 'deepseek-chat' : 'gpt-4o-mini',
93
93
  });
94
+ // Ask for embedding provider (DeepSeek doesn't support embeddings)
95
+ const useOpenAIEmbeddings = await confirm({
96
+ message: 'Use OpenAI for embeddings? (DeepSeek does not support embeddings)',
97
+ default: provider !== 'deepseek',
98
+ });
99
+ let embeddingConfig;
100
+ if (useOpenAIEmbeddings) {
101
+ const openAIEmbedKey = await password({
102
+ message: 'Enter OpenAI API key (for embeddings):',
103
+ mask: '*',
104
+ });
105
+ embeddingConfig = {
106
+ name: 'embedding',
107
+ provider: 'openai',
108
+ apiKey: openAIEmbedKey,
109
+ model: 'text-embedding-3-small',
110
+ purpose: 'fast',
111
+ };
112
+ }
94
113
  const baseURL = provider === 'deepseek' ? 'https://api.deepseek.com' : undefined;
114
+ const models = [
115
+ {
116
+ name: 'reasoning',
117
+ provider: provider,
118
+ apiKey,
119
+ baseURL,
120
+ model: reasoningModel,
121
+ purpose: 'reasoning',
122
+ },
123
+ {
124
+ name: 'chat',
125
+ provider: provider,
126
+ apiKey,
127
+ baseURL,
128
+ model: chatModel,
129
+ purpose: 'chat',
130
+ },
131
+ ];
132
+ if (embeddingConfig) {
133
+ models.push(embeddingConfig);
134
+ }
95
135
  const config = {
96
- models: [
97
- {
98
- name: 'reasoning',
99
- provider: provider,
100
- apiKey,
101
- baseURL,
102
- model: reasoningModel,
103
- purpose: 'reasoning',
104
- },
105
- {
106
- name: 'chat',
107
- provider: provider,
108
- apiKey,
109
- baseURL,
110
- model: chatModel,
111
- purpose: 'chat',
112
- },
113
- ],
136
+ models,
114
137
  defaultModel: 'chat',
115
138
  };
116
139
  saveConfig(config);
117
140
  console.log(`\n✅ Multi-model configuration saved!`);
118
141
  console.log(` Reasoning: ${reasoningModel}`);
119
142
  console.log(` Chat: ${chatModel}`);
143
+ if (embeddingConfig) {
144
+ console.log(` Embeddings: OpenAI (text-embedding-3-small)`);
145
+ }
146
+ else {
147
+ console.log(` Embeddings: Mock (no API configured)`);
148
+ }
120
149
  }
121
150
  else {
122
151
  // Single model configuration (legacy)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative-os/cli",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "AI-native narrative engine for long-form story generation",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@inquirer/prompts": "^8.3.0",
42
- "@narrative-os/engine": "0.1.5",
42
+ "@narrative-os/engine": "0.1.6",
43
43
  "commander": "^12.0.0"
44
44
  },
45
45
  "devDependencies": {