@botpress/cognitive 0.1.50 → 0.2.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/cognitive",
3
- "version": "0.1.50",
3
+ "version": "0.2.1",
4
4
  "description": "Wrapper around the Botpress Client to call LLMs",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
package/refresh-models.ts CHANGED
@@ -24,8 +24,6 @@ async function main(): Promise<void> {
24
24
  const key = process.env.TOKEN
25
25
  const botId = process.env.BOT_ID
26
26
 
27
- console.log('Fetching models ...')
28
-
29
27
  const {
30
28
  data: { models },
31
29
  } = await axios.get<{ models: RemoteModel[] }>(`${server}/models?includeDeprecated=true`, {
@@ -55,8 +53,6 @@ export const defaultModel: RemoteModel = ${JSON.stringify(defaultModel, undefine
55
53
 
56
54
  fs.writeFileSync(modelsListPath, newFile, 'utf8')
57
55
 
58
- console.log(`Saved ${models?.length} models to ${modelsListPath}`)
59
-
60
56
  const withoutDeprecated = models.filter((m) => !filteredLifecycles.includes(m.lifecycle))
61
57
  const refs = Array.from(new Set(withoutDeprecated.map(toRef).filter(Boolean))).sort((a, b) => a.localeCompare(b))
62
58
  const aliases = models.flatMap((m) =>
@@ -83,8 +79,6 @@ export const defaultModel: RemoteModel = ${JSON.stringify(defaultModel, undefine
83
79
 
84
80
  const nextContent = content.slice(0, startIdx) + unionBlock + content.slice(endIdx)
85
81
  fs.writeFileSync(typesPath, nextContent, 'utf8')
86
-
87
- console.log(`Updated Models union in ${typesPath} with ${items.length} entries`)
88
82
  }
89
83
 
90
84
  main().catch((err: unknown) => {