-
Notifications
You must be signed in to change notification settings - Fork 1
/
promptmeteo.html
1375 lines (1298 loc) · 126 KB
/
promptmeteo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html class="no-js" lang="en" data-content_root="">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" />
<!-- Generated with Sphinx 7.1.2 and Furo 2024.01.29 -->
<title>promptmeteo package - 🔥🧔</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?v=36a5483c" />
<style>
body {
--color-code-background: #f8f8f8;
--color-code-foreground: black;
}
@media not print {
body[data-theme="dark"] {
--color-code-background: #272822;
--color-code-foreground: #f8f8f2;
}
@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) {
--color-code-background: #272822;
--color-code-foreground: #f8f8f2;
}
}
}
</style></head>
<body>
<script>
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
</script>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-toc" viewBox="0 0 24 24">
<title>Contents</title>
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
</svg>
</symbol>
<symbol id="svg-menu" viewBox="0 0 24 24">
<title>Menu</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
</symbol>
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
<title>Expand</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</symbol>
<symbol id="svg-sun" viewBox="0 0 24 24">
<title>Light mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</symbol>
<symbol id="svg-moon" viewBox="0 0 24 24">
<title>Dark mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
</svg>
</symbol>
<symbol id="svg-sun-half" viewBox="0 0 24 24">
<title>Auto light/dark mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<circle cx="12" cy="12" r="9" />
<path d="M13 12h5" />
<path d="M13 15h4" />
<path d="M13 18h1" />
<path d="M13 9h4" />
<path d="M13 6h1" />
</svg>
</symbol>
</svg>
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
<label class="overlay sidebar-overlay" for="__navigation">
<div class="visually-hidden">Hide navigation sidebar</div>
</label>
<label class="overlay toc-overlay" for="__toc">
<div class="visually-hidden">Hide table of contents sidebar</div>
</label>
<div class="page">
<header class="mobile-header">
<div class="header-left">
<label class="nav-overlay-icon" for="__navigation">
<div class="visually-hidden">Toggle site navigation sidebar</div>
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">🔥🧔</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
<button class="theme-toggle">
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
</button>
</div>
<label class="toc-overlay-icon toc-header-icon" for="__toc">
<div class="visually-hidden">Toggle table of contents sidebar</div>
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
</label>
</div>
</header>
<aside class="sidebar-drawer">
<div class="sidebar-container">
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">
<span class="sidebar-brand-text">🔥🧔</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
<input type="hidden" name="check_keywords" value="yes">
<input type="hidden" name="area" value="default">
</form>
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="definition.html">🤔 What is this library for?</a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">⚙️ Installation and configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">⚡ Quickstart</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Classes</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="classes.html">👻 Classes</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Example notebooks</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="notebooks/01_promptmeteo_usage.html">Promptmeteo Usage - Save and Load Model</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/03_sentiment_analysis.html">Sentiment Analysis</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/04_test_flant5_classification_prompts.html">Flan-t5-Small - Test Classification Prompts</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/05_test_openai_classification_prompts.html">OpenAI - Test Classification Prompts</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/06_test_openai_api-generation.html">OpenAI - Test API Generation</a></li>
</ul>
</div>
</div>
</div>
</div>
</aside>
<div class="main">
<div class="content">
<div class="article-container">
<a href="#" class="back-to-top muted-link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
</svg>
<span>Back to top</span>
</a>
<div class="content-icon-container">
<div class="theme-toggle-container theme-toggle-content">
<button class="theme-toggle">
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
</button>
</div>
<label class="toc-overlay-icon toc-content-icon" for="__toc">
<div class="visually-hidden">Toggle table of contents sidebar</div>
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
</label>
</div>
<article role="main">
<section id="promptmeteo-package">
<h1>promptmeteo package<a class="headerlink" href="#promptmeteo-package" title="Permalink to this heading">#</a></h1>
<section id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this heading">#</a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="promptmeteo.models.html">promptmeteo.models package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.models.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.models.html#module-promptmeteo.models.azure_openai">promptmeteo.models.azure_openai module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.azure_openai.AzureOpenAILLM"><code class="docutils literal notranslate"><span class="pre">AzureOpenAILLM</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.azure_openai.ModelEnum"><code class="docutils literal notranslate"><span class="pre">ModelEnum</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.azure_openai.ModelEnum.GPT35Turbo"><code class="docutils literal notranslate"><span class="pre">ModelEnum.GPT35Turbo</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.azure_openai.ModelEnum.GPT35TurboInstruct"><code class="docutils literal notranslate"><span class="pre">ModelEnum.GPT35TurboInstruct</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.azure_openai.ModelTypes"><code class="docutils literal notranslate"><span class="pre">ModelTypes</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.azure_openai.ModelTypes.GPT35Turbo"><code class="docutils literal notranslate"><span class="pre">ModelTypes.GPT35Turbo</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.azure_openai.ModelTypes.GPT35TurboInstruct"><code class="docutils literal notranslate"><span class="pre">ModelTypes.GPT35TurboInstruct</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.azure_openai.ModelTypes.has_value"><code class="docutils literal notranslate"><span class="pre">ModelTypes.has_value()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.models.html#module-promptmeteo.models.base">promptmeteo.models.base module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.base.BaseModel"><code class="docutils literal notranslate"><span class="pre">BaseModel</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.base.BaseModel.embeddings"><code class="docutils literal notranslate"><span class="pre">BaseModel.embeddings</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.base.BaseModel.llm"><code class="docutils literal notranslate"><span class="pre">BaseModel.llm</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.base.BaseModel.run"><code class="docutils literal notranslate"><span class="pre">BaseModel.run()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.models.html#module-promptmeteo.models.bedrock">promptmeteo.models.bedrock module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.bedrock.BedrockLLM"><code class="docutils literal notranslate"><span class="pre">BedrockLLM</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.bedrock.ModelEnum"><code class="docutils literal notranslate"><span class="pre">ModelEnum</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.bedrock.ModelEnum.AnthropicClaudeV2"><code class="docutils literal notranslate"><span class="pre">ModelEnum.AnthropicClaudeV2</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.bedrock.ModelTypes"><code class="docutils literal notranslate"><span class="pre">ModelTypes</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.bedrock.ModelTypes.AnthropicClaudeV2"><code class="docutils literal notranslate"><span class="pre">ModelTypes.AnthropicClaudeV2</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.bedrock.ModelTypes.has_value"><code class="docutils literal notranslate"><span class="pre">ModelTypes.has_value()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.models.html#module-promptmeteo.models.fake_llm">promptmeteo.models.fake_llm module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.fake_llm.FakeLLM"><code class="docutils literal notranslate"><span class="pre">FakeLLM</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.fake_llm.FakeLLM.LLM_MAPPING"><code class="docutils literal notranslate"><span class="pre">FakeLLM.LLM_MAPPING</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.fake_llm.FakeListLLM"><code class="docutils literal notranslate"><span class="pre">FakeListLLM</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.fake_llm.FakeListLLM.i"><code class="docutils literal notranslate"><span class="pre">FakeListLLM.i</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.fake_llm.FakeListLLM.responses"><code class="docutils literal notranslate"><span class="pre">FakeListLLM.responses</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.fake_llm.FakePromptCopyLLM"><code class="docutils literal notranslate"><span class="pre">FakePromptCopyLLM</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.fake_llm.FakeStaticLLM"><code class="docutils literal notranslate"><span class="pre">FakeStaticLLM</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.fake_llm.FakeStaticLLM.response"><code class="docutils literal notranslate"><span class="pre">FakeStaticLLM.response</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.fake_llm.ModelTypes"><code class="docutils literal notranslate"><span class="pre">ModelTypes</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.fake_llm.ModelTypes.MODEL_1"><code class="docutils literal notranslate"><span class="pre">ModelTypes.MODEL_1</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.fake_llm.ModelTypes.MODEL_2"><code class="docutils literal notranslate"><span class="pre">ModelTypes.MODEL_2</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.fake_llm.ModelTypes.MODEL_3"><code class="docutils literal notranslate"><span class="pre">ModelTypes.MODEL_3</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.models.html#module-promptmeteo.models.google_vertexai">promptmeteo.models.google_vertexai module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.google_vertexai.GoogleVertexAILLM"><code class="docutils literal notranslate"><span class="pre">GoogleVertexAILLM</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.google_vertexai.ModelEnum"><code class="docutils literal notranslate"><span class="pre">ModelEnum</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.google_vertexai.ModelEnum.TextBison"><code class="docutils literal notranslate"><span class="pre">ModelEnum.TextBison</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.google_vertexai.ModelEnum.TextBison001"><code class="docutils literal notranslate"><span class="pre">ModelEnum.TextBison001</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.google_vertexai.ModelEnum.TextBison32k"><code class="docutils literal notranslate"><span class="pre">ModelEnum.TextBison32k</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.google_vertexai.ModelTypes"><code class="docutils literal notranslate"><span class="pre">ModelTypes</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.google_vertexai.ModelTypes.TextBison"><code class="docutils literal notranslate"><span class="pre">ModelTypes.TextBison</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.google_vertexai.ModelTypes.TextBison001"><code class="docutils literal notranslate"><span class="pre">ModelTypes.TextBison001</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.google_vertexai.ModelTypes.TextBison32k"><code class="docutils literal notranslate"><span class="pre">ModelTypes.TextBison32k</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.google_vertexai.ModelTypes.has_value"><code class="docutils literal notranslate"><span class="pre">ModelTypes.has_value()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.models.html#module-promptmeteo.models.hf_hub_api">promptmeteo.models.hf_hub_api module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.hf_hub_api.HFHubApiLLM"><code class="docutils literal notranslate"><span class="pre">HFHubApiLLM</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.hf_hub_api.ModelEnum"><code class="docutils literal notranslate"><span class="pre">ModelEnum</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.hf_hub_api.ModelEnum.FlanT5Xxl"><code class="docutils literal notranslate"><span class="pre">ModelEnum.FlanT5Xxl</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.hf_hub_api.ModelTypes"><code class="docutils literal notranslate"><span class="pre">ModelTypes</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.hf_hub_api.ModelTypes.FlanT5Xxl"><code class="docutils literal notranslate"><span class="pre">ModelTypes.FlanT5Xxl</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.hf_hub_api.ModelTypes.has_value"><code class="docutils literal notranslate"><span class="pre">ModelTypes.has_value()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.models.html#module-promptmeteo.models.hf_pipeline">promptmeteo.models.hf_pipeline module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.hf_pipeline.HFPipelineLLM"><code class="docutils literal notranslate"><span class="pre">HFPipelineLLM</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.hf_pipeline.ModelParams"><code class="docutils literal notranslate"><span class="pre">ModelParams</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.hf_pipeline.ModelParams.MODEL_1"><code class="docutils literal notranslate"><span class="pre">ModelParams.MODEL_1</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.hf_pipeline.ModelTypes"><code class="docutils literal notranslate"><span class="pre">ModelTypes</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.hf_pipeline.ModelTypes.MODEL_1"><code class="docutils literal notranslate"><span class="pre">ModelTypes.MODEL_1</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.hf_pipeline.ModelTypes.has_value"><code class="docutils literal notranslate"><span class="pre">ModelTypes.has_value()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.models.html#module-promptmeteo.models.openai">promptmeteo.models.openai module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.openai.ModelEnum"><code class="docutils literal notranslate"><span class="pre">ModelEnum</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.openai.ModelEnum.GPT35Turbo"><code class="docutils literal notranslate"><span class="pre">ModelEnum.GPT35Turbo</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.openai.ModelEnum.GPT35TurboInstruct"><code class="docutils literal notranslate"><span class="pre">ModelEnum.GPT35TurboInstruct</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.openai.ModelTypes"><code class="docutils literal notranslate"><span class="pre">ModelTypes</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.openai.ModelTypes.GPT35Turbo"><code class="docutils literal notranslate"><span class="pre">ModelTypes.GPT35Turbo</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.openai.ModelTypes.GPT35TurboInstruct"><code class="docutils literal notranslate"><span class="pre">ModelTypes.GPT35TurboInstruct</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.openai.ModelTypes.has_value"><code class="docutils literal notranslate"><span class="pre">ModelTypes.has_value()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.openai.OpenAILLM"><code class="docutils literal notranslate"><span class="pre">OpenAILLM</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.models.html#module-promptmeteo.models">Module contents</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.ModelFactory"><code class="docutils literal notranslate"><span class="pre">ModelFactory</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.ModelFactory.MAPPING"><code class="docutils literal notranslate"><span class="pre">ModelFactory.MAPPING</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.ModelFactory.factory_method"><code class="docutils literal notranslate"><span class="pre">ModelFactory.factory_method()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.ModelProvider"><code class="docutils literal notranslate"><span class="pre">ModelProvider</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.ModelProvider.PROVIDER_0"><code class="docutils literal notranslate"><span class="pre">ModelProvider.PROVIDER_0</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.ModelProvider.PROVIDER_1"><code class="docutils literal notranslate"><span class="pre">ModelProvider.PROVIDER_1</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.ModelProvider.PROVIDER_2"><code class="docutils literal notranslate"><span class="pre">ModelProvider.PROVIDER_2</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.ModelProvider.PROVIDER_3"><code class="docutils literal notranslate"><span class="pre">ModelProvider.PROVIDER_3</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.ModelProvider.PROVIDER_4"><code class="docutils literal notranslate"><span class="pre">ModelProvider.PROVIDER_4</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.models.html#promptmeteo.models.ModelProvider.PROVIDER_5"><code class="docutils literal notranslate"><span class="pre">ModelProvider.PROVIDER_5</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="promptmeteo.parsers.html">promptmeteo.parsers package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.parsers.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.parsers.html#module-promptmeteo.parsers.api_parser">promptmeteo.parsers.api_parser module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.api_parser.ApiParser"><code class="docutils literal notranslate"><span class="pre">ApiParser</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.api_parser.ApiParser.run"><code class="docutils literal notranslate"><span class="pre">ApiParser.run()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.parsers.html#module-promptmeteo.parsers.base">promptmeteo.parsers.base module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.base.BaseParser"><code class="docutils literal notranslate"><span class="pre">BaseParser</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.base.BaseParser.run"><code class="docutils literal notranslate"><span class="pre">BaseParser.run()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.base.ParserException"><code class="docutils literal notranslate"><span class="pre">ParserException</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.parsers.html#module-promptmeteo.parsers.classification_parser">promptmeteo.parsers.classification_parser module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.classification_parser.ClassificationParser"><code class="docutils literal notranslate"><span class="pre">ClassificationParser</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.classification_parser.ClassificationParser.run"><code class="docutils literal notranslate"><span class="pre">ClassificationParser.run()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.parsers.html#module-promptmeteo.parsers.dummy_parser">promptmeteo.parsers.dummy_parser module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.dummy_parser.DummyParser"><code class="docutils literal notranslate"><span class="pre">DummyParser</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.dummy_parser.DummyParser.run"><code class="docutils literal notranslate"><span class="pre">DummyParser.run()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.parsers.html#module-promptmeteo.parsers.json_parser">promptmeteo.parsers.json_parser module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.json_parser.JSONParser"><code class="docutils literal notranslate"><span class="pre">JSONParser</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.json_parser.JSONParser.run"><code class="docutils literal notranslate"><span class="pre">JSONParser.run()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.parsers.html#module-promptmeteo.parsers">Module contents</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.ParserFactory"><code class="docutils literal notranslate"><span class="pre">ParserFactory</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.ParserFactory.factory_method"><code class="docutils literal notranslate"><span class="pre">ParserFactory.factory_method()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.ParserTypes"><code class="docutils literal notranslate"><span class="pre">ParserTypes</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.ParserTypes.PARSER_1"><code class="docutils literal notranslate"><span class="pre">ParserTypes.PARSER_1</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.ParserTypes.PARSER_2"><code class="docutils literal notranslate"><span class="pre">ParserTypes.PARSER_2</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.ParserTypes.PARSER_3"><code class="docutils literal notranslate"><span class="pre">ParserTypes.PARSER_3</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.ParserTypes.PARSER_4"><code class="docutils literal notranslate"><span class="pre">ParserTypes.PARSER_4</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.ParserTypes.PARSER_5"><code class="docutils literal notranslate"><span class="pre">ParserTypes.PARSER_5</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.ParserTypes.PARSER_6"><code class="docutils literal notranslate"><span class="pre">ParserTypes.PARSER_6</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.ParserTypes.PARSER_7"><code class="docutils literal notranslate"><span class="pre">ParserTypes.PARSER_7</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.parsers.html#promptmeteo.parsers.ParserTypes.PARSER_8"><code class="docutils literal notranslate"><span class="pre">ParserTypes.PARSER_8</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="promptmeteo.prompts.html">promptmeteo.prompts package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.prompts.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.prompts.html#module-promptmeteo.prompts.base">promptmeteo.prompts.base module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.prompts.html#promptmeteo.prompts.base.BasePrompt"><code class="docutils literal notranslate"><span class="pre">BasePrompt</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.prompts.html#promptmeteo.prompts.base.BasePrompt.PROMPT_EXAMPLE"><code class="docutils literal notranslate"><span class="pre">BasePrompt.PROMPT_EXAMPLE</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.prompts.html#promptmeteo.prompts.base.BasePrompt.domain"><code class="docutils literal notranslate"><span class="pre">BasePrompt.domain</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.prompts.html#promptmeteo.prompts.base.BasePrompt.labels"><code class="docutils literal notranslate"><span class="pre">BasePrompt.labels</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.prompts.html#promptmeteo.prompts.base.BasePrompt.read_prompt"><code class="docutils literal notranslate"><span class="pre">BasePrompt.read_prompt()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.prompts.html#promptmeteo.prompts.base.BasePrompt.run"><code class="docutils literal notranslate"><span class="pre">BasePrompt.run()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.prompts.html#promptmeteo.prompts.base.BasePrompt.template"><code class="docutils literal notranslate"><span class="pre">BasePrompt.template</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.prompts.html#module-promptmeteo.prompts">Module contents</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.prompts.html#promptmeteo.prompts.PromptFactory"><code class="docutils literal notranslate"><span class="pre">PromptFactory</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.prompts.html#promptmeteo.prompts.PromptFactory.build_class"><code class="docutils literal notranslate"><span class="pre">PromptFactory.build_class()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.prompts.html#promptmeteo.prompts.PromptFactory.factory_method"><code class="docutils literal notranslate"><span class="pre">PromptFactory.factory_method()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.prompts.html#promptmeteo.prompts.get_files_taxonomy"><code class="docutils literal notranslate"><span class="pre">get_files_taxonomy()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="promptmeteo.selector.html">promptmeteo.selector package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.selector.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.selector.html#module-promptmeteo.selector.base">promptmeteo.selector.base module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.BaseSelector"><code class="docutils literal notranslate"><span class="pre">BaseSelector</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.BaseSelector.SELECTOR"><code class="docutils literal notranslate"><span class="pre">BaseSelector.SELECTOR</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.BaseSelector.load_example_selector"><code class="docutils literal notranslate"><span class="pre">BaseSelector.load_example_selector()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.BaseSelector.template"><code class="docutils literal notranslate"><span class="pre">BaseSelector.template</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.BaseSelector.vectorstore"><code class="docutils literal notranslate"><span class="pre">BaseSelector.vectorstore</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.BaseSelectorSupervised"><code class="docutils literal notranslate"><span class="pre">BaseSelectorSupervised</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.BaseSelectorSupervised.run"><code class="docutils literal notranslate"><span class="pre">BaseSelectorSupervised.run()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.BaseSelectorSupervised.train"><code class="docutils literal notranslate"><span class="pre">BaseSelectorSupervised.train()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.BaseSelectorUnsupervised"><code class="docutils literal notranslate"><span class="pre">BaseSelectorUnsupervised</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.BaseSelectorUnsupervised.run"><code class="docutils literal notranslate"><span class="pre">BaseSelectorUnsupervised.run()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.BaseSelectorUnsupervised.train"><code class="docutils literal notranslate"><span class="pre">BaseSelectorUnsupervised.train()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.SelectorAlgorithms"><code class="docutils literal notranslate"><span class="pre">SelectorAlgorithms</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.SelectorAlgorithms.RELEVANCE"><code class="docutils literal notranslate"><span class="pre">SelectorAlgorithms.RELEVANCE</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.SelectorAlgorithms.SIMILARITY"><code class="docutils literal notranslate"><span class="pre">SelectorAlgorithms.SIMILARITY</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.base.SelectorAlgorithms.SIMILARITY_CLASS_BALANCED"><code class="docutils literal notranslate"><span class="pre">SelectorAlgorithms.SIMILARITY_CLASS_BALANCED</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.selector.html#module-promptmeteo.selector.custom_selectors">promptmeteo.selector.custom_selectors module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.custom_selectors.BalancedSemanticSamplesSelector"><code class="docutils literal notranslate"><span class="pre">BalancedSemanticSamplesSelector</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.custom_selectors.BalancedSemanticSamplesSelector.Config"><code class="docutils literal notranslate"><span class="pre">BalancedSemanticSamplesSelector.Config</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.custom_selectors.BalancedSemanticSamplesSelector.add_example"><code class="docutils literal notranslate"><span class="pre">BalancedSemanticSamplesSelector.add_example()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.custom_selectors.BalancedSemanticSamplesSelector.class_key"><code class="docutils literal notranslate"><span class="pre">BalancedSemanticSamplesSelector.class_key</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.custom_selectors.BalancedSemanticSamplesSelector.class_list"><code class="docutils literal notranslate"><span class="pre">BalancedSemanticSamplesSelector.class_list</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.custom_selectors.BalancedSemanticSamplesSelector.example_keys"><code class="docutils literal notranslate"><span class="pre">BalancedSemanticSamplesSelector.example_keys</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.custom_selectors.BalancedSemanticSamplesSelector.from_examples"><code class="docutils literal notranslate"><span class="pre">BalancedSemanticSamplesSelector.from_examples()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.custom_selectors.BalancedSemanticSamplesSelector.input_keys"><code class="docutils literal notranslate"><span class="pre">BalancedSemanticSamplesSelector.input_keys</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.custom_selectors.BalancedSemanticSamplesSelector.k"><code class="docutils literal notranslate"><span class="pre">BalancedSemanticSamplesSelector.k</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.custom_selectors.BalancedSemanticSamplesSelector.select_examples"><code class="docutils literal notranslate"><span class="pre">BalancedSemanticSamplesSelector.select_examples()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.custom_selectors.BalancedSemanticSamplesSelector.vectorstore"><code class="docutils literal notranslate"><span class="pre">BalancedSemanticSamplesSelector.vectorstore</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.custom_selectors.BalancedSemanticSamplesSelector.vectorstore_kwargs"><code class="docutils literal notranslate"><span class="pre">BalancedSemanticSamplesSelector.vectorstore_kwargs</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.custom_selectors.sorted_values"><code class="docutils literal notranslate"><span class="pre">sorted_values()</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.selector.html#module-promptmeteo.selector">Module contents</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.SelectorFactory"><code class="docutils literal notranslate"><span class="pre">SelectorFactory</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.SelectorFactory.factory_method"><code class="docutils literal notranslate"><span class="pre">SelectorFactory.factory_method()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.SelectorTypes"><code class="docutils literal notranslate"><span class="pre">SelectorTypes</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.SelectorTypes.SUPERVISED"><code class="docutils literal notranslate"><span class="pre">SelectorTypes.SUPERVISED</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.selector.html#promptmeteo.selector.SelectorTypes.UNSUPERVISED"><code class="docutils literal notranslate"><span class="pre">SelectorTypes.UNSUPERVISED</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="promptmeteo.tasks.html">promptmeteo.tasks package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.tasks.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.tasks.html#module-promptmeteo.tasks.task">promptmeteo.tasks.task module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task.Task"><code class="docutils literal notranslate"><span class="pre">Task</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task.Task.language"><code class="docutils literal notranslate"><span class="pre">Task.language</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task.Task.model"><code class="docutils literal notranslate"><span class="pre">Task.model</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task.Task.parser"><code class="docutils literal notranslate"><span class="pre">Task.parser</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task.Task.prompt"><code class="docutils literal notranslate"><span class="pre">Task.prompt</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task.Task.run"><code class="docutils literal notranslate"><span class="pre">Task.run()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task.Task.selector"><code class="docutils literal notranslate"><span class="pre">Task.selector</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task.Task.task_type"><code class="docutils literal notranslate"><span class="pre">Task.task_type</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.tasks.html#module-promptmeteo.tasks.task_builder">promptmeteo.tasks.task_builder module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskBuilder"><code class="docutils literal notranslate"><span class="pre">TaskBuilder</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskBuilder.build_model"><code class="docutils literal notranslate"><span class="pre">TaskBuilder.build_model()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskBuilder.build_parser"><code class="docutils literal notranslate"><span class="pre">TaskBuilder.build_parser()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskBuilder.build_prompt"><code class="docutils literal notranslate"><span class="pre">TaskBuilder.build_prompt()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskBuilder.build_selector_by_load"><code class="docutils literal notranslate"><span class="pre">TaskBuilder.build_selector_by_load()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskBuilder.build_selector_by_train"><code class="docutils literal notranslate"><span class="pre">TaskBuilder.build_selector_by_train()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskBuilder.task"><code class="docutils literal notranslate"><span class="pre">TaskBuilder.task</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskTypes"><code class="docutils literal notranslate"><span class="pre">TaskTypes</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskTypes.API_CORRECTION"><code class="docutils literal notranslate"><span class="pre">TaskTypes.API_CORRECTION</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskTypes.API_GENERATION"><code class="docutils literal notranslate"><span class="pre">TaskTypes.API_GENERATION</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskTypes.CLASSIFICATION"><code class="docutils literal notranslate"><span class="pre">TaskTypes.CLASSIFICATION</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskTypes.CODE_GENERATION"><code class="docutils literal notranslate"><span class="pre">TaskTypes.CODE_GENERATION</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskTypes.QA"><code class="docutils literal notranslate"><span class="pre">TaskTypes.QA</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskTypes.SUMMARIZATION"><code class="docutils literal notranslate"><span class="pre">TaskTypes.SUMMARIZATION</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="promptmeteo.tasks.html#module-promptmeteo.tasks">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</section>
<section id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this heading">#</a></h2>
</section>
<section id="module-promptmeteo.api_formatter">
<span id="promptmeteo-api-formatter-module"></span><h2>promptmeteo.api_formatter module<a class="headerlink" href="#module-promptmeteo.api_formatter" title="Permalink to this heading">#</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="promptmeteo.api_formatter.APIFormatter">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">promptmeteo.api_formatter.</span></span><span class="sig-name descname"><span class="pre">APIFormatter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">language</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">model_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">model_provider_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">api_version</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">api_protocol</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">api_style_instructions</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#promptmeteo.api_formatter.APIFormatter" title="Permalink to this definition">#</a></dt>
<dd><p>Bases: <a class="reference internal" href="#promptmeteo.base.BaseUnsupervised" title="promptmeteo.base.BaseUnsupervised"><code class="xref py py-class docutils literal notranslate"><span class="pre">BaseUnsupervised</span></code></a></p>
<p>API Formatter Task.</p>
<p>This class initializes the API Formatter Task to correct and format APIs.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>language</strong> (<em>str</em>) – Language for the API descriptions.</p></li>
<li><p><strong>model_name</strong> (<em>str</em>) – Name of the model to be used for API generation.</p></li>
<li><p><strong>model_provider_name</strong> (<em>str</em>) – Name of the model provider.</p></li>
<li><p><strong>api_version</strong> (<em>str</em>) – Version of the API.</p></li>
<li><p><strong>api_protocol</strong> (<em>str</em>) – Protocol of the API.</p></li>
<li><p><strong>api_style_instructions</strong> (<em>Optional</em><em>[</em><em>List</em><em>[</em><em>str</em><em>]</em><em>]</em>) – Instructions for API style.</p></li>
<li><p><strong>**kwargs</strong> (<em>dict</em>) – Additional keyword arguments.</p></li>
<li><p><strong>Raises</strong> – </p></li>
<li><p><strong>------</strong> – </p></li>
<li><p><strong>ValueError</strong> – If <cite>api_protocol</cite> is not in the allowed protocols or if <cite>api_version</cite>
is not in the correct format.</p></li>
<li><p><strong>Example</strong> – </p></li>
<li><p><strong>-------</strong> – </p></li>
<li><p><strong>APIFormatter</strong> (<em>>>> from promptmeteo import</em>) – </p></li>
<li><p><strong>APIFormatter</strong><strong>(</strong> (<em>>>> model =</em>) – </p></li>
<li><p><strong>language="en"</strong> (<em>...</em>) – </p></li>
</ul>
</dd>
</dl>
<p>:param :
:param … api_version=”3.0.3”:
:param :
:param … api_protocol=”REST”:
:param :
:param … api_style_instructions=[“Use always camel case.”:
:param “Do not use acronyms.”]:
:param :
:param … model_provider_name=”openai”:
:param :
:param … model_name=”gpt-3.5-turbo-16k”:
:param :
:param … model_provider_token=model_token:
:param :
:param … external_info={:
:param … “servers”:
:type … “servers”: [
:param … {:
:param … “url”:
:type … “url”: “<a class="reference external" href="http://localhost:8080/">http://localhost:8080/</a>”,
:param … “description”:
:type … “description”: “Local environment”,
:param … }:
:param … ]:
:param :
:param … }:
:param :
:param … ):
:param >>> model.train(api_code):
:param >>> model.predict(api):</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="promptmeteo.api_formatter.APIFormatter.ALLOWED_PROTOCOLS">
<span class="sig-name descname"><span class="pre">ALLOWED_PROTOCOLS</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">['REST']</span></em><a class="headerlink" href="#promptmeteo.api_formatter.APIFormatter.ALLOWED_PROTOCOLS" title="Permalink to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="promptmeteo.api_formatter.APIFormatter.TASK_TYPE">
<span class="sig-name descname"><span class="pre">TASK_TYPE</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'api-correction'</span></em><a class="headerlink" href="#promptmeteo.api_formatter.APIFormatter.TASK_TYPE" title="Permalink to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="promptmeteo.api_formatter.APIFormatter.load_model">
<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">load_model</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">model_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="headerlink" href="#promptmeteo.api_formatter.APIFormatter.load_model" title="Permalink to this definition">#</a></dt>
<dd><p>Load a saved model from disk.</p>
<blockquote>
<div><dl class="simple">
<dt>model_path<span class="classifier">str</span></dt><dd><p>Path from where the model will be loaded.</p>
</dd>
</dl>
<dl class="simple">
<dt>Base</dt><dd><p>Loaded model instance.</p>
</dd>
</dl>
</div></blockquote>
<p>Loads a model artifact to make new predictions.</p>
<blockquote>
<div><dl class="simple">
<dt>model_path<span class="classifier">str</span></dt><dd><p>Path to the model artifact.</p>
</dd>
</dl>
<dl class="simple">
<dt>APIFormatter</dt><dd><p>Returns the loaded APIFormatter object.</p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="promptmeteo.api_formatter.APIFormatter.predict">
<span class="sig-name descname"><span class="pre">predict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">api_codes</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">external_info</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#promptmeteo.api_formatter.APIFormatter.predict" title="Permalink to this definition">#</a></dt>
<dd><p>Predict over new text samples.</p>
<blockquote>
<div><dl class="simple">
<dt>examples<span class="classifier">List[str]</span></dt><dd><p>List of text samples to predict.</p>
</dd>
</dl>
<dl class="simple">
<dt>List[str]</dt><dd><p>List of predictions.</p>
</dd>
</dl>
</div></blockquote>
<p>Receive a list of API codes and return a list with the corrected APIs.</p>
<blockquote>
<div><dl class="simple">
<dt>api_codes<span class="classifier">List[str]</span></dt><dd><p>List of API codes.</p>
</dd>
<dt>external_info<span class="classifier">dict</span></dt><dd><p>External information to be added to the APIs.</p>
</dd>
</dl>
<dl class="simple">
<dt>List[str]</dt><dd><p>List of corrected APIs.</p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="promptmeteo.api_formatter.APIFormatter.train">
<span class="sig-name descname"><span class="pre">train</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">api_codes</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="headerlink" href="#promptmeteo.api_formatter.APIFormatter.train" title="Permalink to this definition">#</a></dt>
<dd><dl class="simple">
<dt>Trains the model given use cases and notes on behaviour. Check the</dt><dd><p>parameters and task behaviour in each specific model training docstring.</p>
</dd>
</dl>
<p>Train the APIFormatter to extract entities and parameters.</p>
<blockquote>
<div><dl class="simple">
<dt>api_codes<span class="classifier">List[str]</span></dt><dd><p>List of API codes.</p>
</dd>
</dl>
<dl class="simple">
<dt>APIFormatter</dt><dd><p>Returns the trained APIFormatter object.</p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
</dd></dl>
</section>
<section id="module-promptmeteo.api_generator">
<span id="promptmeteo-api-generator-module"></span><h2>promptmeteo.api_generator module<a class="headerlink" href="#module-promptmeteo.api_generator" title="Permalink to this heading">#</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="promptmeteo.api_generator.APIGenerator">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">promptmeteo.api_generator.</span></span><span class="sig-name descname"><span class="pre">APIGenerator</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">language</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">model_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">model_provider_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">api_version</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">api_protocol</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">api_style_instructions</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#promptmeteo.api_generator.APIGenerator" title="Permalink to this definition">#</a></dt>
<dd><p>Bases: <a class="reference internal" href="#promptmeteo.base.BaseSupervised" title="promptmeteo.base.BaseSupervised"><code class="xref py py-class docutils literal notranslate"><span class="pre">BaseSupervised</span></code></a></p>
<p>API Generator Task.</p>
<p>This class initializes the APIGenerator Task to create APIs based on descriptions.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>language</strong> (<em>str</em>) – Language for the API descriptions.</p></li>
<li><p><strong>model_name</strong> (<em>str</em>) – Name of the model to be used for API generation.</p></li>
<li><p><strong>model_provider_name</strong> (<em>str</em>) – Name of the model provider.</p></li>
<li><p><strong>api_version</strong> (<em>str</em>) – Version of the API.</p></li>
<li><p><strong>api_protocol</strong> (<em>str</em>) – Protocol of the API.</p></li>
<li><p><strong>api_style_instructions</strong> (<em>Optional</em><em>[</em><em>List</em><em>[</em><em>str</em><em>]</em><em>]</em>) – Instructions for API style.</p></li>
<li><p><strong>**kwargs</strong> (<em>dict</em>) – Additional keyword arguments.</p></li>
<li><p><strong>Raises</strong> – </p></li>
<li><p><strong>------</strong> – </p></li>
<li><p><strong>ValueError</strong> – If <cite>api_protocol</cite> is not in the allowed protocols or if <cite>api_version</cite>
is not in the correct format.</p></li>
<li><p><strong>Example</strong> – </p></li>
<li><p><strong>-------</strong> – </p></li>
<li><p><strong>APIGenerator</strong> (<em>>>> from promptmeteo import</em>) – </p></li>
<li><p><strong>APIGenerator</strong><strong>(</strong> (<em>>>> model =</em>) – </p></li>
<li><p><strong>language="en"</strong> (<em>...</em>) – </p></li>
</ul>
</dd>
</dl>
<p>:param :
:param … selector_k=5:
:param :
:param … api_version=”3.0.3”:
:param :
:param … api_protocol=”REST”:
:param :
:param … api_style_instructions=[“Use always camel case.”:
:param “Do not use acronyms.”]:
:param :
:param … model_provider_name=”openai”:
:param :
:param … model_name=”gpt-3.5-turbo-16k”:
:param :
:param … model_provider_token=model_token:
:param :
:param … ):
:param >>> model.train(api_description:
:param api_code):
:param >>> model.predict(“API for managing account access”):</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="promptmeteo.api_generator.APIGenerator.ALLOWED_PROTOCOLS">
<span class="sig-name descname"><span class="pre">ALLOWED_PROTOCOLS</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">['REST']</span></em><a class="headerlink" href="#promptmeteo.api_generator.APIGenerator.ALLOWED_PROTOCOLS" title="Permalink to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="promptmeteo.api_generator.APIGenerator.TASK_TYPE">
<span class="sig-name descname"><span class="pre">TASK_TYPE</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'api-generation'</span></em><a class="headerlink" href="#promptmeteo.api_generator.APIGenerator.TASK_TYPE" title="Permalink to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="promptmeteo.api_generator.APIGenerator.train">
<span class="sig-name descname"><span class="pre">train</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">api_descriptions</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">api_codes</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="headerlink" href="#promptmeteo.api_generator.APIGenerator.train" title="Permalink to this definition">#</a></dt>
<dd><dl class="simple">
<dt>Trains the model given use cases and notes on behaviour. Check the</dt><dd><p>parameters and task behaviour in each specific model training docstring.</p>
</dd>
</dl>
<p>Train the APIGenerator from a list of APIs descriptions and contracts.</p>
<blockquote>
<div><dl class="simple">
<dt>api_descriptions<span class="classifier">List[str]</span></dt><dd><p>List of API descriptions.</p>
</dd>
<dt>api_codes<span class="classifier">List[str]</span></dt><dd><p>List of API codes - contracts.</p>
</dd>
</dl>
<dl class="simple">
<dt>APIGenerator</dt><dd><p>Returns the trained APIGenerator object.</p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
</dd></dl>
</section>
<section id="module-promptmeteo.base">
<span id="promptmeteo-base-module"></span><h2>promptmeteo.base module<a class="headerlink" href="#module-promptmeteo.base" title="Permalink to this heading">#</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="promptmeteo.base.Base">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">promptmeteo.base.</span></span><span class="sig-name descname"><span class="pre">Base</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">language</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">model_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">model_provider_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">model_provider_token</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">model_params</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dict</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prompt_domain</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prompt_labels</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prompt_detail</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">selector_k</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">selector_algorithm</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'relevance'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#promptmeteo.base.Base" title="Permalink to this definition">#</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">ABC</span></code></p>
<p>Promptmeteo is a tool powered by LLMs, capable of solving NLP tasks such as
text classification and Named Entity Recognition. Its interface resembles
that of a conventional ML model, making it easy to integrate into MLOps
pipelines.</p>
<section id="notes">
<h3>Notes:<a class="headerlink" href="#notes" title="Permalink to this heading">#</a></h3>
<blockquote>
<div><dl class="simple">
<dt>‘Sun is setting on the New Republic. It’s time for the ResistencIA to rise’</dt><dd><p>Padmé Amidala, mother of Leia</p>
</dd>
</dl>
</div></blockquote>
<dl class="py attribute">
<dt class="sig sig-object py" id="promptmeteo.base.Base.SELECTOR_TYPE">
<span class="sig-name descname"><span class="pre">SELECTOR_TYPE</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#promptmeteo.base.Base.SELECTOR_TYPE" title="Permalink to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="promptmeteo.base.Base.TASK_TYPE">
<span class="sig-name descname"><span class="pre">TASK_TYPE</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#promptmeteo.base.Base.TASK_TYPE" title="Permalink to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="promptmeteo.base.Base.builder">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">builder</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskBuilder" title="promptmeteo.tasks.task_builder.TaskBuilder"><span class="pre">TaskBuilder</span></a></em><a class="headerlink" href="#promptmeteo.base.Base.builder" title="Permalink to this definition">#</a></dt>
<dd><p>Get the TaskBuilder instance for the model.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="promptmeteo.base.Base.create_builder">
<span class="sig-name descname"><span class="pre">create_builder</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task_builder.TaskBuilder" title="promptmeteo.tasks.task_builder.TaskBuilder"><span class="pre">TaskBuilder</span></a></span></span><a class="headerlink" href="#promptmeteo.base.Base.create_builder" title="Permalink to this definition">#</a></dt>
<dd><p>Create a TaskBuilder instance for the model.</p>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="promptmeteo.base.Base.init_params">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">init_params</span></span><a class="headerlink" href="#promptmeteo.base.Base.init_params" title="Permalink to this definition">#</a></dt>
<dd><p>Get the initialization parameters of the model.</p>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="promptmeteo.base.Base.is_trained">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_trained</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><a class="headerlink" href="#promptmeteo.base.Base.is_trained" title="Permalink to this definition">#</a></dt>
<dd><p>Check if the model is trained.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="promptmeteo.base.Base.load_model">
<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">load_model</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">model_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="headerlink" href="#promptmeteo.base.Base.load_model" title="Permalink to this definition">#</a></dt>
<dd><p>Load a saved model from disk.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>model_path</strong> (<em>str</em>) – Path from where the model will be loaded.</p></li>
<li><p><strong>Returns</strong> – </p></li>
<li><p><strong>-------</strong> – </p></li>
<li><p><strong>Base</strong> – Loaded model instance.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="promptmeteo.base.Base.predict">
<span class="sig-name descname"><span class="pre">predict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">examples</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#promptmeteo.base.Base.predict" title="Permalink to this definition">#</a></dt>
<dd><p>Predict over new text samples.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>examples</strong> (<em>List</em><em>[</em><em>str</em><em>]</em>) – List of text samples to predict.</p></li>
<li><p><strong>Returns</strong> – </p></li>
<li><p><strong>-------</strong> – </p></li>
<li><p><strong>List</strong><strong>[</strong><strong>str</strong><strong>]</strong> – List of predictions.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="promptmeteo.base.Base.save_model">
<span class="sig-name descname"><span class="pre">save_model</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">model_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="headerlink" href="#promptmeteo.base.Base.save_model" title="Permalink to this definition">#</a></dt>
<dd><p>Save the trained model to disk.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>model_path</strong> (<em>str</em>) – Path where the model will be saved.</p></li>
<li><p><strong>Returns</strong> – </p></li>
<li><p><strong>-------</strong> – </p></li>
<li><p><strong>Base</strong> – Instance of the saved model.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="promptmeteo.base.Base.task">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">task</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="promptmeteo.tasks.html#promptmeteo.tasks.task.Task" title="promptmeteo.tasks.task.Task"><span class="pre">Task</span></a></em><a class="headerlink" href="#promptmeteo.base.Base.task" title="Permalink to this definition">#</a></dt>
<dd><p>Get the Task instance for the model.</p>
</dd></dl>
</section>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="promptmeteo.base.BaseSupervised">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">promptmeteo.base.</span></span><span class="sig-name descname"><span class="pre">BaseSupervised</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#promptmeteo.base.BaseSupervised" title="Permalink to this definition">#</a></dt>
<dd><p>Bases: <a class="reference internal" href="#promptmeteo.base.Base" title="promptmeteo.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">Base</span></code></a></p>
<p>Base class for supervised training tasks.</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="promptmeteo.base.BaseSupervised.SELECTOR_TYPE">
<span class="sig-name descname"><span class="pre">SELECTOR_TYPE</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'supervised'</span></em><a class="headerlink" href="#promptmeteo.base.BaseSupervised.SELECTOR_TYPE" title="Permalink to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="promptmeteo.base.BaseSupervised.train">
<span class="sig-name descname"><span class="pre">train</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">examples</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">annotations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="headerlink" href="#promptmeteo.base.BaseSupervised.train" title="Permalink to this definition">#</a></dt>
<dd><p>Trains the model given use cases and notes on behaviour. Check the
parameters and task behaviour in each specific model training docstring.</p>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="promptmeteo.base.BaseUnsupervised">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">promptmeteo.base.</span></span><span class="sig-name descname"><span class="pre">BaseUnsupervised</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#promptmeteo.base.BaseUnsupervised" title="Permalink to this definition">#</a></dt>
<dd><p>Bases: <a class="reference internal" href="#promptmeteo.base.Base" title="promptmeteo.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">Base</span></code></a></p>
<p>Base class for unsupervised training tasks.</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="promptmeteo.base.BaseUnsupervised.SELECTOR_TYPE">
<span class="sig-name descname"><span class="pre">SELECTOR_TYPE</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'unsupervised'</span></em><a class="headerlink" href="#promptmeteo.base.BaseUnsupervised.SELECTOR_TYPE" title="Permalink to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="promptmeteo.base.BaseUnsupervised.train">
<span class="sig-name descname"><span class="pre">train</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">examples</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="headerlink" href="#promptmeteo.base.BaseUnsupervised.train" title="Permalink to this definition">#</a></dt>
<dd><p>Trains the model given use cases and notes on behaviour. Check the
parameters and task behaviour in each specific model training docstring.</p>
</dd></dl>
</dd></dl>
</section>
<section id="module-promptmeteo.code_generator">
<span id="promptmeteo-code-generator-module"></span><h2>promptmeteo.code_generator module<a class="headerlink" href="#module-promptmeteo.code_generator" title="Permalink to this heading">#</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="promptmeteo.code_generator.CodeGenerator">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">promptmeteo.code_generator.</span></span><span class="sig-name descname"><span class="pre">CodeGenerator</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#promptmeteo.code_generator.CodeGenerator" title="Permalink to this definition">#</a></dt>
<dd><p>Bases: <a class="reference internal" href="#promptmeteo.base.BaseSupervised" title="promptmeteo.base.BaseSupervised"><code class="xref py py-class docutils literal notranslate"><span class="pre">BaseSupervised</span></code></a></p>
<p>Code Generator Task.</p>
<p>This class represents a model for generating code based on natural language descriptions.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>**kwargs</strong> (<em>dict</em>) – Additional keyword arguments.</p></li>
<li><p><strong>Example</strong> – </p></li>
<li><p><strong>-------</strong> – </p></li>
<li><p><strong>CodeGenerator</strong> (<em>>>> from promptmeteo import</em>) – </p></li>
<li><p><strong>CodeGenerator</strong><strong>(</strong> (<em>>>> model =</em>) – </p></li>
<li><p><strong>language="en"</strong> (<em>...</em>) – </p></li>
</ul>
</dd>
</dl>
<p>:param :
:param … prompt_domain=”python”:
:param :
:param … model_provider_name=”openai”:
:param :
:param … model_name=”text-davinci-003”:
:param :
:param … model_provider_token=model_token:
:param :
:param … prompt_detail=[:
:param … “add docstring in function definitions”:
:param :
:param … “add argument typing annotations”:
:param :
:param … ]:
:param :
:param … ):
:param >>> pred = model.predict(:
:param … [“A function that receives the argument <cite>foo</cite> and prints it.”]:
:param … ):
:param Returns:
:param ——-:
:param None:</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="promptmeteo.code_generator.CodeGenerator.TASK_TYPE">
<span class="sig-name descname"><span class="pre">TASK_TYPE</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'code-generation'</span></em><a class="headerlink" href="#promptmeteo.code_generator.CodeGenerator.TASK_TYPE" title="Permalink to this definition">#</a></dt>
<dd></dd></dl>
</dd></dl>
</section>
<section id="module-promptmeteo.constants">
<span id="promptmeteo-constants-module"></span><h2>promptmeteo.constants module<a class="headerlink" href="#module-promptmeteo.constants" title="Permalink to this heading">#</a></h2>
</section>
<section id="module-promptmeteo.document_classifier">
<span id="promptmeteo-document-classifier-module"></span><h2>promptmeteo.document_classifier module<a class="headerlink" href="#module-promptmeteo.document_classifier" title="Permalink to this heading">#</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="promptmeteo.document_classifier.DocumentClassifier">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">promptmeteo.document_classifier.</span></span><span class="sig-name descname"><span class="pre">DocumentClassifier</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#promptmeteo.document_classifier.DocumentClassifier" title="Permalink to this definition">#</a></dt>
<dd><p>Bases: <a class="reference internal" href="#promptmeteo.base.BaseSupervised" title="promptmeteo.base.BaseSupervised"><code class="xref py py-class docutils literal notranslate"><span class="pre">BaseSupervised</span></code></a></p>
<p>DocumentClassifier Task</p>
<p>This class represents a model for classifying documents into predefined categories.</p>
<section id="example">
<h3>Example:<a class="headerlink" href="#example" title="Permalink to this heading">#</a></h3>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">promptmeteo</span> <span class="kn">import</span> <span class="n">DocumentClassifier</span>
<span class="gp">>>> </span><span class="n">clf</span> <span class="o">=</span> <span class="n">DocumentClassifier</span><span class="p">(</span>
<span class="gp">... </span> <span class="n">model_provider_name</span><span class="o">=</span><span class="s2">"hf_pipeline"</span><span class="p">,</span>
<span class="gp">... </span> <span class="n">model_name</span><span class="o">=</span><span class="s2">"google/flan-t5-small"</span><span class="p">,</span>
<span class="gp">... </span> <span class="n">prompt_labels</span><span class="o">=</span><span class="p">[</span><span class="s2">"positive"</span><span class="p">,</span> <span class="s2">"negative"</span><span class="p">,</span> <span class="s2">"neutral"</span><span class="p">],</span>
<span class="gp">... </span><span class="p">)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">clf</span><span class="o">.</span><span class="n">train</span><span class="p">(</span>
<span class="gp">... </span> <span class="n">examples</span><span class="o">=</span><span class="p">[</span><span class="s2">"estoy feliz"</span><span class="p">,</span> <span class="s2">"me da igual"</span><span class="p">,</span> <span class="s2">"no me gusta"</span><span class="p">],</span>
<span class="gp">... </span> <span class="n">annotations</span><span class="o">=</span><span class="p">[</span><span class="s2">"positive"</span><span class="p">,</span> <span class="s2">"neutral"</span><span class="p">,</span> <span class="s2">"negative"</span><span class="p">],</span>
<span class="gp">... </span><span class="p">)</span>
</pre></div>
</div>