{"_id":"@bytebitlabs/nest-groq","_rev":"7-cdb4b47d9d5ff89e7f8d0049d951992a","name":"@bytebitlabs/nest-groq","dist-tags":{"latest":"1.1.0"},"versions":{"0.1.0":{"name":"@bytebitlabs/nest-groq","version":"0.1.0","license":"MIT","_id":"@bytebitlabs/nest-groq@0.1.0","maintainers":[{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"}],"dist":{"shasum":"2e021a658103aac54cc1b40c64db2c65e31a1d27","tarball":"https://registry.npmjs.org/@bytebitlabs/nest-groq/-/nest-groq-0.1.0.tgz","fileCount":20,"integrity":"sha512-dthlFjWE/+/oGaEsDosyy/+cGCdBGjCR4tktALB5M8cc+2LVgS1gYKoqSljFTWq3Obptj2NiCTCx08fEOQeXWQ==","signatures":[{"sig":"MEUCIF/itv4F48sNHciGqBbvDgj5+tnrohUsCLFNDvR8A5ymAiEA3SkelQJLWugAbOWcKn9z9qTvf4DGQb5/LyhusPovzx0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10738},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","gitHead":"7ef6f8df4e9fdc0b5484ffb606791b86197af767","typings":"./src/index.d.ts","_npmUser":{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"},"_npmVersion":"10.5.2","description":"<p align=\"center\">   <a href=\"https://bytebitlabs.com/\" target=\"_blank\"><img src=\"https://gravatar.com/avatar/61c80d73dfe4c4231e77940cf80fd410?size=256\" width=\"256\" alt=\"ByteBitLabs logo\" /></a> </p>","directories":{},"_nodeVersion":"20.13.1","dependencies":{"tslib":"^2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nest-groq_0.1.0_1723730107546_0.4397490299910094","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@bytebitlabs/nest-groq","version":"0.1.1","license":"MIT","_id":"@bytebitlabs/nest-groq@0.1.1","maintainers":[{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"}],"dist":{"shasum":"9e8ed698426d9d78a6bc863415c3244f54b5f524","tarball":"https://registry.npmjs.org/@bytebitlabs/nest-groq/-/nest-groq-0.1.1.tgz","fileCount":20,"integrity":"sha512-3EqGLb9ReSkz/X+XzHY9DCinq2MASSoKXY28tyy4Dw18/OYAPXzkgk6vvlGXggAIC+bM8cUgJy+SHhJYVhekeA==","signatures":[{"sig":"MEUCIQCFiT2Gi7Cyl8RU9k0RWf5D5mE78EasKe7Or8OO91A2qAIgIieQXssBxlxsEjVp6Mz1MVVeS1k0wOLRP/V1/qnyCDY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10738},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","gitHead":"9ac581ff68f03d00df4a88865f2f1744a9ed2656","typings":"./src/index.d.ts","_npmUser":{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"},"_npmVersion":"10.5.2","description":"<p align=\"center\">   <a href=\"https://bytebitlabs.com/\" target=\"_blank\"><img src=\"https://gravatar.com/avatar/61c80d73dfe4c4231e77940cf80fd410?size=256\" width=\"256\" alt=\"ByteBitLabs logo\" /></a> </p>","directories":{},"_nodeVersion":"20.13.1","dependencies":{"tslib":"^2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nest-groq_0.1.1_1723745046055_0.13794592946185102","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"@bytebitlabs/nest-groq","version":"0.1.3","license":"MIT","_id":"@bytebitlabs/nest-groq@0.1.3","maintainers":[{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"}],"dist":{"shasum":"845f6e472cb1faa14aea9a157bf558b1b0d1667f","tarball":"https://registry.npmjs.org/@bytebitlabs/nest-groq/-/nest-groq-0.1.3.tgz","fileCount":20,"integrity":"sha512-EbOWLwGdVrKxpepJrViWhE6fgdXIPBehYQ7mIhK2bYoUh2drcNWyfI/q+jTR2oCjNaZian1Urs1bhGuvaTJ7FQ==","signatures":[{"sig":"MEQCIHq0aAQhbaWvurlA8ZurS0p9OHtGWeqeF5s316M+Msq+AiAwLfIsPZ10hz1MZ8xKQlDAqOIiH0LMUM2lb6SGq25ytA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10738},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","gitHead":"bd1b5bf77c1e81013bb06d56f6d802aea7440d43","typings":"./src/index.d.ts","_npmUser":{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"},"_npmVersion":"10.5.2","description":"<p align=\"center\">   <a href=\"https://bytebitlabs.com/\" target=\"_blank\"><img src=\"https://gravatar.com/avatar/61c80d73dfe4c4231e77940cf80fd410?size=256\" width=\"256\" alt=\"ByteBitLabs logo\" /></a> </p>","directories":{},"_nodeVersion":"20.13.1","dependencies":{"tslib":"^2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nest-groq_0.1.3_1727159146825_0.6873768750311424","host":"s3://npm-registry-packages"}},"1.0.0-0":{"name":"@bytebitlabs/nest-groq","version":"1.0.0-0","license":"MIT","_id":"@bytebitlabs/nest-groq@1.0.0-0","maintainers":[{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"}],"dist":{"shasum":"4e5a9745820a427f46ad36a8689e70b9f85e5be7","tarball":"https://registry.npmjs.org/@bytebitlabs/nest-groq/-/nest-groq-1.0.0-0.tgz","fileCount":20,"integrity":"sha512-bdJEFHx4OcF5IFLOOgmE/stZsiXJMIDMliK4Dnltue2suK/bvZgfQMC5B9jtVPPKGbra2o/x6SxL0DZU2GiFyw==","signatures":[{"sig":"MEUCIQCrMIlfCf7rwAqXCzCOZyxx1EQb590BxIDdyCMgqXGLWgIgBe8X+DGsB1d6UdO3YOnm8bTC+qPTihsggQk+taQ4LHE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10740},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","gitHead":"ba9fcdf8beb2775837215e03b516a4157388989a","typings":"./src/index.d.ts","_npmUser":{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"},"_npmVersion":"10.5.2","description":"<p align=\"center\">   <a href=\"https://bytebitlabs.com/\" target=\"_blank\"><img src=\"https://gravatar.com/avatar/61c80d73dfe4c4231e77940cf80fd410?size=256\" width=\"256\" alt=\"ByteBitLabs logo\" /></a> </p>","directories":{},"_nodeVersion":"20.13.1","dependencies":{"tslib":"^2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nest-groq_1.0.0-0_1731382843437_0.3768614281731957","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@bytebitlabs/nest-groq","version":"1.0.0","license":"MIT","_id":"@bytebitlabs/nest-groq@1.0.0","maintainers":[{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"}],"dist":{"shasum":"d5e3650d379794667ef5530d02bdb5b962c3e76b","tarball":"https://registry.npmjs.org/@bytebitlabs/nest-groq/-/nest-groq-1.0.0.tgz","fileCount":20,"integrity":"sha512-ntmwLFqGm7+23fP0MPV9qup5NiD6OBfjTxjxfu5nui01VCSGgU3BrIP4YRLTIFVnjS/2NuJTjkGQ/8EIn2AZgw==","signatures":[{"sig":"MEYCIQCaAzsZ9TX8wvk6jtYrQ5kxm+7q4sWA4J1hyz2IED7a5wIhAIesTTJBitvCbyGxg6/SOpLDQKTfDFDMpaDEBbzY2EHW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10738},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","gitHead":"b2be2b59aa13ee02489dfa1745f08fe31fe3b14f","typings":"./src/index.d.ts","_npmUser":{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"},"_npmVersion":"10.5.2","description":"<p align=\"center\">   <a href=\"https://bytebitlabs.com/\" target=\"_blank\"><img src=\"https://gravatar.com/avatar/61c80d73dfe4c4231e77940cf80fd410?size=256\" width=\"256\" alt=\"ByteBitLabs logo\" /></a> </p>","directories":{},"_nodeVersion":"20.13.1","dependencies":{"tslib":"^2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nest-groq_1.0.0_1735549383129_0.16499160736785434","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bytebitlabs/nest-groq","version":"1.0.1","license":"MIT","_id":"@bytebitlabs/nest-groq@1.0.1","maintainers":[{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"}],"dist":{"shasum":"89935aa42a8ebe236d8214f6a1523b18e6dfae8d","tarball":"https://registry.npmjs.org/@bytebitlabs/nest-groq/-/nest-groq-1.0.1.tgz","fileCount":20,"integrity":"sha512-6lotf6xGHIaLRpju5cNI9yearPGNoAR3K8k7eYfLbJOBRhIkybzV/dra4unmkvY67IismSUMc4ynfx1xguqHcg==","signatures":[{"sig":"MEQCIG1FYB93030Qe56oMvGS38Ak+cMkq5mpwtHoxP+iefmEAiAeiF97OLlQib15OyoF8W5mvjOdoKaGu8B4/iE3R7s3Uw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10738},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","gitHead":"e3e3e03a508e6b132b6a366cd0bd02e9d01594cb","typings":"./src/index.d.ts","_npmUser":{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"},"_npmVersion":"10.5.2","description":"<p align=\"center\">   <a href=\"https://bytebitlabs.com/\" target=\"_blank\"><img src=\"https://gravatar.com/avatar/61c80d73dfe4c4231e77940cf80fd410?size=256\" width=\"256\" alt=\"ByteBitLabs logo\" /></a> </p>","directories":{},"_nodeVersion":"20.13.1","dependencies":{"tslib":"^2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nest-groq_1.0.1_1737347957242_0.5618392718033574","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@bytebitlabs/nest-groq","version":"1.1.0","license":"MIT","dependencies":{"tslib":"^2.3.0"},"type":"commonjs","main":"./src/index.js","typings":"./src/index.d.ts","publishConfig":{"access":"public"},"types":"./src/index.d.ts","_id":"@bytebitlabs/nest-groq@1.1.0","gitHead":"e82f08bce74eb7b91dfd7fd7ffc0423f08ccaec5","description":"<p align=\"center\">   <a href=\"https://bytebitlabs.com/\" target=\"_blank\"><img src=\"https://gravatar.com/avatar/61c80d73dfe4c4231e77940cf80fd410?size=256\" width=\"256\" alt=\"ByteBitLabs logo\" /></a> </p>","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-gAmyx1oLatohYWyM/TsbQFw0Su+93TlAqAEQu+yAHZdjt+puOzjYv3PBJfjmMR96j6HGNeK4ryOZxzn8ZJCe5Q==","shasum":"6533e1ae834e604ff5079fb81fb952402282e199","tarball":"https://registry.npmjs.org/@bytebitlabs/nest-groq/-/nest-groq-1.1.0.tgz","fileCount":20,"unpackedSize":10738,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEakwXqX3HMNkyiW12d2Rz9ljwJ1tPNzBiKmlGiCTZgqAiEAqtLwZv3RFnvTt3oOFenS/7uQdUCQpVsQP+zEaKDYlT8="}]},"_npmUser":{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"},"directories":{},"maintainers":[{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nest-groq_1.1.0_1741581819588_0.9331953021257955"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-15T13:55:07.453Z","modified":"2025-03-10T04:43:39.934Z","0.1.0":"2024-08-15T13:55:07.724Z","0.1.1":"2024-08-15T18:04:06.259Z","0.1.3":"2024-09-24T06:25:47.043Z","1.0.0-0":"2024-11-12T03:40:43.612Z","1.0.0":"2024-12-30T09:03:03.291Z","1.0.1":"2025-01-20T04:39:17.400Z","1.1.0":"2025-03-10T04:43:39.758Z"},"license":"MIT","description":"<p align=\"center\">   <a href=\"https://bytebitlabs.com/\" target=\"_blank\"><img src=\"https://gravatar.com/avatar/61c80d73dfe4c4231e77940cf80fd410?size=256\" width=\"256\" alt=\"ByteBitLabs logo\" /></a> </p>","maintainers":[{"name":"bytebitlabs","email":"0xnairb@bytebitlabs.com"}],"readme":"# nest-groq\n\n<p align=\"center\">\n  <a href=\"https://bytebitlabs.com/\" target=\"_blank\"><img src=\"https://gravatar.com/avatar/61c80d73dfe4c4231e77940cf80fd410?size=256\" width=\"256\" alt=\"ByteBitLabs logo\" /></a>\n</p>\n\n<p align=\"center\">Groq module for nestjs</p>\n    <p align=\"center\">\n<a href=\"https://www.npmjs.com/package/@bytebitlabs/nest-groq\"><img src=\"https://img.shields.io/npm/v/@bytebitlabs/nest-groq\" alt=\"NPM Version\" /></a>\n<a href=\"https://www.npmjs.com/package/@bytebitlabs/nest-groq\"><img src=\"https://img.shields.io/npm/l/@bytebitlabs/nest-groq\" alt=\"Package License\" /></a>\n<a href=\"https://www.npmjs.com/package/@bytebitlabs/nest-groq\"><img src=\"https://img.shields.io/npm/dm/@bytebitlabs/nest-groq\" alt=\"NPM Downloads\" /></a>\n</p>\n\n## Description\n\nGroq module for [Nest](https://github.com/nestjs/nest) based on the official [groq-sdk](https://www.npmjs.com/package/groq-sdk) package.\n\n## Installation\n\n```bash\n$ npm i --save @bytebitlabs/nest-groq groq-sdk\n```\n\n## Usage\n\nImport `GroqModule`:\n\n```typescript\n@Module({\n  imports: [GroqModule.register({\n    apiKey: 'Abc...',\n  })],\n  providers: [...],\n})\nexport class AiModule {}\n```\n\nInject `GroqService`:\n\n```typescript\n@Injectable()\nexport class AiService {\n  constructor(private readonly groqService: GroqService) {}\n}\n```\n\n## Async options\n\nQuite often you might want to asynchronously pass your module options instead of passing them beforehand. In such case, use `registerAsync()` method, that provides a couple of various ways to deal with async data.\n\n**1. Use factory**\n\n```typescript\nGroqModule.registerAsync({\n  useFactory: () => ({\n    apiKey: 'Abc...'\n  })\n});\n```\n\nObviously, our factory behaves like every other one (might be `async` and is able to inject dependencies through `inject`).\n\n```typescript\nGroqModule.registerAsync({\n  imports: [ConfigModule],\n  useFactory: async (configService: ConfigService) => ({\n    apiKey: configService.get('GROQ_API_KEY'),\n  }),\n  inject: [ConfigService],\n}),\n```\n\n**2. Use class**\n\n```typescript\nGroqModule.registerAsync({\n  useClass: GroqConfigService\n});\n```\n\nAbove construction will instantiate `GroqConfigService` inside `GroqModule` and will leverage it to create options object.\n\n```typescript\nclass GroqConfigService implements GroqOptionsFactory {\n  createGroqOptions(): GroqModuleOptions {\n    return {\n      apiKey: 'Abc...'\n    };\n  }\n}\n```\n\n**3. Use existing**\n\n```typescript\nGroqModule.registerAsync({\n  imports: [ConfigModule],\n  useExisting: ConfigService,\n}),\n```\n\nIt works the same as `useClass` with one critical difference - `GroqModule` will lookup imported modules to reuse already created `ConfigService`, instead of instantiating it on its own.\n\n## API Spec\n\nThe `GroqService` wraps the `Client` from the official [groq-sdk](https://www.npmjs.com/package/groq-sdk) methods. The `GroqModule.register()` takes `options` object as an argument, [read more](https://console.groq.com/docs/quickstart).\n","readmeFilename":"README.md"}