Skip to contents

Stores a prompt and, optionally, the response, following the project's privacy policy. With store = "hash" only an MD5 fingerprint is kept: it shows that a given text was used without revealing it.

Usage

ait_log_interaction(
  use,
  prompt,
  response = NULL,
  summary = NULL,
  store = NULL,
  parameters = NULL,
  timestamp = Sys.time(),
  path = "."
)

Arguments

use

Identifier returned by ait_register_use().

prompt

The prompt, as text.

response

Optional response, as text.

summary

Optional short human summary of the response.

store

How to store the prompt and response: "hash", "excerpt", "full" or "none". Defaults to the project's policy set in ait_init().

parameters

Optional named list of generation parameters, if known.

timestamp

Time of the interaction.

path

Root folder of the project.

Value

The identifier of the interaction record.

Examples

project <- ait_example()
log <- ait_log(project)
ait_log_interaction(log$uses$id[1], prompt = "Summarise this abstract: ...",
                    summary = "A three-sentence summary", path = project)
#> [1] "int-2097314d7b"