Skip to main content

Endpoints

POST /logs

https://app.finetunedb.com/api/v1/logs Creates a new log.

Parameters

  • projectId: string
  • parentId (optional): string
  • name (optional): string
  • provider: enum (openai)
  • tags (optional): array of strings
  • model: string
  • source: string
  • modelParameters: object
    • model: string
    • provider (optional): string
    • max_tokens (optional): number
    • temperature (optional): number
    • top_p (optional): number
    • stop_sequences (optional): array of strings
    • presence_penalty (optional): number
    • frequency_penalty (optional): number
    • other (optional): record of any type
  • input (optional): union of input types (Documented below)
  • output (optional): union of output types (Documented below)
  • metadata (optional): record of any type
  • type: enum (CHATCOMPLETION, EMBEDDING)
  • error (optional): string
  • latencyMs (optional): number

Input Types

The log.input accepts different kinds of values.

OpenAI Completion (If type=CHATCOMPLETION)

Pass the messages value that you use in openai.chat.completions.create Example:

OpenAI Embedding (If type=EMBEDDING)

Pass the input value that you send to openai.embeddings.create Example:
or

Output Types

The log.output accepts different kinds of values.

OpenAI Completion (If type=CHATCOMPLETION)

Pass the response value that you get from openai.chat.completions.create as an array. Example:
OpenAI Embedding (If type=EMBEDDING) Pass the response.data value that you get from openai.embeddings.create. Example: