Generate

A common weakness of Large Language Models(LLMs) like ChatGPT is they lack specific knowledge to answer specific questions. This leads to the phenomenon known as "hallucination".

nokori Generate is an AI service that produces intelligent, human-like responses based on specific documents or content you provide, preventing hallucination and generating accurate, helpful responses.

note: Generate can still create innaccurate responses. Providing sufficient, high-quality context data improves accuracy and reliability of results.


POST/v1/ai/generate

Data-backed Generation

This endpoint allows you to generate human-like text based on real-world data.

Request Body Parameters

  • Name
    prompt
    Type
    string
    required
    Description

    The question or request you wish to make against the model

  • Name
    context
    Type
    array
    required
    Description

    The context you wish the model to use when generating the response. Supports one or multiple input documents.

Request

POST
/v1/ai/generate
curl https://api.nokori.com/v1/ai/generate \
  -X POST
  -H 'x-nokori-api-key: {{apiKey}}'
  -D '{
      "prompt": "When is george washington\'s birthday?",
      "context": [
          ["George Washington was born in Virginia on February 11, 1731, according to the then-used Julian calendar. In 1752, however, Britain and all its colonies adopted the Gregorian calendar which moved Washington\'s birthday a year and 11 days to February 22, 1732."]
        ]
  }'

Response

{
    "generated": "George Washington's birthday is on February 22, 1732.",
}