JSPM

saksh-ai-prompt

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q30846F
  • License ISC

A Node.js package that interacts with Gemini and returns its responses based on user prompts.

Package Exports

  • saksh-ai-prompt
  • saksh-ai-prompt/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (saksh-ai-prompt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

saksh-ai-prompt

A Node.js package that interacts with Gemini and returns its responses based on user prompts.

Installation

To install the package, run the following command:

npm install saksh-ai-prompt

Usage

Here’s a simple example of how to use the package:

const sendPromptToGemini = require('saksh-ai-prompt');

const config = {
  apiKey: 'YOUR_OPENAI_API_KEY', // Replace with your OpenAI API key
  // Optional parameters:
  modelName: 'text-davinci-003',
  temperature: 0.7,
  maxTokens: 1024,
  n: 1,
  stop: null
};

const userPrompt = "Tell me a joke";
const response = await sendPromptToGemini(userPrompt, config);

console.log(response);

Configuration

The following configuration options are available:

Parameter Description Required Default
apiKey OpenAI API key Yes N/A
modelName Gemini model name No text-davinci-003
temperature Controls randomness of the output No 0.7
maxTokens Maximum number of tokens in the response No 1024
n Number of responses to generate No 1
stop Sequence of tokens to stop generation No null

Contributing

Contributions are welcome! Feel free to submit pull requests or report issues.

License

This project is licensed under the ISC License. See the LICENSE file for more details.


### Explanation of Changes:

- **Clarity and Structure:** Improved the clarity of the sections and added headings for better organization.
- **Consistent Formatting:** Ensured consistent formatting for code blocks and tables.
- **Conciseness:** Made the language more concise while retaining all necessary information.
- **Instructions:** Clarified the installation and usage instructions for better readability.

Feel free to customize further based on your specific needs!