Skip to content

Commit 4d6fc82

Browse files
[NA] [SDK] [DOCS] Update automatically OpenAPI spec and Fern code (#4445)
Co-authored-by: Andres Cruz <[email protected]>
1 parent 5fbcc7b commit 4d6fc82

38 files changed

+1251
-12
lines changed

apps/opik-documentation/documentation/fern/docs/agent_optimization/opik_optimizer/reference.mdx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
---
2-
headline: API Reference | Opik Documentation
3-
og:description: Explore tools to optimize LLM prompts and agents with the standardized
4-
API for consistent optimization across multiple algorithms.
5-
og:site_name: Opik Documentation
6-
og:title: API Reference - Opik Agent Optimizer SDK
7-
subtitle: Technical SDK reference guide
8-
title: Opik Agent Optimizer API Reference
2+
title: "Opik Agent Optimizer API Reference"
3+
subtitle: "Technical SDK reference guide"
94
---
105

116
The Opik Agent Optimizer SDK provides a comprehensive set of tools for optimizing LLM prompts and agents. This reference guide documents the standardized API that all optimizers follow, ensuring consistency and interoperability across different optimization algorithms.
@@ -802,10 +797,10 @@ optimize_prompt(
802797
<ParamField path="args" type="Any" />
803798
<ParamField path="kwargs" type="Any" />
804799

805-
## HRPO
800+
## HierarchicalReflectiveOptimizer
806801

807802
```python
808-
HRPO(
803+
HierarchicalReflectiveOptimizer(
809804
model: str = 'gpt-4o',
810805
model_parameters: dict[str, typing.Any] | None = None,
811806
max_parallel_batches: int = 5,
@@ -1114,3 +1109,4 @@ llm_invoke(
11141109
<ParamField path="messages" type="list[dict[str, str]] | None" optional={true} />
11151110
<ParamField path="seed" type="int | None" optional={true} />
11161111
<ParamField path="allow_tool_use" type="bool | None" optional={true} default="False" />
1112+

apps/opik-documentation/documentation/fern/openapi/opik.yaml

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3651,6 +3651,36 @@ paths:
36513651
application/json:
36523652
schema:
36533653
$ref: "#/components/schemas/ErrorMessage_Detail"
3654+
patch:
3655+
tags:
3656+
- Prompts
3657+
summary: Update prompt versions
3658+
description: |
3659+
Update one or more prompt versions.
3660+
3661+
Note: Prompt versions are immutable by design.
3662+
Only organizational properties, such as tags etc., can be updated.
3663+
Core properties like template and metadata cannot be modified after creation.
3664+
3665+
PATCH semantics:
3666+
- non-empty values update the field
3667+
- null values preserve existing field values (no change)
3668+
- empty values explicitly clear the field
3669+
operationId: updatePromptVersions
3670+
requestBody:
3671+
content:
3672+
application/json:
3673+
schema:
3674+
$ref: "#/components/schemas/PromptVersionBatchUpdate"
3675+
responses:
3676+
"204":
3677+
description: No Content
3678+
"400":
3679+
description: Bad Request
3680+
content:
3681+
application/json:
3682+
schema:
3683+
$ref: "#/components/schemas/ErrorMessage"
36543684
/v1/private/prompts/{id}:
36553685
get:
36563686
tags:
@@ -3809,6 +3839,19 @@ paths:
38093839
type: integer
38103840
format: int32
38113841
default: 10
3842+
- name: search
3843+
in: query
3844+
description: Search text to find in template or change description fields
3845+
schema:
3846+
type: string
3847+
- name: sorting
3848+
in: query
3849+
schema:
3850+
type: string
3851+
- name: filters
3852+
in: query
3853+
schema:
3854+
type: string
38123855
responses:
38133856
"200":
38143857
description: OK
@@ -4949,6 +4992,47 @@ paths:
49494992
application/json:
49504993
schema:
49514994
$ref: "#/components/schemas/ErrorMessage"
4995+
/v1/private/traces/threads/stats:
4996+
get:
4997+
tags:
4998+
- Traces
4999+
summary: Get trace thread stats
5000+
description: Get trace thread stats
5001+
operationId: getTraceThreadStats
5002+
parameters:
5003+
- name: project_id
5004+
in: query
5005+
schema:
5006+
type: string
5007+
format: uuid
5008+
- name: project_name
5009+
in: query
5010+
schema:
5011+
type: string
5012+
- name: filters
5013+
in: query
5014+
schema:
5015+
type: string
5016+
- name: from_time
5017+
in: query
5018+
schema:
5019+
type: string
5020+
description: Filter trace threads created from this time (ISO-8601 format).
5021+
format: date-time
5022+
- name: to_time
5023+
in: query
5024+
schema:
5025+
type: string
5026+
description: "Filter trace threads created up to this time (ISO-8601 format).\
5027+
\ If not provided, defaults to current time. Must be after 'from_time'."
5028+
format: date-time
5029+
responses:
5030+
"200":
5031+
description: Trace thread stats resource
5032+
content:
5033+
application/json:
5034+
schema:
5035+
$ref: "#/components/schemas/ProjectStats_Public"
49525036
/v1/private/traces/{traceId}/comments/{commentId}:
49535037
get:
49545038
tags:
@@ -13018,6 +13102,12 @@ components:
1301813102
- jinja2
1301913103
change_description:
1302013104
type: string
13105+
tags:
13106+
uniqueItems: true
13107+
type: array
13108+
items:
13109+
minLength: 1
13110+
type: string
1302113111
variables:
1302213112
uniqueItems: true
1302313113
type: array
@@ -13112,6 +13202,12 @@ components:
1311213202
- jinja2
1311313203
change_description:
1311413204
type: string
13205+
tags:
13206+
uniqueItems: true
13207+
type: array
13208+
items:
13209+
minLength: 1
13210+
type: string
1311513211
variables:
1311613212
uniqueItems: true
1311713213
type: array
@@ -13229,6 +13325,10 @@ components:
1322913325
type: array
1323013326
items:
1323113327
$ref: "#/components/schemas/PromptVersion_Public"
13328+
sortableBy:
13329+
type: array
13330+
items:
13331+
type: string
1323213332
PromptVersion_Public:
1323313333
required:
1323413334
- template
@@ -13259,6 +13359,12 @@ components:
1325913359
- jinja2
1326013360
change_description:
1326113361
type: string
13362+
tags:
13363+
uniqueItems: true
13364+
type: array
13365+
items:
13366+
minLength: 1
13367+
type: string
1326213368
template_structure:
1326313369
type: string
1326413370
readOnly: true
@@ -13367,10 +13473,65 @@ components:
1336713473
type: array
1336813474
items:
1336913475
type: string
13476+
PromptVersionBatchUpdate:
13477+
required:
13478+
- ids
13479+
- update
13480+
type: object
13481+
properties:
13482+
ids:
13483+
maxItems: 1000
13484+
minItems: 1
13485+
uniqueItems: true
13486+
type: array
13487+
description: IDs of prompt versions to update
13488+
items:
13489+
type: string
13490+
description: IDs of prompt versions to update
13491+
format: uuid
13492+
update:
13493+
$ref: "#/components/schemas/PromptVersionUpdate"
13494+
merge_tags:
13495+
type: boolean
13496+
description: |
13497+
Tag merge behavior:
13498+
- true: Add new tags to existing tags (union)
13499+
- false: Replace all existing tags with new tags (default behaviour if not provided)
13500+
default: false
13501+
description: |
13502+
Request to update one or more prompt versions.
13503+
Note: Prompt versions are immutable by design - only organizational properties (such as tags etc.) can be updated.
13504+
PromptVersionUpdate:
13505+
type: object
13506+
properties:
13507+
tags:
13508+
uniqueItems: true
13509+
type: array
13510+
description: |
13511+
Tags to set or merge with existing tags. Follows PATCH semantics:
13512+
- If merge_tags is true, these tags will be added to existing tags.
13513+
- If merge_tags is false, these tags will replace all existing tags.
13514+
- null: preserve existing tags (no change).
13515+
- empty set: clear all tags merge_tags is false.
13516+
items:
13517+
minLength: 1
13518+
type: string
13519+
description: |
13520+
Tags to set or merge with existing tags. Follows PATCH semantics:
13521+
- If merge_tags is true, these tags will be added to existing tags.
13522+
- If merge_tags is false, these tags will replace all existing tags.
13523+
- null: preserve existing tags (no change).
13524+
- empty set: clear all tags merge_tags is false.
13525+
description: |
13526+
Update to apply to prompt versions.
13527+
Note: Prompt versions are immutable by design.
13528+
Only organizational properties (such as tags etc.) can be updated.
13529+
Core properties like template, metadata etc. cannot be modified after creation.
1337013530
ServiceTogglesConfig:
1337113531
required:
1337213532
- alertsEnabled
1337313533
- anthropicProviderEnabled
13534+
- collaboratorsTabEnabled
1337413535
- csvUploadEnabled
1337513536
- customllmProviderEnabled
1337613537
- dashboardsEnabled
@@ -13431,6 +13592,8 @@ components:
1343113592
type: boolean
1343213593
opikbuiltinProviderEnabled:
1343313594
type: boolean
13595+
collaboratorsTabEnabled:
13596+
type: boolean
1343413597
SpanBatchUpdate:
1343513598
required:
1343613599
- ids

0 commit comments

Comments
 (0)