Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

docs(api): fix fern type and update openapi spec

Marc Klingen2b27698b8dad
diff --git a/fern/apis/server/definition/sessions.yml b/fern/apis/server/definition/sessions.yml
index c3888da10e..f2dea39756 100644
--- a/fern/apis/server/definition/sessions.yml
+++ b/fern/apis/server/definition/sessions.yml
@@ -25,7 +25,7 @@ service:
toTimestamp:
type: optional<datetime>
docs: Optional filter to only include sessions created before a certain datetime (ISO 8601)
- response: PaginatedSessions
+ response: PaginatedSessions
get:
docs: Get a session. Please note that `traces` on this endpoint are not paginated, if you plan to fetch large sessions, consider `GET /api/public/traces?sessionId=<sessionId>`
method: GET
diff --git a/web/public/generated/api/openapi.yml b/web/public/generated/api/openapi.yml
index 2ce21c2dfd..d434ee0ee3 100644
--- a/web/public/generated/api/openapi.yml
+++ b/web/public/generated/api/openapi.yml
@@ -990,13 +990,23 @@ paths:
- name: fromStartTime
in: query
description: >-
- Retrieve only observations with a start_time greater than this
+ Retrieve only observations with a start_time or or after this
datetime (ISO 8601).
required: false
schema:
type: string
format: date-time
nullable: true
+ - name: toStartTime
+ in: query
+ description: >-
+ Retrieve only observations with a start_time before this datetime
+ (ISO 8601).
+ required: false
+ schema:
+ type: string
+ format: date-time
+ nullable: true
responses:
'200':
description: ''
@@ -1411,7 +1421,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/Score'
+ $ref: '#/components/schemas/CreateScoreResponse'
'400':
description: ''
content:
@@ -1482,7 +1492,19 @@ paths:
nullable: true
- name: fromTimestamp
in: query
- description: Retrieve only scores newer than this datetime (ISO 8601).
+ description: >-
+ Optional filter to only include scores created on or after a certain
+ datetime (ISO 8601)
+ required: false
+ schema:
+ type: string
+ format: date-time
+ nullable: true
+ - name: toTimestamp
+ in: query
+ description: >-
+ Optional filter to only include scores created before a certain
+ datetime (ISO 8601)
required: false
schema:
type: string
@@ -1651,6 +1673,82 @@ paths:
application/json:
schema: {}
security: *ref_0
+ /api/public/sessions:
+ get:
+ description: Get sessions.
+ operationId: sessions_list
+ tags:
+ - Sessions
+ parameters:
+ - name: page
+ in: query
+ description: Page number, starts at 1
+ required: false
+ schema:
+ type: integer
+ nullable: true
+ - name: limit
+ in: query
+ description: >-
+ Limit of items per page. If you encounter api issues due to too
+ large page sizes, try to reduce the limit.
+ required: false
+ schema:
+ type: integer
+ nullable: true
+ - name: fromTimestamp
+ in: query
+ description: >-
+ Optional filter to only include sessions created on or after a
+ certain datetime (ISO 8601)
+ required: false
+ schema:
+ type: string
+ format: date-time
+ nullable: true
+ - name: toTimestamp
+ in: query
+ description: >-
+ Optional filter to only include sessions created before a certain
+ datetime (ISO 8601)
+ required: false
+ schema:
+ type: string
+ format: date-time
+ nullable: true
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaginatedSessions'
+ '400':
+ description: ''
+ content:
+ application/json:
+ schema: {}
+ '401':
+ description: ''
+ content:
+ application/json:
+ schema: {}
+ '403':
+ description: ''
+ content:
+ application/json:
+ schema: {}
+ '404':
+ description: ''
+ content:
+ application/json:
+ schema: {}
+ '405':
+ description: ''
+ content:
+ application/json:
+ schema: {}
+ security: *ref_0
/api/public/sessions/{sessionId}:
get:
description: >-
@@ -1789,7 +1887,19 @@ paths:
nullable: true
- name: fromTimestamp
in: query
- description: Retrieve only traces newer than this datetime (ISO 8601).
+ description: >-
+ Optional filter to only include traces with a trace.timestamp on or
+ after a certain datetime (ISO 8601)
+ required: false
+ schema:
+ type: string
+ format: date-time
+ nullable: true
+ - name: toTimestamp
+ in: query
+ description: >-
+ Optional filter to only include traces with a trace.timestamp before
+ a certain datetime (ISO 8601)
required: false
schema:
type: string
@@ -1932,6 +2042,10 @@ components:
htmlPath:
type: string
description: Path of trace in Langfuse UI
+ latency:
+ type: number
+ format: double
+ description: Latency of trace in seconds
totalCost:
type: number
format: double
@@ -1940,12 +2054,15 @@ components:
type: array
items:
$ref: '#/components/schemas/ObservationsView'
+ description: List of observations
scores:
type: array
items:
$ref: '#/components/schemas/Score'
+ description: List of scores
required:
- htmlPath
+ - latency
- totalCost
- observations
- scores
@@ -2074,6 +2191,10 @@ components:
type: number
format: double
nullable: true
+ timeToFirstToken:
+ type: number
+ format: double
+ nullable: true
allOf:
- $ref: '#/components/schemas/Observation'
Usage:
@@ -3753,6 +3874,15 @@ components:
- traceId
- name
- value
+ CreateScoreResponse:
+ title: CreateScoreResponse
+ type: object
+ properties:
+ id:
+ type: string
+ description: The id of the created object in Langfuse
+ required:
+ - id
Scores:
title: Scores
type: object
@@ -3766,6 +3896,19 @@ components:
required:
- data
- meta
+ PaginatedSessions:
+ title: PaginatedSessions
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/Session'
+ meta:
+ $ref: '#/components/schemas/utilsMetaResponse'
+ required:
+ - data
+ - meta
Traces:
title: Traces
type: object
diff --git a/web/public/generated/postman/collection.json b/web/public/generated/postman/collection.json
index 13afd244e1..0d6c473568 100644
--- a/web/public/generated/postman/collection.json
+++ b/web/public/generated/postman/collection.json
@@ -718,7 +718,7 @@
"request": {
"description": "Get a list of observations",
"url": {
- "raw": "{{baseUrl}}/api/public/observations?page=&limit=&name=&userId=&type=&traceId=&parentObservationId=&fromStartTime=",
+ "raw": "{{baseUrl}}/api/public/observations?page=&limit=&name=&userId=&type=&traceId=&parentObservationId=&fromStartTime=&toStartTime=",
"host": [
"{{baseUrl}}"
],
@@ -766,7 +766,12 @@
{
"key": "fromStartTime",
"value": "",
- "description": "Retrieve only observations with a start_time greater than this datetime (ISO 8601)."
+ "description": "Retrieve only observations with a start_time or or after this datetime (ISO 8601)."
+ },
+ {
+ "key": "toStartTime",
+ "value": "",
+ "description": "Retrieve only observations with a start_time before this datetime (ISO 8601)."
}
],
"variable": []
@@ -1101,7 +1106,7 @@
"request": {
"description": "Get a list of scores",
"url": {
- "raw": "{{baseUrl}}/api/public/scores?page=&limit=&userId=&name=&fromTimestamp=&source=&operator=&value=&scoreIds=&configId=&dataType=",
+ "raw": "{{baseUrl}}/api/public/scores?page=&limit=&userId=&name=&fromTimestamp=&toTimestamp=&source=&operator=&value=&scoreIds=&configId=&dataType=",
"host": [
"{{baseUrl}}"
],
@@ -1134,7 +1139,12 @@
{
"key": "fromTimestamp",
"value": "",
- "description": "Retrieve only scores newer than this datetime (ISO 8601)."
+ "description": "Optional filter to only include scores created on or after a certain datetime (ISO 8601)"
+ },
+ {
+ "key": "toTimestamp",
+ "value": "",
+ "description": "Optional filter to only include scores created before a certain datetime (ISO 8601)"
},
{
"key": "source",
@@ -1247,6 +1257,52 @@
"description": null,
"name": "Sessions",
"item": [
+ {
+ "_type": "endpoint",
+ "name": "List",
+ "request": {
+ "description": "Get sessions.",
+ "url": {
+ "raw": "{{baseUrl}}/api/public/sessions?page=&limit=&fromTimestamp=&toTimestamp=",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "api",
+ "public",
+ "sessions"
+ ],
+ "query": [
+ {
+ "key": "page",
+ "value": "",
+ "description": "Page number, starts at 1"
+ },
+ {
+ "key": "limit",
+ "value": "",
+ "description": "Limit of items per page. If you encounter api issues due to too large page sizes, try to reduce the limit."
+ },
+ {
+ "key": "fromTimestamp",
+ "value": "",
+ "description": "Optional filter to only include sessions created on or after a certain datetime (ISO 8601)"
+ },
+ {
+ "key": "toTimestamp",
+ "value": "",
+ "description": "Optional filter to only include sessions created before a certain datetime (ISO 8601)"
+ }
+ ],
+ "variable": []
+ },
+ "header": [],
+ "method": "GET",
+ "auth": null,
+ "body": null
+ },
+ "response": []
+ },
{
"_type": "endpoint",
"name": "Get",
@@ -1324,7 +1380,7 @@
"request": {
"description": "Get list of traces.",
"url": {
- "raw": "{{baseUrl}}/api/public/traces?page=&limit=&userId=&name=&sessionId=&fromTimestamp=&orderBy=&tags=",
+ "raw": "{{baseUrl}}/api/public/traces?page=&limit=&userId=&name=&sessionId=&fromTimestamp=&toTimestamp=&orderBy=&tags=",
"host": [
"{{baseUrl}}"
],
@@ -1362,7 +1418,12 @@
{
"key": "fromTimestamp",
"value": "",
- "description": "Retrieve only traces newer than this datetime (ISO 8601)."
+ "description": "Optional filter to only include traces with a trace.timestamp on or after a certain datetime (ISO 8601)"
+ },
+ {
+ "key": "toTimestamp",
+ "value": "",
+ "description": "Optional filter to only include traces with a trace.timestamp before a certain datetime (ISO 8601)"
},
{
"key": "orderBy",