Skip to content

Commit e82e1bc

Browse files
feat: Update observability
1 parent 2e76296 commit e82e1bc

5 files changed

Lines changed: 54 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1029
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-7ad2951f6e084866392acb01a4fd6c6c7f86d63a698609efcaa8534868c3edb3.yml
3-
openapi_spec_hash: e6b38c3d0fa0dedc8ce9b0de9ec0b8a1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-5a95d4e4875d6ba2ffaf51a7cedff6709f6a344add0226694c8c9b0d1712ac37.yml
3+
openapi_spec_hash: 7d5daafe08dc9dba0c9f2f50f23f0e6b
44
config_hash: 77bd21b3699ffa20c210990f62eb8879

src/telnyx/types/ai/observability.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@
1111
class Observability(BaseModel):
1212
host: Optional[str] = None
1313

14+
prompt_label: Optional[str] = None
15+
16+
prompt_name: Optional[str] = None
17+
18+
prompt_sync: Optional[Literal["enabled", "disabled"]] = None
19+
"""Whether to auto-publish the assistant's instructions as a Langfuse prompt.
20+
21+
When ENABLED + prompt_name set, every assistant create/update pushes
22+
`instructions` to Langfuse via create_prompt and stores the returned version in
23+
prompt_version.
24+
"""
25+
26+
prompt_version: Optional[int] = None
27+
1428
public_key_ref: Optional[str] = None
1529

1630
secret_key_ref: Optional[str] = None

src/telnyx/types/ai/observability_req_param.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@
1010
class ObservabilityReqParam(TypedDict, total=False):
1111
host: str
1212

13+
prompt_label: str
14+
15+
prompt_name: str
16+
17+
prompt_sync: Literal["enabled", "disabled"]
18+
"""Whether to auto-publish the assistant's instructions as a Langfuse prompt.
19+
20+
When ENABLED + prompt_name set, every assistant create/update pushes
21+
`instructions` to Langfuse via create_prompt and stores the returned version in
22+
prompt_version.
23+
"""
24+
25+
prompt_version: int
26+
1327
public_key_ref: str
1428

1529
secret_key_ref: str

tests/api_resources/ai/assistants/test_versions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ def test_method_update_with_all_params(self, client: Telnyx) -> None:
160160
name="name",
161161
observability_settings={
162162
"host": "host",
163+
"prompt_label": "prompt_label",
164+
"prompt_name": "prompt_name",
165+
"prompt_sync": "enabled",
166+
"prompt_version": 1,
163167
"public_key_ref": "public_key_ref",
164168
"secret_key_ref": "secret_key_ref",
165169
"status": "enabled",
@@ -626,6 +630,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncTelnyx) ->
626630
name="name",
627631
observability_settings={
628632
"host": "host",
633+
"prompt_label": "prompt_label",
634+
"prompt_name": "prompt_name",
635+
"prompt_sync": "enabled",
636+
"prompt_version": 1,
629637
"public_key_ref": "public_key_ref",
630638
"secret_key_ref": "secret_key_ref",
631639
"status": "enabled",

tests/api_resources/ai/test_assistants.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ def test_method_create_with_all_params(self, client: Telnyx) -> None:
9999
model="model",
100100
observability_settings={
101101
"host": "host",
102+
"prompt_label": "prompt_label",
103+
"prompt_name": "prompt_name",
104+
"prompt_sync": "enabled",
105+
"prompt_version": 1,
102106
"public_key_ref": "public_key_ref",
103107
"secret_key_ref": "secret_key_ref",
104108
"status": "enabled",
@@ -387,6 +391,10 @@ def test_method_update_with_all_params(self, client: Telnyx) -> None:
387391
name="name",
388392
observability_settings={
389393
"host": "host",
394+
"prompt_label": "prompt_label",
395+
"prompt_name": "prompt_name",
396+
"prompt_sync": "enabled",
397+
"prompt_version": 1,
390398
"public_key_ref": "public_key_ref",
391399
"secret_key_ref": "secret_key_ref",
392400
"status": "enabled",
@@ -960,6 +968,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncTelnyx) ->
960968
model="model",
961969
observability_settings={
962970
"host": "host",
971+
"prompt_label": "prompt_label",
972+
"prompt_name": "prompt_name",
973+
"prompt_sync": "enabled",
974+
"prompt_version": 1,
963975
"public_key_ref": "public_key_ref",
964976
"secret_key_ref": "secret_key_ref",
965977
"status": "enabled",
@@ -1248,6 +1260,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncTelnyx) ->
12481260
name="name",
12491261
observability_settings={
12501262
"host": "host",
1263+
"prompt_label": "prompt_label",
1264+
"prompt_name": "prompt_name",
1265+
"prompt_sync": "enabled",
1266+
"prompt_version": 1,
12511267
"public_key_ref": "public_key_ref",
12521268
"secret_key_ref": "secret_key_ref",
12531269
"status": "enabled",

0 commit comments

Comments
 (0)