{"_id":"dialoqbase","_rev":"3-3061410b1a474ee6c8f76f52339d859b","name":"dialoqbase","dist-tags":{"latest":"0.2.1"},"versions":{"0.0.0":{"name":"dialoqbase","type":"module","version":"0.0.0","packageManager":"pnpm@8.15.3","description":"A client library for Dialoqbase","author":{"name":"Muhammed Nazeem","email":"n4ze3m@gmail.com"},"license":"MIT","funding":"https://github.com/sponsors/n4ze3m","homepage":"https://github.com/n4ze3m/dialoqbase#readme","repository":{"type":"git","url":"git+https://github.com/n4ze3m/dialoqbase.git"},"bugs":{"url":"https://github.com/n4ze3m/dialoqbase/issues"},"keywords":[],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"devDependencies":{"@antfu/eslint-config":"^2.6.4","@antfu/ni":"^0.21.12","@antfu/utils":"^0.7.7","@types/node":"^20.11.19","bumpp":"^9.3.0","eslint":"^8.56.0","esno":"^4.0.0","form-data":"^4.0.0","lint-staged":"^15.2.2","pnpm":"^8.15.3","rimraf":"^5.0.5","simple-git-hooks":"^2.9.0","typescript":"^5.3.3","unbuild":"^2.0.0","vite":"^5.1.4","vitest":"^1.3.1"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"dependencies":{"axios":"^1.6.8","zod":"^3.22.4"},"scripts":{"build":"unbuild","dev":"unbuild --stub","lint":"eslint .","release":"bumpp && npm publish","start":"esno src/index.ts","test":"vitest","typecheck":"tsc --noEmit"},"_id":"dialoqbase@0.0.0","_integrity":"sha512-aiNWJ2G5Hrd6iwehuJ6S/4Iuixbk/P8F4UvKKPhV3Whl30plknUzoh3LktpkM6b7brdBOPRu/ZCAz6Op04QTDg==","_resolved":"C:\\Users\\n4ze3\\AppData\\Local\\Temp\\b5fa61afa138328a6f596ab280ee532d\\dialoqbase-0.0.0.tgz","_from":"file:dialoqbase-0.0.0.tgz","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-aiNWJ2G5Hrd6iwehuJ6S/4Iuixbk/P8F4UvKKPhV3Whl30plknUzoh3LktpkM6b7brdBOPRu/ZCAz6Op04QTDg==","shasum":"24d612eae8e34edd3e7201cef1ba698c9d9d3d29","tarball":"https://registry.npmjs.org/dialoqbase/-/dialoqbase-0.0.0.tgz","fileCount":8,"unpackedSize":107783,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHIMjF1dp134P88FbIFPiRaQVzCh3DSDmfqA6Tp0X0aAIhAM9vScTHJRE3VI/gokd7js9T3227MVmw5m49mc1wZIrI"}]},"_npmUser":{"name":"n4ze3m","email":"nazeemnob18@gmail.com"},"directories":{},"maintainers":[{"name":"n4ze3m","email":"nazeemnob18@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dialoqbase_0.0.0_1710959004345_0.27469496255032677"},"_hasShrinkwrap":false},"0.1.1":{"name":"dialoqbase","type":"module","version":"0.1.1","packageManager":"pnpm@8.15.3","description":"A client library for Dialoqbase","author":{"name":"Muhammed Nazeem","email":"n4ze3m@gmail.com"},"license":"MIT","funding":"https://github.com/sponsors/n4ze3m","homepage":"https://github.com/n4ze3m/dialoqbase#readme","repository":{"type":"git","url":"git+https://github.com/n4ze3m/dialoqbase.git"},"bugs":{"url":"https://github.com/n4ze3m/dialoqbase/issues"},"keywords":[],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"scripts":{"build":"unbuild","dev":"unbuild --stub","lint":"eslint .","prepublishOnly":"nr build","release":"bumpp && npm publish","start":"esno src/index.ts","test":"vitest","typecheck":"tsc --noEmit","prepare":"simple-git-hooks"},"dependencies":{"axios":"^1.6.8","zod":"^3.22.4"},"devDependencies":{"@antfu/eslint-config":"^2.6.4","@antfu/ni":"^0.21.12","@antfu/utils":"^0.7.7","@types/node":"^20.11.19","bumpp":"^9.3.0","eslint":"^8.56.0","esno":"^4.0.0","form-data":"^4.0.0","lint-staged":"^15.2.2","pnpm":"^8.15.3","rimraf":"^5.0.5","simple-git-hooks":"^2.9.0","typescript":"^5.3.3","unbuild":"^2.0.0","vite":"^5.1.4","vitest":"^1.3.1"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"gitHead":"f94e4788f8dfb38e4d5561bac9d1cd0b490b3169","_id":"dialoqbase@0.1.1","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-qbOD5uWM3hlUo6J/WcVe+z0lYVLDVfoPi9tT2SdpDx2nmWj1fUPAk1ig/OGU7drsLkmMlfuBc2ohYu37ueWNvA==","shasum":"8cef6fbb1dd1aba3d6aa602d31000c08c46120ce","tarball":"https://registry.npmjs.org/dialoqbase/-/dialoqbase-0.1.1.tgz","fileCount":8,"unpackedSize":109801,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQ/wK3lZybaEspcJpWcgONrj51pTOeoterZlyqeXwfRAIgUiHbsBGkeBQTo/6wohfVTDeV9Ua7YoDga7tIlvvl6kk="}]},"_npmUser":{"name":"n4ze3m","email":"nazeemnob18@gmail.com"},"directories":{},"maintainers":[{"name":"n4ze3m","email":"nazeemnob18@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dialoqbase_0.1.1_1710960154948_0.5628868192038909"},"_hasShrinkwrap":false},"0.2.0":{"name":"dialoqbase","type":"module","version":"0.2.0","packageManager":"pnpm@8.15.3","description":"A client library for Dialoqbase","author":{"name":"Muhammed Nazeem","email":"n4ze3m@gmail.com"},"license":"MIT","funding":"https://github.com/sponsors/n4ze3m","homepage":"https://github.com/n4ze3m/dialoqbase#readme","repository":{"type":"git","url":"git+https://github.com/n4ze3m/dialoqbase.git"},"bugs":{"url":"https://github.com/n4ze3m/dialoqbase/issues"},"keywords":[],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"scripts":{"build":"unbuild","dev":"unbuild --stub","lint":"eslint .","prepublishOnly":"nr build","release":"bumpp && npm publish","start":"esno src/index.ts","test":"vitest","typecheck":"tsc --noEmit","prepare":"simple-git-hooks"},"dependencies":{"axios":"^1.6.8","zod":"^3.22.4"},"devDependencies":{"@antfu/eslint-config":"^2.6.4","@antfu/ni":"^0.21.12","@antfu/utils":"^0.7.7","@types/node":"^20.11.19","bumpp":"^9.3.0","eslint":"^8.56.0","esno":"^4.0.0","form-data":"^4.0.0","lint-staged":"^15.2.2","pnpm":"^8.15.3","rimraf":"^5.0.5","simple-git-hooks":"^2.9.0","typescript":"^5.3.3","unbuild":"^2.0.0","vite":"^5.1.4","vitest":"^1.3.1"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"gitHead":"db2106523def8c2152aec61dc9fc1af0e0816e13","_id":"dialoqbase@0.2.0","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-SiACRnV1Wqda5p3cNO5AR86qBJVSB0IZTSopvAOZ03CLWcYQuhlS2agouR1ZLP+6cuTCa/coaCH4tCMgcfjnSw==","shasum":"0ff53cbaf8ee258ad46ac24aa8970858dc6d74ce","tarball":"https://registry.npmjs.org/dialoqbase/-/dialoqbase-0.2.0.tgz","fileCount":8,"unpackedSize":109542,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7rkzPY3gvGR3ge300FgWH/siM2s/Y2rZe+vV8OtjsZQIgWrqip4TQGcFjuOa+ENoTNqXRff9H6/4DXUDnTSo5Wnk="}]},"_npmUser":{"name":"n4ze3m","email":"nazeemnob18@gmail.com"},"directories":{},"maintainers":[{"name":"n4ze3m","email":"nazeemnob18@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dialoqbase_0.2.0_1710960558245_0.4331476185206524"},"_hasShrinkwrap":false},"0.2.1":{"name":"dialoqbase","type":"module","version":"0.2.1","description":"A client library for Dialoqbase","author":{"name":"Muhammed Nazeem","email":"n4ze3m@gmail.com"},"license":"MIT","funding":"https://github.com/sponsors/n4ze3m","homepage":"https://github.com/n4ze3m/dialoqbase#readme","repository":{"type":"git","url":"git+https://github.com/n4ze3m/dialoqbase.git"},"bugs":{"url":"https://github.com/n4ze3m/dialoqbase/issues"},"keywords":[],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"scripts":{"build":"unbuild","dev":"unbuild --stub","lint":"eslint .","prepublishOnly":"nr build","release":"bumpp && npm publish","start":"esno src/index.ts","test":"vitest","typecheck":"tsc --noEmit","prepare":"simple-git-hooks"},"dependencies":{"axios":"^1.6.8","zod":"^3.22.4"},"devDependencies":{"@antfu/eslint-config":"^2.6.4","@antfu/ni":"^0.21.12","@antfu/utils":"^0.7.7","@types/node":"^20.11.19","bumpp":"^9.3.0","eslint":"^8.56.0","esno":"^4.0.0","form-data":"^4.0.0","lint-staged":"^15.2.2","pnpm":"^8.15.3","rimraf":"^5.0.5","simple-git-hooks":"^2.9.0","typescript":"^5.3.3","unbuild":"^2.0.0","vite":"^5.1.4","vitest":"^1.3.1"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"gitHead":"8f0d592273d642570032751d12c103e701941856","_id":"dialoqbase@0.2.1","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-Yfse92JYGvTAqr3O3gcIB7yS4fXCFOyL9lAaMGxjUzoppES0ddTTdBP0t2IoXyz2HVISZOpeQWZzKDBaZr2w2A==","shasum":"6a70e00f4c23d67ae565e7bfe558fc54e15b3283","tarball":"https://registry.npmjs.org/dialoqbase/-/dialoqbase-0.2.1.tgz","fileCount":8,"unpackedSize":112946,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCi0ARY45E2ztgRuKprZgEvJtYSFR0Uy/7PSOIJMiq87gIhAL5ZJgAJ7sMLpk23vQtXnZNhSuZe0Gea51kfUgbg5Ymb"}]},"_npmUser":{"name":"n4ze3m","email":"nazeemnob18@gmail.com"},"directories":{},"maintainers":[{"name":"n4ze3m","email":"nazeemnob18@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dialoqbase_0.2.1_1715968778321_0.5653416978429517"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-20T18:23:24.345Z","0.0.0":"2024-03-20T18:23:24.546Z","modified":"2024-05-17T17:59:38.630Z","0.1.1":"2024-03-20T18:42:35.180Z","0.2.0":"2024-03-20T18:49:18.432Z","0.2.1":"2024-05-17T17:59:38.478Z"},"maintainers":[{"name":"n4ze3m","email":"nazeemnob18@gmail.com"}],"description":"A client library for Dialoqbase","homepage":"https://github.com/n4ze3m/dialoqbase#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/n4ze3m/dialoqbase.git"},"author":{"name":"Muhammed Nazeem","email":"n4ze3m@gmail.com"},"bugs":{"url":"https://github.com/n4ze3m/dialoqbase/issues"},"license":"MIT","readme":"# dialoqbase-js\r\n\r\nThis is a JavaScript library for the [Dialoqbase](https://dialoqbase.n4ze3m.com) API. It is a simple wrapper around the API, providing a more convenient way to interact with it.\r\n\r\n## Getting Started\r\n\r\nFirst of all, you need to install the library:\r\n\r\n```bash\r\nnpm install dialoqbase\r\n```\r\n\r\nThen you're ready to use it:\r\n\r\n```typescript\r\nimport { createClient } from 'dialoqbase';\r\n\r\nconst dialoqbase = createClient(\r\n    'http://localhost:3000',\r\n    'your-api-key'\r\n)\r\n```\r\n\r\n## Usage\r\n\r\n### Creating a new bot\r\n\r\n```typescript\r\nconst {data, error} = await dialoqbase.bot.create({\r\n    name: \"Test Bot 2\",\r\n    model: \"claude-3-opus-20240229\",\r\n    embedding: \"nomic-ai/nomic-embed-text-v1.5\"\r\n})\r\n```\r\n\r\n### Adding file based sources\r\n\r\n```typescript\r\nconst formData = new FormData();\r\n\r\nformData.append(\"file\", pdfFile, \"test.pdf\")\r\nformData.append(\"file\", mp3File, \"test.mp3\")\r\n\r\nconst {data, error} = await dialoqbase.bot.source.addFile(botId, formData)\r\n```\r\n\r\n### Adding text based sources\r\n\r\n```typescript\r\nconst {data, error} = await dialoqbase.bot.source.add(botId, [\r\n    {\r\n        content: \"https://n4ze3m.com\",\r\n        type: \"website\",\r\n    },\r\n    {\r\n        content: \"https://www.youtube.com/watch?v=BLmsVvcUxmY\",\r\n        type: \"youtube\",\r\n        options: {\r\n            youtube_mode: \"transcript\"\r\n        }\r\n    },\r\n    {\r\n        content: \"Hello World!\",\r\n        type: \"text\",\r\n    },\r\n])\r\n```\r\n\r\n### Chatting with the bot (streaming)\r\n\r\n```typescript\r\nconst chat = await dialoqbase.bot.chat(botId, {\r\n    message: \"Hello tell me a joke\",\r\n    stream: true,\r\n    history: []\r\n})\r\n\r\nfor await (const message of chat) {\r\n    console.log(message.bot.text)\r\n}\r\n```\r\n\r\n### Chatting with the bot (non-streaming)\r\n\r\n```typescript\r\nconst response = await dialoqbase.bot.chat(botId, {\r\n    message: \"Hello tell me a joke\",\r\n    stream: false,\r\n    history: []\r\n})\r\n\r\nconsole.log(response.bot.text)\r\n```\r\n\r\n### Deleting a bot\r\n\r\n```typescript\r\nconst {data, error} = await dialoqbase.bot.delete(botId)\r\n```\r\n\r\n## License\r\n\r\nMIT\n","readmeFilename":"README.md"}