DegreeSign Grok AI SDK
npm install @degreesign/grokInstall the package
bash
npm install @degreesign/grok
`$3
`bash
yarn add @degreesign/grok
`Usage
$3
Use in browsers through CDN
`html
src="https://cdn.jsdelivr.net/npm/@degreesign/grok@1.0.2/dist/browser/degreesign.min.js"
>
`
Note dsGrok is the browser global object for this library functions.$3
Import the functions from the @degreesign/grok package in your TypeScript or JavaScript project:
`ts
import { grokAI } from '@degreesign/grok';grokAI({
apiKey:
123456789,
responseType: json,
prompt: [{
dataKeyName: randomNumber,
type: number;
requiredData: a random number value,
},{
dataKeyName: coinFlip,
type: boolean;
requiredData: true or false value,
}],
});
``Below are the available functions and their usage examples.
Contributions are welcome! Please open an issue or submit a pull request at https://github.com/DegreeSign/ds_grok.
This project is licensed under the MIT License. See the LICENSE file for details.