17
17
from ..core .serialization import convert_and_respect_annotation_metadata
18
18
from ..types .synthesis_response import SynthesisResponse
19
19
from ..types .synthesize_circuit_response import SynthesizeCircuitResponse
20
- from ..types .generate_component_code_response import GenerateComponentCodeResponse
21
- from ..types .refine_component_code_response import RefineComponentCodeResponse
20
+ from ..types .generate_code_response import GenerateCodeResponse
21
+ from ..types .refine_code_response import RefineCodeResponse
22
22
from ..types .netlist import Netlist
23
23
from ..types .statement import Statement
24
24
from ..types .measurement import Measurement
@@ -489,11 +489,9 @@ def synthesize_circuit_from_text(
489
489
raise ApiError (status_code = _response .status_code , body = _response .text )
490
490
raise ApiError (status_code = _response .status_code , body = _response_json )
491
491
492
- def generate (
493
- self , * , query : str , request_options : typing .Optional [RequestOptions ] = None
494
- ) -> GenerateComponentCodeResponse :
492
+ def generate (self , * , query : str , request_options : typing .Optional [RequestOptions ] = None ) -> GenerateCodeResponse :
495
493
"""
496
- Generate GDS factory code to create a PIC component
494
+ Generate GDS factory code to create a circuit
497
495
498
496
Parameters
499
497
----------
@@ -504,7 +502,7 @@ def generate(
504
502
505
503
Returns
506
504
-------
507
- GenerateComponentCodeResponse
505
+ GenerateCodeResponse
508
506
Successful Response
509
507
510
508
Examples
@@ -519,23 +517,20 @@ def generate(
519
517
)
520
518
"""
521
519
_response = self ._client_wrapper .httpx_client .request (
522
- "pic/component /generate" ,
520
+ "pic/code /generate" ,
523
521
method = "POST" ,
524
522
json = {
525
523
"query" : query ,
526
524
},
527
- headers = {
528
- "content-type" : "application/json" ,
529
- },
530
525
request_options = request_options ,
531
526
omit = OMIT ,
532
527
)
533
528
try :
534
529
if 200 <= _response .status_code < 300 :
535
530
return typing .cast (
536
- GenerateComponentCodeResponse ,
531
+ GenerateCodeResponse ,
537
532
parse_obj_as (
538
- type_ = GenerateComponentCodeResponse , # type: ignore
533
+ type_ = GenerateCodeResponse , # type: ignore
539
534
object_ = _response .json (),
540
535
),
541
536
)
@@ -561,7 +556,7 @@ def refine(
561
556
feedback : typing .Optional [str ] = OMIT ,
562
557
code : typing .Optional [str ] = OMIT ,
563
558
request_options : typing .Optional [RequestOptions ] = None ,
564
- ) -> RefineComponentCodeResponse :
559
+ ) -> RefineCodeResponse :
565
560
"""
566
561
Refine GDS factory code to create a circuit
567
562
@@ -578,7 +573,7 @@ def refine(
578
573
579
574
Returns
580
575
-------
581
- RefineComponentCodeResponse
576
+ RefineCodeResponse
582
577
Successful Response
583
578
584
579
Examples
@@ -593,25 +588,22 @@ def refine(
593
588
)
594
589
"""
595
590
_response = self ._client_wrapper .httpx_client .request (
596
- "pic/component /refine" ,
591
+ "pic/code /refine" ,
597
592
method = "POST" ,
598
593
json = {
599
594
"query" : query ,
600
595
"feedback" : feedback ,
601
596
"code" : code ,
602
597
},
603
- headers = {
604
- "content-type" : "application/json" ,
605
- },
606
598
request_options = request_options ,
607
599
omit = OMIT ,
608
600
)
609
601
try :
610
602
if 200 <= _response .status_code < 300 :
611
603
return typing .cast (
612
- RefineComponentCodeResponse ,
604
+ RefineCodeResponse ,
613
605
parse_obj_as (
614
- type_ = RefineComponentCodeResponse , # type: ignore
606
+ type_ = RefineCodeResponse , # type: ignore
615
607
object_ = _response .json (),
616
608
),
617
609
)
@@ -1354,9 +1346,9 @@ async def main() -> None:
1354
1346
1355
1347
async def generate (
1356
1348
self , * , query : str , request_options : typing .Optional [RequestOptions ] = None
1357
- ) -> GenerateComponentCodeResponse :
1349
+ ) -> GenerateCodeResponse :
1358
1350
"""
1359
- Generate GDS factory code to create a PIC component
1351
+ Generate GDS factory code to create a circuit
1360
1352
1361
1353
Parameters
1362
1354
----------
@@ -1367,7 +1359,7 @@ async def generate(
1367
1359
1368
1360
Returns
1369
1361
-------
1370
- GenerateComponentCodeResponse
1362
+ GenerateCodeResponse
1371
1363
Successful Response
1372
1364
1373
1365
Examples
@@ -1390,23 +1382,20 @@ async def main() -> None:
1390
1382
asyncio.run(main())
1391
1383
"""
1392
1384
_response = await self ._client_wrapper .httpx_client .request (
1393
- "pic/component /generate" ,
1385
+ "pic/code /generate" ,
1394
1386
method = "POST" ,
1395
1387
json = {
1396
1388
"query" : query ,
1397
1389
},
1398
- headers = {
1399
- "content-type" : "application/json" ,
1400
- },
1401
1390
request_options = request_options ,
1402
1391
omit = OMIT ,
1403
1392
)
1404
1393
try :
1405
1394
if 200 <= _response .status_code < 300 :
1406
1395
return typing .cast (
1407
- GenerateComponentCodeResponse ,
1396
+ GenerateCodeResponse ,
1408
1397
parse_obj_as (
1409
- type_ = GenerateComponentCodeResponse , # type: ignore
1398
+ type_ = GenerateCodeResponse , # type: ignore
1410
1399
object_ = _response .json (),
1411
1400
),
1412
1401
)
@@ -1432,7 +1421,7 @@ async def refine(
1432
1421
feedback : typing .Optional [str ] = OMIT ,
1433
1422
code : typing .Optional [str ] = OMIT ,
1434
1423
request_options : typing .Optional [RequestOptions ] = None ,
1435
- ) -> RefineComponentCodeResponse :
1424
+ ) -> RefineCodeResponse :
1436
1425
"""
1437
1426
Refine GDS factory code to create a circuit
1438
1427
@@ -1449,7 +1438,7 @@ async def refine(
1449
1438
1450
1439
Returns
1451
1440
-------
1452
- RefineComponentCodeResponse
1441
+ RefineCodeResponse
1453
1442
Successful Response
1454
1443
1455
1444
Examples
@@ -1472,25 +1461,22 @@ async def main() -> None:
1472
1461
asyncio.run(main())
1473
1462
"""
1474
1463
_response = await self ._client_wrapper .httpx_client .request (
1475
- "pic/component /refine" ,
1464
+ "pic/code /refine" ,
1476
1465
method = "POST" ,
1477
1466
json = {
1478
1467
"query" : query ,
1479
1468
"feedback" : feedback ,
1480
1469
"code" : code ,
1481
1470
},
1482
- headers = {
1483
- "content-type" : "application/json" ,
1484
- },
1485
1471
request_options = request_options ,
1486
1472
omit = OMIT ,
1487
1473
)
1488
1474
try :
1489
1475
if 200 <= _response .status_code < 300 :
1490
1476
return typing .cast (
1491
- RefineComponentCodeResponse ,
1477
+ RefineCodeResponse ,
1492
1478
parse_obj_as (
1493
- type_ = RefineComponentCodeResponse , # type: ignore
1479
+ type_ = RefineCodeResponse , # type: ignore
1494
1480
object_ = _response .json (),
1495
1481
),
1496
1482
)
0 commit comments