@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/.turbo/turbo-build.log +7 -7
- package/dist/index.cjs +139 -67
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +41 -5
- package/dist/index.mjs +139 -67
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
- package/refresh-models.ts +0 -6
package/package.json
CHANGED
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) => {
|