Skip to content

Commit b94b377

Browse files
committed
Release 0.0.23
1 parent 6cd5917 commit b94b377

File tree

8 files changed

+95
-27
lines changed

8 files changed

+95
-27
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "axiomatic"
3-
version = "0.0.22"
3+
version = "0.0.23"
44
description = ""
55
readme = "README.md"
66
authors = []

reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ client.pic.synthesize_circuit_from_text(
853853
<dl>
854854
<dd>
855855

856-
Generate GDS factory code to create a circuit
856+
Generate GDS factory code to create a PIC component
857857
</dd>
858858
</dl>
859859
</dd>

src/axiomatic/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
FormalizeResponse,
1313
GenerateCodeBody,
1414
GenerateCodeResponse,
15+
GenerateComponentCodeResponse,
1516
HttpValidationError,
1617
InteractiveResponse,
1718
Measurement,
@@ -23,6 +24,7 @@
2324
PicComponentSettingsValue,
2425
RefineCodeBody,
2526
RefineCodeResponse,
27+
RefineComponentCodeResponse,
2628
RequirementBody,
2729
SolutionResponse,
2830
SolutionResponseSolutionValue,
@@ -60,6 +62,7 @@
6062
"FormalizeResponse",
6163
"GenerateCodeBody",
6264
"GenerateCodeResponse",
65+
"GenerateComponentCodeResponse",
6366
"HttpValidationError",
6467
"InteractiveResponse",
6568
"Measurement",
@@ -71,6 +74,7 @@
7174
"PicComponentSettingsValue",
7275
"RefineCodeBody",
7376
"RefineCodeResponse",
77+
"RefineComponentCodeResponse",
7478
"RequirementBody",
7579
"SolutionBodyValuesValue",
7680
"SolutionResponse",

src/axiomatic/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_headers(self) -> typing.Dict[str, str]:
1616
headers: typing.Dict[str, str] = {
1717
"X-Fern-Language": "Python",
1818
"X-Fern-SDK-Name": "axiomatic",
19-
"X-Fern-SDK-Version": "0.0.22",
19+
"X-Fern-SDK-Version": "0.0.23",
2020
}
2121
headers["X-API-Key"] = self.api_key
2222
return headers

src/axiomatic/pic/client.py

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
from ..core.serialization import convert_and_respect_annotation_metadata
1818
from ..types.synthesis_response import SynthesisResponse
1919
from ..types.synthesize_circuit_response import SynthesizeCircuitResponse
20-
from ..types.generate_code_response import GenerateCodeResponse
21-
from ..types.refine_code_response import RefineCodeResponse
20+
from ..types.generate_component_code_response import GenerateComponentCodeResponse
21+
from ..types.refine_component_code_response import RefineComponentCodeResponse
2222
from ..types.netlist import Netlist
2323
from ..types.statement import Statement
2424
from ..types.measurement import Measurement
@@ -489,9 +489,11 @@ def synthesize_circuit_from_text(
489489
raise ApiError(status_code=_response.status_code, body=_response.text)
490490
raise ApiError(status_code=_response.status_code, body=_response_json)
491491

492-
def generate(self, *, query: str, request_options: typing.Optional[RequestOptions] = None) -> GenerateCodeResponse:
492+
def generate(
493+
self, *, query: str, request_options: typing.Optional[RequestOptions] = None
494+
) -> GenerateComponentCodeResponse:
493495
"""
494-
Generate GDS factory code to create a circuit
496+
Generate GDS factory code to create a PIC component
495497
496498
Parameters
497499
----------
@@ -502,7 +504,7 @@ def generate(self, *, query: str, request_options: typing.Optional[RequestOption
502504
503505
Returns
504506
-------
505-
GenerateCodeResponse
507+
GenerateComponentCodeResponse
506508
Successful Response
507509
508510
Examples
@@ -517,20 +519,23 @@ def generate(self, *, query: str, request_options: typing.Optional[RequestOption
517519
)
518520
"""
519521
_response = self._client_wrapper.httpx_client.request(
520-
"pic/code/generate",
522+
"pic/component/generate",
521523
method="POST",
522524
json={
523525
"query": query,
524526
},
527+
headers={
528+
"content-type": "application/json",
529+
},
525530
request_options=request_options,
526531
omit=OMIT,
527532
)
528533
try:
529534
if 200 <= _response.status_code < 300:
530535
return typing.cast(
531-
GenerateCodeResponse,
536+
GenerateComponentCodeResponse,
532537
parse_obj_as(
533-
type_=GenerateCodeResponse, # type: ignore
538+
type_=GenerateComponentCodeResponse, # type: ignore
534539
object_=_response.json(),
535540
),
536541
)
@@ -556,7 +561,7 @@ def refine(
556561
feedback: typing.Optional[str] = OMIT,
557562
code: typing.Optional[str] = OMIT,
558563
request_options: typing.Optional[RequestOptions] = None,
559-
) -> RefineCodeResponse:
564+
) -> RefineComponentCodeResponse:
560565
"""
561566
Refine GDS factory code to create a circuit
562567
@@ -573,7 +578,7 @@ def refine(
573578
574579
Returns
575580
-------
576-
RefineCodeResponse
581+
RefineComponentCodeResponse
577582
Successful Response
578583
579584
Examples
@@ -588,22 +593,25 @@ def refine(
588593
)
589594
"""
590595
_response = self._client_wrapper.httpx_client.request(
591-
"pic/code/refine",
596+
"pic/component/refine",
592597
method="POST",
593598
json={
594599
"query": query,
595600
"feedback": feedback,
596601
"code": code,
597602
},
603+
headers={
604+
"content-type": "application/json",
605+
},
598606
request_options=request_options,
599607
omit=OMIT,
600608
)
601609
try:
602610
if 200 <= _response.status_code < 300:
603611
return typing.cast(
604-
RefineCodeResponse,
612+
RefineComponentCodeResponse,
605613
parse_obj_as(
606-
type_=RefineCodeResponse, # type: ignore
614+
type_=RefineComponentCodeResponse, # type: ignore
607615
object_=_response.json(),
608616
),
609617
)
@@ -1346,9 +1354,9 @@ async def main() -> None:
13461354

13471355
async def generate(
13481356
self, *, query: str, request_options: typing.Optional[RequestOptions] = None
1349-
) -> GenerateCodeResponse:
1357+
) -> GenerateComponentCodeResponse:
13501358
"""
1351-
Generate GDS factory code to create a circuit
1359+
Generate GDS factory code to create a PIC component
13521360
13531361
Parameters
13541362
----------
@@ -1359,7 +1367,7 @@ async def generate(
13591367
13601368
Returns
13611369
-------
1362-
GenerateCodeResponse
1370+
GenerateComponentCodeResponse
13631371
Successful Response
13641372
13651373
Examples
@@ -1382,20 +1390,23 @@ async def main() -> None:
13821390
asyncio.run(main())
13831391
"""
13841392
_response = await self._client_wrapper.httpx_client.request(
1385-
"pic/code/generate",
1393+
"pic/component/generate",
13861394
method="POST",
13871395
json={
13881396
"query": query,
13891397
},
1398+
headers={
1399+
"content-type": "application/json",
1400+
},
13901401
request_options=request_options,
13911402
omit=OMIT,
13921403
)
13931404
try:
13941405
if 200 <= _response.status_code < 300:
13951406
return typing.cast(
1396-
GenerateCodeResponse,
1407+
GenerateComponentCodeResponse,
13971408
parse_obj_as(
1398-
type_=GenerateCodeResponse, # type: ignore
1409+
type_=GenerateComponentCodeResponse, # type: ignore
13991410
object_=_response.json(),
14001411
),
14011412
)
@@ -1421,7 +1432,7 @@ async def refine(
14211432
feedback: typing.Optional[str] = OMIT,
14221433
code: typing.Optional[str] = OMIT,
14231434
request_options: typing.Optional[RequestOptions] = None,
1424-
) -> RefineCodeResponse:
1435+
) -> RefineComponentCodeResponse:
14251436
"""
14261437
Refine GDS factory code to create a circuit
14271438
@@ -1438,7 +1449,7 @@ async def refine(
14381449
14391450
Returns
14401451
-------
1441-
RefineCodeResponse
1452+
RefineComponentCodeResponse
14421453
Successful Response
14431454
14441455
Examples
@@ -1461,22 +1472,25 @@ async def main() -> None:
14611472
asyncio.run(main())
14621473
"""
14631474
_response = await self._client_wrapper.httpx_client.request(
1464-
"pic/code/refine",
1475+
"pic/component/refine",
14651476
method="POST",
14661477
json={
14671478
"query": query,
14681479
"feedback": feedback,
14691480
"code": code,
14701481
},
1482+
headers={
1483+
"content-type": "application/json",
1484+
},
14711485
request_options=request_options,
14721486
omit=OMIT,
14731487
)
14741488
try:
14751489
if 200 <= _response.status_code < 300:
14761490
return typing.cast(
1477-
RefineCodeResponse,
1491+
RefineComponentCodeResponse,
14781492
parse_obj_as(
1479-
type_=RefineCodeResponse, # type: ignore
1493+
type_=RefineComponentCodeResponse, # type: ignore
14801494
object_=_response.json(),
14811495
),
14821496
)

src/axiomatic/types/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from .formalize_response import FormalizeResponse
1212
from .generate_code_body import GenerateCodeBody
1313
from .generate_code_response import GenerateCodeResponse
14+
from .generate_component_code_response import GenerateComponentCodeResponse
1415
from .http_validation_error import HttpValidationError
1516
from .interactive_response import InteractiveResponse
1617
from .measurement import Measurement
@@ -22,6 +23,7 @@
2223
from .pic_component_settings_value import PicComponentSettingsValue
2324
from .refine_code_body import RefineCodeBody
2425
from .refine_code_response import RefineCodeResponse
26+
from .refine_component_code_response import RefineComponentCodeResponse
2527
from .requirement_body import RequirementBody
2628
from .solution_response import SolutionResponse
2729
from .solution_response_solution_value import SolutionResponseSolutionValue
@@ -49,6 +51,7 @@
4951
"FormalizeResponse",
5052
"GenerateCodeBody",
5153
"GenerateCodeResponse",
54+
"GenerateComponentCodeResponse",
5255
"HttpValidationError",
5356
"InteractiveResponse",
5457
"Measurement",
@@ -60,6 +63,7 @@
6063
"PicComponentSettingsValue",
6164
"RefineCodeBody",
6265
"RefineCodeResponse",
66+
"RefineComponentCodeResponse",
6367
"RequirementBody",
6468
"SolutionResponse",
6569
"SolutionResponseSolutionValue",
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
from ..core.pydantic_utilities import UniversalBaseModel
4+
import typing
5+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
6+
import pydantic
7+
8+
9+
class GenerateComponentCodeResponse(UniversalBaseModel):
10+
raw_content: str
11+
code: str
12+
outcome_success: bool
13+
feedback_text: typing.Optional[str] = None
14+
thought_text: typing.Optional[str] = None
15+
16+
if IS_PYDANTIC_V2:
17+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
18+
else:
19+
20+
class Config:
21+
frozen = True
22+
smart_union = True
23+
extra = pydantic.Extra.allow
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
from ..core.pydantic_utilities import UniversalBaseModel
4+
import typing
5+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
6+
import pydantic
7+
8+
9+
class RefineComponentCodeResponse(UniversalBaseModel):
10+
raw_content: str
11+
code: str
12+
outcome_success: bool
13+
feedback_text: typing.Optional[str] = None
14+
thought_text: typing.Optional[str] = None
15+
16+
if IS_PYDANTIC_V2:
17+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
18+
else:
19+
20+
class Config:
21+
frozen = True
22+
smart_union = True
23+
extra = pydantic.Extra.allow

0 commit comments

Comments
 (0)