1.5.3 • Published 11 months ago

feedabot v1.5.3

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

Feedabot Client

Feedabot is a free (Beta) API that helps you to generate data with OpenAI. It adds several features to a simple OpenAI prompt:

  • You provide context, which tells OpenAI exactly what it's working with, dramatically improving the speed, accuracy and consistency of your responses.
  • You specify the format of the data that you want it to return, eliminating guesswork for OpenAI, and manually parsing chat text responses for you

Installation

npm i feedabot

GET query()

The query method enables you to fetch data related to your context in any format you like.

Example

const fbot = new Feedabot('your-open-ai-key');
fbot.query({
  context: 'Seasonal Burrata, artichoke, asparagus, fava bean, caramelized onion vinaigrette, grilled bread',
  prompt: 'get the ingredients from this item',
  type: 'array',
  fields: [
    {key: 'ingredient'},
    {key: 'description', prompt: 'brief description of the ingredient'},
    {key: 'category', prompt: 'ingredient category out of meat, poultry, seafood, vegetable, fruit, dairy'},
  ]
}).then(res => console.log({res}));

Response

{
    "res": {
        "data": [
            {
                "ingredient": "Burrata",
                "description": "A fresh Italian cheese made from mozzarella and cream. It has a soft, creamy texture and a rich, buttery flavor.",
                "category": "dairy"
            },
            {
                "ingredient": "Artichoke",
                "description": "A type of thistle that is commonly eaten as a vegetable. It has a tough outer layer of leaves and a tender heart that is often used in cooking.",
                "category": "vegetable"
            },
            //...
        ],
        "usage": {
            "prompt_tokens": 140,
            "completion_tokens": 350,
            "total_tokens": 490
        }
    }
}

Params

Fields

Fields are used to both prompt for data and map the resulting data to your response.

  • If fields are obvious you only have to specify the key
  • If you have more specific questions you can specify a prompt for the field
  • You can reference already built fields in your field prompts

Privacy

We store generic, anonymous data about your requests and responses to improve our APIs. Please read and accept the following before using any of our APIs or Software:

You can optionally opt into our Machine Learning, which analyzes your context, prompt and response to fine tune our API. This returns far more accurate results, but we strongly recommend disabling this any time you are handling sensitive or confidential data (which we don't recommend sending to AI in the first place!).

Note that all of the data that you submit to our API is pushed to the OpenAI APIs. This section only covers our platform. It is your exclusive responsibility to ensure that all of the data that you send is compliant with the policies described on https://openai.com as well.

// enable ML when you create your client
const fbot = new Feedabot('your-open-ai-key', {enableML: true});

// toggle ML off for a sensitive request
fbot.disableML();

// turn it back on 
fbot.enableML();

GET tokens()

The Feedabot beta includes 50,000 free tokens per month (this does not include any charges from OpenAI). If you need additional tokens please contact us.

You can check your current token balance with the tokens() endpoint.

Example

const fbot = new Feedabot('your-open-ai-key');
fbot.tokens().then(res => console.log({res}));

Response

{
  "res": {
    "usage": {
      "starting_balance": 50000,
      "tokens_used": 12495,
      "remaining_tokens": 37505
    }
  }
}
1.5.3

11 months ago

1.5.1

11 months ago

1.5.0

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago