{"_id":"@andyvanee/languagemodel-types","_rev":"6-2ecd9cc89e5cd1e1354fafebe67b419c","name":"@andyvanee/languagemodel-types","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@andyvanee/languagemodel-types","version":"1.0.0","author":{"name":"Andy VanEe","email":"1andyvanee@gmail.com"},"license":"MIT","_id":"@andyvanee/languagemodel-types@1.0.0","maintainers":[{"name":"andyvanee","email":"1andyvanee@gmail.com"}],"dist":{"shasum":"3b402cc571823607e26f34da6828eeaf99670b54","tarball":"https://registry.npmjs.org/@andyvanee/languagemodel-types/-/languagemodel-types-1.0.0.tgz","fileCount":6,"integrity":"sha512-0jUmDc/OmnL74ERbcmcO3tuu6ba19VK4KmuVrnADLAKnwhD87yvk8h2DigwlIWW7/kpGQJ8QnOGMhmEfAsFFlg==","signatures":[{"sig":"MEYCIQD4ToNxrU0j68jlaFAeaOA8FIScXm8ot5ne1lQyGtGIxAIhAL+WehUA1TQykZaJwGxUHP8mSKEWu/SiWMCmkTntJ0Aq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16085},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","gitHead":"c62a9ca1b6d5c96ef52ac46917eb87f1c22afe1a","scripts":{"test":"jest","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"andyvanee","email":"1andyvanee@gmail.com"},"_npmVersion":"11.3.0","description":"Typescript support for language model interfaces","directories":{},"_nodeVersion":"24.2.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.5","ts-jest":"^29.4.1","typescript":"^5.9.2","@types/jest":"^30.0.0","@types/json-schema":"^7.0.15"},"_npmOperationalInternal":{"tmp":"tmp/languagemodel-types_1.0.0_1754878890610_0.25957350336754326","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@andyvanee/languagemodel-types","version":"1.0.1","author":{"name":"Andy VanEe","email":"1andyvanee@gmail.com"},"license":"MIT","_id":"@andyvanee/languagemodel-types@1.0.1","maintainers":[{"name":"andyvanee","email":"1andyvanee@gmail.com"}],"dist":{"shasum":"b1b2a258e79cc1e917e1826e883245fed3b8d39e","tarball":"https://registry.npmjs.org/@andyvanee/languagemodel-types/-/languagemodel-types-1.0.1.tgz","fileCount":6,"integrity":"sha512-ydQz8HcuRo82EWWABqm+FbfoChyO7DH/6JECU0eX49VbomhXertW0jk0fUSv6JLvtioC7HJrEMyL6BlZTixb7w==","signatures":[{"sig":"MEMCICdDLKcRSAg7y+IcRkOSWM0lntdy1hFAuO4LGvXL7ftGAh8zjIh2rjaoix1/NcFQWQkQAPqk2wfwuGnGcuC9FIFb","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16085},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","gitHead":"25ed7932595353f2f084ebc328b63cf5a1cb9a35","scripts":{"test":"jest","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"andyvanee","email":"1andyvanee@gmail.com"},"_npmVersion":"11.3.0","description":"Typescript support for language model interfaces","directories":{},"_nodeVersion":"24.2.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.5","ts-jest":"^29.4.1","typescript":"^5.9.2","@types/jest":"^30.0.0","@types/json-schema":"^7.0.15"},"_npmOperationalInternal":{"tmp":"tmp/languagemodel-types_1.0.1_1754890232501_0.46610270801617837","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@andyvanee/languagemodel-types","version":"1.0.2","author":{"name":"Andy VanEe","email":"1andyvanee@gmail.com"},"license":"MIT","_id":"@andyvanee/languagemodel-types@1.0.2","maintainers":[{"name":"andyvanee","email":"1andyvanee@gmail.com"}],"dist":{"shasum":"155ca47d6025d9b3e35da08a052b649931f148fe","tarball":"https://registry.npmjs.org/@andyvanee/languagemodel-types/-/languagemodel-types-1.0.2.tgz","fileCount":6,"integrity":"sha512-qcwJr8vDl4Csi4w5uG+1V08bJCqd9t8hWjztFCTL+pi3bIOWSTdlWuNaxtFh+w4fbcLt/hPd7OY+E2rMXqgDaw==","signatures":[{"sig":"MEQCIF/7CnuQP7bKD4tx4SowOH1nXzNaV2Muv1LdYw37x135AiALSUPkDpWNCPBRCaRz5q4wjySfTV28l8g+C/LnhD63+Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16257},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","gitHead":"2a261172a5baaf75c2247f7138962727ec5d7a55","scripts":{"test":"jest","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"andyvanee","email":"1andyvanee@gmail.com"},"_npmVersion":"11.3.0","description":"Typescript support for language model interfaces","directories":{},"_nodeVersion":"24.2.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.5","ts-jest":"^29.4.1","typescript":"^5.9.2","@types/jest":"^30.0.0","@types/json-schema":"^7.0.15"},"_npmOperationalInternal":{"tmp":"tmp/languagemodel-types_1.0.2_1754890901134_0.3398142505900337","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@andyvanee/languagemodel-types","version":"1.0.3","author":{"name":"Andy VanEe","email":"1andyvanee@gmail.com"},"license":"MIT","_id":"@andyvanee/languagemodel-types@1.0.3","maintainers":[{"name":"andyvanee","email":"1andyvanee@gmail.com"}],"dist":{"shasum":"8a7edf1f523be98d3fc526dc99b84686dcae873f","tarball":"https://registry.npmjs.org/@andyvanee/languagemodel-types/-/languagemodel-types-1.0.3.tgz","fileCount":6,"integrity":"sha512-zhDv1DlUT7uX7gHUXZgKx+nPvtQe2H+p1BqQXkvWuOjbwMQ0+rgWukzeh0z+tploN2gC8V5Pg/CD9iBSRhybbw==","signatures":[{"sig":"MEUCIH3ajcW5a5Sj7FJlLt+ftAHF2i369R8hH3Hia9i2KdVVAiEA22KE+T2ELGuaIDgy3ByaSQ74Z2As53+speQRmFLVEpc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16302},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","gitHead":"6b4f73f34a4eee31a6724a69ff7ff43caadb50db","scripts":{"test":"jest","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"andyvanee","email":"1andyvanee@gmail.com"},"_npmVersion":"11.3.0","description":"Typescript support for language model interfaces","directories":{},"_nodeVersion":"24.2.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.5","ts-jest":"^29.4.1","typescript":"^5.9.2","@types/jest":"^30.0.0","@types/json-schema":"^7.0.15"},"_npmOperationalInternal":{"tmp":"tmp/languagemodel-types_1.0.3_1754891282281_0.029053586782608054","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@andyvanee/languagemodel-types","version":"1.0.4","author":{"name":"Andy VanEe","email":"1andyvanee@gmail.com"},"license":"MIT","_id":"@andyvanee/languagemodel-types@1.0.4","maintainers":[{"name":"andyvanee","email":"1andyvanee@gmail.com"}],"dist":{"shasum":"f3d4b5744b66f98cd21a49ad14daa509e7b1965c","tarball":"https://registry.npmjs.org/@andyvanee/languagemodel-types/-/languagemodel-types-1.0.4.tgz","fileCount":6,"integrity":"sha512-vJwRncF13O4Fteltb59yUvFYdBcTd6Fm6S5HLEOzCyRN3ZBTLzn5vtfTpng887Hwlm4VG7jJ8QIo4EGP94i0GA==","signatures":[{"sig":"MEUCIDHqVBHPhRUhiSvXl0RHBfFvc/RzL/Ho/5r9P11RW1gzAiEAoegv1vPvSHHvXYQJyNhabBfH95INt4X0MwVp31p7YXg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16728},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","gitHead":"337e28212a25d69aba83cbb16d6cff3f2dba5778","scripts":{"test":"jest","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"andyvanee","email":"1andyvanee@gmail.com"},"_npmVersion":"11.3.0","description":"Typescript support for language model interfaces","directories":{},"_nodeVersion":"24.2.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.5","ts-jest":"^29.4.1","typescript":"^5.9.2","@types/jest":"^30.0.0","@types/json-schema":"^7.0.15"},"_npmOperationalInternal":{"tmp":"tmp/languagemodel-types_1.0.4_1754892793895_0.7673625359361931","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@andyvanee/languagemodel-types","version":"1.0.5","description":"Typescript support for language model interfaces","license":"MIT","author":{"name":"Andy VanEe","email":"1andyvanee@gmail.com"},"type":"commonjs","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","test":"jest","prepublishOnly":"npm run build"},"devDependencies":{"@types/jest":"^30.0.0","@types/json-schema":"^7.0.15","jest":"^30.0.5","ts-jest":"^29.4.1","typescript":"^5.9.2"},"_id":"@andyvanee/languagemodel-types@1.0.5","gitHead":"9041d3d5f69b3d9ad09a3cc8f23166e148efeb4a","_nodeVersion":"24.2.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-n08PE3feB15eP975CfrEj8SxheCqb2yTKvwMmAyffC0vGcveXuiwWkPK2vvsGbO5GafJGNdInc13KVvqR+Vhjg==","shasum":"edafa856b8b3b0baab1ec9db41bb253cedcc574b","tarball":"https://registry.npmjs.org/@andyvanee/languagemodel-types/-/languagemodel-types-1.0.5.tgz","fileCount":6,"unpackedSize":17244,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCim/GVM3w4ZRomBkwLtaK2KXBvwfGKC9tXaB0ST29mngIhAJfSojlBXGHTDyx77oJOs5ZgyXCUm4UqurAt6DRAtkqh"}]},"_npmUser":{"name":"andyvanee","email":"1andyvanee@gmail.com"},"directories":{},"maintainers":[{"name":"andyvanee","email":"1andyvanee@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/languagemodel-types_1.0.5_1754893122598_0.895855238201775"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-11T02:21:30.457Z","modified":"2025-08-11T06:18:42.946Z","1.0.0":"2025-08-11T02:21:30.785Z","1.0.1":"2025-08-11T05:30:32.680Z","1.0.2":"2025-08-11T05:41:41.341Z","1.0.3":"2025-08-11T05:48:02.448Z","1.0.4":"2025-08-11T06:13:14.068Z","1.0.5":"2025-08-11T06:18:42.760Z"},"author":{"name":"Andy VanEe","email":"1andyvanee@gmail.com"},"license":"MIT","description":"Typescript support for language model interfaces","maintainers":[{"name":"andyvanee","email":"1andyvanee@gmail.com"}],"readme":"# LanguageModel-Types\n\nThis package provides TypeScript definitions for the experimental Web Platform's Language Model API, specifically the Prompt API. These types help you write safer code with better editor support when using this new browser feature.\n\n## Installation\n\nYou can install this package using npm:\n\n```bash\nnpm install @andyvanee/languagemodel-types\n```\n\n## Usage\n\nOnce installed, you can use the types in your TypeScript project. For example, you can create a function that interacts with the Language Model API and uses the types from this package to ensure type safety.\n\n```typescript\nimport {\n  LanguageModel,\n  LanguageModelSession,\n} from \"@andyvanee/languagemodel-types\";\n\nasync function getResponse(prompt: string): Promise<string | null> {\n  if ((await LanguageModel.availability()) === \"available\") {\n    const session: LanguageModelSession = await LanguageModel.create();\n    return session.prompt(prompt);\n  }\n  return null;\n}\n\n// Example usage:\ngetResponse(\"What's the capital of France?\").then((response) => {\n  if (response) {\n    console.log(response);\n  } else {\n    console.log(\"Language model not available.\");\n  }\n});\n```\n\nThe main entry point for the API is the global `LanguageModel` object. This package provides a global declaration for it, so you can use it directly in your code.\n\n## Documentation\n\nFor more detailed information about the Language Model API and its capabilities, please refer to the official documentation:\n\n[Chrome for Developers: Prompt API](https://developer.chrome.com/docs/ai/prompt-api)\n\n## Contributing\n\nContributions are welcome! Please feel free to open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License.\n","readmeFilename":"README.md"}