# NVIDIA NIM

> Chat with and create embeddings from the open models NVIDIA NIM serves, such as Llama, Mistral and Nemotron.

App · 3 actions. Web page: https://docs.lodol.com/docs/integrations/nvidia-nim

## Actions

### Create chat completion

Send a conversation to a model and get its reply.

**Inputs**

- Model (`model`, text, required): Model.
- Messages (`messages`, list, required): Messages.
- Temperature (`temperature`, number): Temperature. From 0 to 2.
- Top p (`top_p`, number): Top p. From 0 to 1.
- Max tokens (`max_tokens`, number): Max tokens. At least 1.
- Seed (`seed`, number): Seed.
- Stop (`stop`, list): Stop.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {
    "choices": [],
    "id": "example",
    "model": "example",
    "usage": {
      "completion_tokens": 1,
      "prompt_tokens": 1,
      "total_tokens": 1
    }
  },
  "next_cursor": ""
}
```

### Create embeddings

Turn text into embeddings, for search and comparing meaning.

**Inputs**

- Model (`model`, text, required): Model.
- Input (`input`, list, required): Input.
- Input type (`input_type`, text): Input type. One of: `query`, `passage`.
- Truncate (`truncate`, text): Truncate. One of: `NONE`, `START`, `END`.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {
    "data": [],
    "model": "example"
  },
  "next_cursor": ""
}
```

### List models

List the models you can use.

**Inputs**: None.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {
    "data": []
  },
  "next_cursor": ""
}
```
