Skip to content
프로젝트

소개

무언가 이상한지 그냥 확인할 수도 있는데, ✨AI✨로 확인해 보는 건 어떨까요?

AI 및 머신러닝

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
+1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

is-odd-ai

npm version

Why check if something is odd simply, when you can do it with ✨AI✨

is-odd-ai is a unique package that utilizes OpenAI's GPT-3.5-turbo model to determine if a number is odd or even. Because sometimes you just want to add a little bit of AI magic to your number checking!

Installation

To install is-odd-ai, use npm:

npm install is-odd-ai

Usage

To use is-odd-ai, you'll need an OpenAI API key. You can get one by signing up at OpenAI.

  1. Create a .env file in the root of your project.
  2. Add your OpenAI API key to the .env file:
OPENAI_API_KEY=your-api-key

Example

Here's an example of how to use the is-odd-ai package in your project:

const isOdd = require('is-odd-ai');

(async () => {
    const number = 5;
    const result = await isOdd(number);
    console.log(`Is ${number} odd? ${result}`); // Output: Is 5 odd? true
})();

Function

isOdd(number)

  • Parameters: number (Number) - The number to check.
  • Returns: Promise<Boolean> - Resolves to true if the number is odd, false if even.
  • Throws: Throws an error if the determination could not be made.

Contributing

Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.

License

This project is licensed under the Apache 2.0 license.

관련 프로젝트 살펴보기

불러오는 중…