1717from ..core .serialization import convert_and_respect_annotation_metadata
1818from ..types .synthesis_response import SynthesisResponse
1919from ..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
2222from ..types .netlist import Netlist
2323from ..types .statement import Statement
2424from ..types .measurement import Measurement
@@ -489,11 +489,9 @@ 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 (
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 :
495493 """
496- Generate GDS factory code to create a PIC component
494+ Generate GDS factory code to create a circuit
497495
498496 Parameters
499497 ----------
@@ -504,7 +502,7 @@ def generate(
504502
505503 Returns
506504 -------
507- GenerateComponentCodeResponse
505+ GenerateCodeResponse
508506 Successful Response
509507
510508 Examples
@@ -519,23 +517,20 @@ def generate(
519517 )
520518 """
521519 _response = self ._client_wrapper .httpx_client .request (
522- "pic/component /generate" ,
520+ "pic/code /generate" ,
523521 method = "POST" ,
524522 json = {
525523 "query" : query ,
526524 },
527- headers = {
528- "content-type" : "application/json" ,
529- },
530525 request_options = request_options ,
531526 omit = OMIT ,
532527 )
533528 try :
534529 if 200 <= _response .status_code < 300 :
535530 return typing .cast (
536- GenerateComponentCodeResponse ,
531+ GenerateCodeResponse ,
537532 parse_obj_as (
538- type_ = GenerateComponentCodeResponse , # type: ignore
533+ type_ = GenerateCodeResponse , # type: ignore
539534 object_ = _response .json (),
540535 ),
541536 )
@@ -561,7 +556,7 @@ def refine(
561556 feedback : typing .Optional [str ] = OMIT ,
562557 code : typing .Optional [str ] = OMIT ,
563558 request_options : typing .Optional [RequestOptions ] = None ,
564- ) -> RefineComponentCodeResponse :
559+ ) -> RefineCodeResponse :
565560 """
566561 Refine GDS factory code to create a circuit
567562
@@ -578,7 +573,7 @@ def refine(
578573
579574 Returns
580575 -------
581- RefineComponentCodeResponse
576+ RefineCodeResponse
582577 Successful Response
583578
584579 Examples
@@ -593,25 +588,22 @@ def refine(
593588 )
594589 """
595590 _response = self ._client_wrapper .httpx_client .request (
596- "pic/component /refine" ,
591+ "pic/code /refine" ,
597592 method = "POST" ,
598593 json = {
599594 "query" : query ,
600595 "feedback" : feedback ,
601596 "code" : code ,
602597 },
603- headers = {
604- "content-type" : "application/json" ,
605- },
606598 request_options = request_options ,
607599 omit = OMIT ,
608600 )
609601 try :
610602 if 200 <= _response .status_code < 300 :
611603 return typing .cast (
612- RefineComponentCodeResponse ,
604+ RefineCodeResponse ,
613605 parse_obj_as (
614- type_ = RefineComponentCodeResponse , # type: ignore
606+ type_ = RefineCodeResponse , # type: ignore
615607 object_ = _response .json (),
616608 ),
617609 )
@@ -1354,9 +1346,9 @@ async def main() -> None:
13541346
13551347 async def generate (
13561348 self , * , query : str , request_options : typing .Optional [RequestOptions ] = None
1357- ) -> GenerateComponentCodeResponse :
1349+ ) -> GenerateCodeResponse :
13581350 """
1359- Generate GDS factory code to create a PIC component
1351+ Generate GDS factory code to create a circuit
13601352
13611353 Parameters
13621354 ----------
@@ -1367,7 +1359,7 @@ async def generate(
13671359
13681360 Returns
13691361 -------
1370- GenerateComponentCodeResponse
1362+ GenerateCodeResponse
13711363 Successful Response
13721364
13731365 Examples
@@ -1390,23 +1382,20 @@ async def main() -> None:
13901382 asyncio.run(main())
13911383 """
13921384 _response = await self ._client_wrapper .httpx_client .request (
1393- "pic/component /generate" ,
1385+ "pic/code /generate" ,
13941386 method = "POST" ,
13951387 json = {
13961388 "query" : query ,
13971389 },
1398- headers = {
1399- "content-type" : "application/json" ,
1400- },
14011390 request_options = request_options ,
14021391 omit = OMIT ,
14031392 )
14041393 try :
14051394 if 200 <= _response .status_code < 300 :
14061395 return typing .cast (
1407- GenerateComponentCodeResponse ,
1396+ GenerateCodeResponse ,
14081397 parse_obj_as (
1409- type_ = GenerateComponentCodeResponse , # type: ignore
1398+ type_ = GenerateCodeResponse , # type: ignore
14101399 object_ = _response .json (),
14111400 ),
14121401 )
@@ -1432,7 +1421,7 @@ async def refine(
14321421 feedback : typing .Optional [str ] = OMIT ,
14331422 code : typing .Optional [str ] = OMIT ,
14341423 request_options : typing .Optional [RequestOptions ] = None ,
1435- ) -> RefineComponentCodeResponse :
1424+ ) -> RefineCodeResponse :
14361425 """
14371426 Refine GDS factory code to create a circuit
14381427
@@ -1449,7 +1438,7 @@ async def refine(
14491438
14501439 Returns
14511440 -------
1452- RefineComponentCodeResponse
1441+ RefineCodeResponse
14531442 Successful Response
14541443
14551444 Examples
@@ -1472,25 +1461,22 @@ async def main() -> None:
14721461 asyncio.run(main())
14731462 """
14741463 _response = await self ._client_wrapper .httpx_client .request (
1475- "pic/component /refine" ,
1464+ "pic/code /refine" ,
14761465 method = "POST" ,
14771466 json = {
14781467 "query" : query ,
14791468 "feedback" : feedback ,
14801469 "code" : code ,
14811470 },
1482- headers = {
1483- "content-type" : "application/json" ,
1484- },
14851471 request_options = request_options ,
14861472 omit = OMIT ,
14871473 )
14881474 try :
14891475 if 200 <= _response .status_code < 300 :
14901476 return typing .cast (
1491- RefineComponentCodeResponse ,
1477+ RefineCodeResponse ,
14921478 parse_obj_as (
1493- type_ = RefineComponentCodeResponse , # type: ignore
1479+ type_ = RefineCodeResponse , # type: ignore
14941480 object_ = _response .json (),
14951481 ),
14961482 )
0 commit comments