> For the complete documentation index, see [llms.txt](https://docs.ixhello.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ixhello.com/ixhc/general/edit-custom-apps/methods/data-source-generative-ai/open-ai/text-completion.md). Agents can also search and read this documentation through its [MCP server](https://docs.ixhello.com/~gitbook/mcp).

# Text Completion

## Method Inputs

| Tab           | Parameter                      | Value                                                                                                                                                                                                                     |
| ------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Method Inputs | Method Name                    | OpenAITextCompletionMethod                                                                                                                                                                                                |
|               | Request Type                   | openai-textcompletion                                                                                                                                                                                                     |
|               | Parameters: model              |                                                                                                                                                                                                                           |
|               | Parameters: temperature        | Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive. Temperature value range between 0 to 1                          |
|               | Parameters: maxtoken           | The maximum number of tokens to generate. Requests can use up to 2,048 or 4,000 tokens shared between prompt and completion. The exact limit varies by model. (One token is roughly 4 characters for normal English text) |
|               | Parameters: top\_p             | Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. Top\_p value range between 0 to 1                                                                              |
|               | Parameters: frequency\_penalty | How much to penalize new tokens based on their existing frequency in the text so far.  Decreases the model's likelihood to repeat the same line verbatim. Value range between 0 2.                                        |
|               | Parameters: presence\_penalty  | How much to penalize new tokens based on whether they appear in the text so far. Increases the model's likelihood to talk about new topics. Value range between 0 2.                                                      |
|               | Parameters: question           | Enter a content that you want to generate                                                                                                                                                                                 |
|               | Parameters: OrganizationID     | {{Context.OrganizationID}}                                                                                                                                                                                                |
|               | Parameters: EmployeeID         | {{Context.EmployeeID}}                                                                                                                                                                                                    |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ixhello.com/ixhc/general/edit-custom-apps/methods/data-source-generative-ai/open-ai/text-completion.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
