File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ async def main() -> None:
2121 result = await operation
2222 print (result )
2323
24+ # example with several messages
25+ operation = await model .run_deferred (['a red cat' , 'Miyazaki style' ])
26+ result = await operation
27+ print (result )
28+
2429 # run with a several messages and with saving image to file
2530 path = pathlib .Path ('image.jpeg' )
2631 try :
@@ -30,11 +35,6 @@ async def main() -> None:
3035 finally :
3136 path .unlink (missing_ok = True )
3237
33- # example of several messages with a weight
34- operation = await model .run_deferred ([{'text' : 'a red cat' , 'weight' : 5 }, 'Miyazaki style' ])
35- result = await operation
36- print (result )
37-
3838 # example of using yandexgpt and yandex-art models together
3939 gpt = sdk .models .completions ('yandexgpt' )
4040 messages = await gpt .run ([
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ def main() -> None:
2020 result = operation .wait ()
2121 print (result )
2222
23+ # example with several messages
24+ operation = model .run_deferred (['a red cat' , 'Miyazaki style' ])
25+ result = operation .wait ()
26+ print (result )
27+
2328 # run with a several messages and with saving image to file
2429 path = pathlib .Path ('image.jpeg' )
2530 try :
@@ -29,11 +34,6 @@ def main() -> None:
2934 finally :
3035 path .unlink (missing_ok = True )
3136
32- # example of several messages with a weight
33- operation = model .run_deferred ([{'text' : 'a red cat' , 'weight' : 5 }, 'Miyazaki style' ])
34- result = operation .wait ()
35- print (result )
36-
3737 # example of using yandexgpt and yandex-art models together
3838 gpt = sdk .models .completions ('yandexgpt' )
3939 messages = gpt .run ([
You can’t perform that action at this time.
0 commit comments