edsl 0.1.37__py3-none-any.whl → 0.1.37.dev1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- edsl/__version__.py +1 -1
- edsl/agents/Agent.py +35 -86
- edsl/agents/AgentList.py +0 -5
- edsl/agents/InvigilatorBase.py +23 -2
- edsl/agents/PromptConstructor.py +105 -148
- edsl/agents/descriptors.py +4 -17
- edsl/conjure/AgentConstructionMixin.py +3 -11
- edsl/conversation/Conversation.py +14 -66
- edsl/coop/coop.py +14 -148
- edsl/data/Cache.py +1 -1
- edsl/exceptions/__init__.py +3 -7
- edsl/exceptions/agents.py +19 -17
- edsl/exceptions/results.py +8 -11
- edsl/exceptions/surveys.py +10 -13
- edsl/inference_services/AwsBedrock.py +2 -7
- edsl/inference_services/InferenceServicesCollection.py +9 -32
- edsl/jobs/Jobs.py +71 -306
- edsl/jobs/interviews/InterviewExceptionEntry.py +1 -5
- edsl/jobs/tasks/TaskHistory.py +0 -1
- edsl/language_models/LanguageModel.py +59 -47
- edsl/language_models/__init__.py +0 -1
- edsl/prompts/Prompt.py +4 -11
- edsl/questions/QuestionBase.py +13 -53
- edsl/questions/QuestionBasePromptsMixin.py +33 -1
- edsl/questions/QuestionFreeText.py +0 -1
- edsl/questions/QuestionFunctional.py +2 -2
- edsl/questions/descriptors.py +28 -23
- edsl/results/DatasetExportMixin.py +1 -25
- edsl/results/Result.py +1 -16
- edsl/results/Results.py +120 -31
- edsl/results/ResultsDBMixin.py +1 -1
- edsl/results/Selector.py +1 -18
- edsl/scenarios/Scenario.py +12 -48
- edsl/scenarios/ScenarioHtmlMixin.py +2 -7
- edsl/scenarios/ScenarioList.py +1 -12
- edsl/surveys/Rule.py +4 -10
- edsl/surveys/Survey.py +77 -100
- edsl/utilities/utilities.py +0 -18
- {edsl-0.1.37.dist-info → edsl-0.1.37.dev1.dist-info}/METADATA +1 -1
- {edsl-0.1.37.dist-info → edsl-0.1.37.dev1.dist-info}/RECORD +42 -46
- edsl/conversation/chips.py +0 -95
- edsl/exceptions/BaseException.py +0 -21
- edsl/exceptions/scenarios.py +0 -22
- edsl/language_models/KeyLookup.py +0 -30
- {edsl-0.1.37.dist-info → edsl-0.1.37.dev1.dist-info}/LICENSE +0 -0
- {edsl-0.1.37.dist-info → edsl-0.1.37.dev1.dist-info}/WHEEL +0 -0
@@ -2,14 +2,14 @@ edsl/Base.py,sha256=xm_WdwWrQRO0Iy88XsOSRm00ZNHv5pX4LbFid8oilX8,9433
|
|
2
2
|
edsl/BaseDiff.py,sha256=RoVEh52UJs22yMa7k7jv8se01G62jJNWnBzaZngo-Ug,8260
|
3
3
|
edsl/TemplateLoader.py,sha256=sDBlSMt7EfOduM7w3h6v03gvh_Rzn9hVrlS-iLSQdZA,849
|
4
4
|
edsl/__init__.py,sha256=5dKXbmvmALx-_7KRNdC66cvP_dpLpsfTDBV57SMgTzY,1817
|
5
|
-
edsl/__version__.py,sha256=
|
6
|
-
edsl/agents/Agent.py,sha256=
|
7
|
-
edsl/agents/AgentList.py,sha256=
|
5
|
+
edsl/__version__.py,sha256=loJu7-IAYj5k1ZZkhE4hT7OuCm1VGGA6ii_3lkW-tkA,28
|
6
|
+
edsl/agents/Agent.py,sha256=OJlBBdiHJztpvbyFwIevF2skYZdtvinkP9OccpSH0to,29454
|
7
|
+
edsl/agents/AgentList.py,sha256=lAQ9uMEyPIYXTz3Nz7eTQAkMLrG0yGXY-1M5E70I60s,11454
|
8
8
|
edsl/agents/Invigilator.py,sha256=m4T-z4aNCGd4LKjLXVNI2VszYW-pQeScfcFAxkb0pWc,9080
|
9
|
-
edsl/agents/InvigilatorBase.py,sha256=
|
10
|
-
edsl/agents/PromptConstructor.py,sha256=
|
9
|
+
edsl/agents/InvigilatorBase.py,sha256=G4hmTrlxnLjeKlxQx1V7MGwHQfS9pIGaoR0Pm0vIYzU,10701
|
10
|
+
edsl/agents/PromptConstructor.py,sha256=y5xZ3rvlloy5COirIaEuJlebm7LhE7zoFAfciZdr6k0,13254
|
11
11
|
edsl/agents/__init__.py,sha256=B1dWfV4QWOo8cc2KeuetdFGeNhZ8XHc0Q8YhQW9k7BE,136
|
12
|
-
edsl/agents/descriptors.py,sha256=
|
12
|
+
edsl/agents/descriptors.py,sha256=m8ND3-2-JbgNX1HGakBNLIeemwsgYa1mQxYO9GW33hw,2934
|
13
13
|
edsl/agents/prompt_helpers.py,sha256=rHUxM_F0kCOkJmnhCyK-amFKViAYvpRRLD8LHFLGqQw,5023
|
14
14
|
edsl/auto/AutoStudy.py,sha256=yNnhfJPO6oxbgVaYbRftJa8DluKhajfgLCh9o9E3YmU,3843
|
15
15
|
edsl/auto/StageBase.py,sha256=6Ve0cMmc-wdK7tgk7_cOopnvvggEOSkNWfLLWXny7QU,7933
|
@@ -24,7 +24,7 @@ edsl/auto/SurveyCreatorPipeline.py,sha256=s5S_RPFM3Ia8Dzdv52_576BxfsFq9GwXEVWxJI
|
|
24
24
|
edsl/auto/utilities.py,sha256=DDngZCGlzjWeJUvPHhMEZ5ZoVm4KgGYtgyRA1mfUfmA,7606
|
25
25
|
edsl/base/Base.py,sha256=DShsfI6A2ojg42muPFpVtUgTX33pnqT5vtN0SRlr-9Q,8866
|
26
26
|
edsl/config.py,sha256=IfEm07QvhV5B2baNg6SrhME82BHBGwNZSLmYnx9ERxM,5875
|
27
|
-
edsl/conjure/AgentConstructionMixin.py,sha256=
|
27
|
+
edsl/conjure/AgentConstructionMixin.py,sha256=qLLYJH02HotVwBUYzaHs4QW0t5nsC3NX15qxQLzEwLI,5702
|
28
28
|
edsl/conjure/Conjure.py,sha256=JaCuAm3rmqjh11_X8PXgvPsVHGql3yTn9JEzVlzOUVU,2019
|
29
29
|
edsl/conjure/InputData.py,sha256=RdFgkzzayddSTd6vcwBB8LC796YBj94pciwrQx9nBtg,22003
|
30
30
|
edsl/conjure/InputDataCSV.py,sha256=m4hHSQogxt7LNcGNxcGRkrbdGy8pIQu5KvXhIEt9i6k,1684
|
@@ -40,16 +40,15 @@ edsl/conjure/__init__.py,sha256=1lPYFjV73GzYYSXiTyxopM4nKcXVHumEEo0fe06DbMo,535
|
|
40
40
|
edsl/conjure/examples/placeholder.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
41
|
edsl/conjure/naming_utilities.py,sha256=8uoGaCPZQKLwz2HudtsFSovivTGumQrFYxXxck5WUZQ,4964
|
42
42
|
edsl/conjure/utilities.py,sha256=yRdOJx9KIpWXMx41Bbfysx7Zd4v2ROwca5L4T1rmtQM,5539
|
43
|
-
edsl/conversation/Conversation.py,sha256=
|
43
|
+
edsl/conversation/Conversation.py,sha256=h_t9JWbMlec2788ojtxi0skYicchrDsy2j6K-mDpHKM,7633
|
44
44
|
edsl/conversation/car_buying.py,sha256=Quh2Q8O9YoCyTKJUy3li376QFIOcL1gX0y89w3wlSl4,1950
|
45
|
-
edsl/conversation/chips.py,sha256=IoWoWEdSfJqy_TRcPPjT73lhEmYgBrZ4_3kwHEHJijQ,3323
|
46
45
|
edsl/conversation/mug_negotiation.py,sha256=mjvAqErD4AjN3G2za2c-X-3axOShW-zAJUeiJqTxVPA,2616
|
47
46
|
edsl/conversation/next_speaker_utilities.py,sha256=bqr5JglCd6bdLc9IZ5zGOAsmN2F4ERiubSMYvZIG7qk,3629
|
48
47
|
edsl/coop/PriceFetcher.py,sha256=pCCWBqFnSv8iYpgQKhAzVCdan1xTCNesZgmIB34N4HY,1770
|
49
48
|
edsl/coop/__init__.py,sha256=4iZCwJSzJVyjBYk8ggGxY2kZjq9dXVT1jhyPDNyew4I,115
|
50
|
-
edsl/coop/coop.py,sha256=
|
49
|
+
edsl/coop/coop.py,sha256=bsQp6vOZBuIzTql4_UFfYVtqShQE7scvydEv29SmyTM,29118
|
51
50
|
edsl/coop/utils.py,sha256=UZwljKYW_Yjw7RYcjOg3SW7fn1pyHQfJ1fM48TBNoss,3601
|
52
|
-
edsl/data/Cache.py,sha256=
|
51
|
+
edsl/data/Cache.py,sha256=jDt0LoZjLpGnM8-CraQEcsQaVg--U3BiBR1zHj0nDn8,16536
|
53
52
|
edsl/data/CacheEntry.py,sha256=_5UiFaJQu_U-Z1_lEPt-h6Gaidp2Eunk02wOd3Ni3MQ,7252
|
54
53
|
edsl/data/CacheHandler.py,sha256=DxbfeT2nZGRu8yQkbWr2tyEnhNiClevMsd5KZMCq2f0,4793
|
55
54
|
edsl/data/RemoteCacheSync.py,sha256=is3j644YAZDPCt4bMxOZpXtJkCXLs_hoKukxQosKKXM,3628
|
@@ -58,9 +57,8 @@ edsl/data/__init__.py,sha256=KBNGGEuGHq--D-TlpAQmvv_If906dJc1Gsy028zOx78,170
|
|
58
57
|
edsl/data/orm.py,sha256=Jz6rvw5SrlxwysTL0QI9r68EflKxeEBmf6j6himHDS8,238
|
59
58
|
edsl/data_transfer_models.py,sha256=9LsvZNMvyEEkF-DIcEUA9iomFbxG7E6nRUqsbHoB03k,1951
|
60
59
|
edsl/enums.py,sha256=Z6nhaP8p3z0UJSfsCGb6VQUtGUKw3AK6yC0UDwOi05c,5247
|
61
|
-
edsl/exceptions/
|
62
|
-
edsl/exceptions/
|
63
|
-
edsl/exceptions/agents.py,sha256=8K9_kB46EGaVaL9SNjPWQL403BXIcxNAUKbpI9DkmEw,1220
|
60
|
+
edsl/exceptions/__init__.py,sha256=HVg-U-rJ0fRoG9Rws6gnK5S9B68SkPWDPsoD6KpMZ-A,1370
|
61
|
+
edsl/exceptions/agents.py,sha256=3SORFwFbMGrF6-vAL2GrKEVdPcXo7md_k2oYufnVXHA,673
|
64
62
|
edsl/exceptions/configuration.py,sha256=qH2sInNTndKlCLAaNgaXHyRFdKQHL7-dElB_j8wz9g4,351
|
65
63
|
edsl/exceptions/coop.py,sha256=xunPPrnbcNHn60wnH-Qw0rC_Ey99X_N7HnOBF8BQg7E,138
|
66
64
|
edsl/exceptions/data.py,sha256=K24CjgwFiMWxrF1Z2dF6F7Vfrge_y9kMK_wsYYSaroU,209
|
@@ -69,17 +67,16 @@ edsl/exceptions/jobs.py,sha256=sSUATmzBIN1oINWuwPExxPqIWmfCo0XYj_yR4dJzVjo,803
|
|
69
67
|
edsl/exceptions/language_models.py,sha256=lpAFUiY8uVMXHAznGXtHQSdzdkAWOGu5A9u3-t1vi8A,1814
|
70
68
|
edsl/exceptions/prompts.py,sha256=vD_reI-RVKWYHYozenEmhmB7Rb1sIiXghgNUtbVGBUo,247
|
71
69
|
edsl/exceptions/questions.py,sha256=ItTXeJEN2TDBL0LLWy37RFX3QG5iUoZa9HzUOs5Ney4,2509
|
72
|
-
edsl/exceptions/results.py,sha256=
|
73
|
-
edsl/exceptions/
|
74
|
-
edsl/exceptions/surveys.py,sha256=BJUKFVkj6nrsq3TyvaZfEE-zjy3BCAM-s1lsdcrv_MM,677
|
70
|
+
edsl/exceptions/results.py,sha256=EkjowYF_7tvDQU0SlyHRiETq-MzZcxALMn0CyaSk2M0,386
|
71
|
+
edsl/exceptions/surveys.py,sha256=lADtr-tvPmUYSfRy3TdkTV5SzZfShlMgCzm-ZGYRlGk,557
|
75
72
|
edsl/inference_services/AnthropicService.py,sha256=6kE8miYIsCZ6B-da4LMHE3tUkyNAsMZcNF8JWKLRKkg,2917
|
76
|
-
edsl/inference_services/AwsBedrock.py,sha256=
|
73
|
+
edsl/inference_services/AwsBedrock.py,sha256=tVsKrw7LHoqc-zDaLew0ufwEMYP_OzkCzsc4zZuXdEk,3926
|
77
74
|
edsl/inference_services/AzureAI.py,sha256=Xd3r4Y5OQReW-hG67ymK3LSDLiHj5hMFuvGEz5DI3lY,8889
|
78
75
|
edsl/inference_services/DeepInfraService.py,sha256=fWlH5sCNxf8eHPHxPPxJMEVWpCM9sDenkC8IZYqtXfA,515
|
79
76
|
edsl/inference_services/GoogleService.py,sha256=CeyQ2Db_cCFOIVvetSwsFLqenJFrg4EGoRYwIe7-7-U,5422
|
80
77
|
edsl/inference_services/GroqService.py,sha256=eDMq8d7YAlJ2689ywaoaPGvMgFfOiX1KYlF_vr97N6I,510
|
81
78
|
edsl/inference_services/InferenceServiceABC.py,sha256=Js_XFM4678C0NrTXbmSKLyIsiNzye55gOoz2-FyiC7E,4694
|
82
|
-
edsl/inference_services/InferenceServicesCollection.py,sha256=
|
79
|
+
edsl/inference_services/InferenceServicesCollection.py,sha256=fq6hiBeJal3V_JhnMrKljvmewCL70hNV1jCzmuk5AOI,3016
|
83
80
|
edsl/inference_services/MistralAIService.py,sha256=7mUsBEZdEWIjfh4qMNemTT2xYMq7k0yuMLGtDTdfp4Y,3878
|
84
81
|
edsl/inference_services/OllamaService.py,sha256=oro9CRl8IUE2Ro-zE69Cr4Zaf6Gdw29XW5CFU-46E0k,498
|
85
82
|
edsl/inference_services/OpenAIService.py,sha256=wraTu62bZojmgAXHNG6pJMMPZiyO1pSDfY73LVaBR_I,7621
|
@@ -91,14 +88,14 @@ edsl/inference_services/rate_limits_cache.py,sha256=HYslviz7mxF9U4CUTPAkoyBsiXjS
|
|
91
88
|
edsl/inference_services/registry.py,sha256=Fn6va65MqD9lnFvT603ZnU7Ok8IW64M2MzOH57kf9-A,1240
|
92
89
|
edsl/inference_services/write_available.py,sha256=NNwhATlaMp8IYY635MSx-oYxt5X15acjAfaqYCo_I1Y,285
|
93
90
|
edsl/jobs/Answers.py,sha256=c4LpigQjdnMr7iJu8571C4FggGPVudfT7hbJgmgKW40,1821
|
94
|
-
edsl/jobs/Jobs.py,sha256=
|
91
|
+
edsl/jobs/Jobs.py,sha256=_MrbSg-gWWASEEpPtiZcfTX-D8rN3NMg9V0vVZXLFeg,40176
|
95
92
|
edsl/jobs/__init__.py,sha256=aKuAyd_GoalGj-k7djOoVwEbFUE2XLPlikXaA1_8yAg,32
|
96
93
|
edsl/jobs/buckets/BucketCollection.py,sha256=11CRisE1WAPcAlI3YJK3DVvu0AqSvv8KskXo4Q1waSk,2286
|
97
94
|
edsl/jobs/buckets/ModelBuckets.py,sha256=hxw_tzc0V42CiB7mh5jIxlgwDVJ-zFZhlLtKrHEg8ho,2419
|
98
95
|
edsl/jobs/buckets/TokenBucket.py,sha256=7fG4omzTcj5xC2iJLO9bfBkdAGs6Y3weXzlA3BgPr0E,9090
|
99
96
|
edsl/jobs/interviews/Interview.py,sha256=hInquPQ0msoQfcNPemXmtIo3SMrECbqICYhno_6m_n0,25987
|
100
97
|
edsl/jobs/interviews/InterviewExceptionCollection.py,sha256=ZIe9nnI8pznxp1D0K2Ii9SHorc9-f0k_lQV-Giq41P8,3666
|
101
|
-
edsl/jobs/interviews/InterviewExceptionEntry.py,sha256=
|
98
|
+
edsl/jobs/interviews/InterviewExceptionEntry.py,sha256=j0vNeakLhafDAGgQDNpS7SdZLDbCXAq-LqYzClMViwk,5578
|
102
99
|
edsl/jobs/interviews/InterviewStatistic.py,sha256=hY5d2EkIJ96NilPpZAvZZzZoxLXM7ss3xx5MIcKtTPs,1856
|
103
100
|
edsl/jobs/interviews/InterviewStatisticsCollection.py,sha256=_ZZ0fnZBQiIywP9Q_wWjpWhlfcPe2cn32GKut10t5RI,788
|
104
101
|
edsl/jobs/interviews/InterviewStatusDictionary.py,sha256=MSyys4hOWe1d8gfsUvAPbcKrs8YiPnz8jpufBSJL7SU,2485
|
@@ -110,16 +107,15 @@ edsl/jobs/runners/JobsRunnerStatus.py,sha256=4eCh9sRpswGdKeSMW9pCGCAjJZa-OrWUPI7
|
|
110
107
|
edsl/jobs/runners/JobsRunnerStatusData.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
111
108
|
edsl/jobs/tasks/QuestionTaskCreator.py,sha256=K-xATHIXMWPTMOnms5UDW30eTIlIfebf7oOEfwrh1ME,10072
|
112
109
|
edsl/jobs/tasks/TaskCreators.py,sha256=XqAbNU33378Z4PQncokbfJwnKt3KHR9aqa5fKYRDpfg,2694
|
113
|
-
edsl/jobs/tasks/TaskHistory.py,sha256=
|
110
|
+
edsl/jobs/tasks/TaskHistory.py,sha256=k2uspUTjzBiFSH5I5in-IGFR4sTsI593sLlca63uFn8,14832
|
114
111
|
edsl/jobs/tasks/TaskStatusLog.py,sha256=bqH36a32F12fjX-M-4lNOhHaK2-WLFzKE-r0PxZPRjI,546
|
115
112
|
edsl/jobs/tasks/task_status_enum.py,sha256=DOyrz61YlIS8R1W7izJNphcLrJ7I_ReUlfdRmk23h0Q,5333
|
116
113
|
edsl/jobs/tokens/InterviewTokenUsage.py,sha256=u_6-IHpGFwZ6qMEXr24-jyLVUSSp4dSs_4iAZsBv7O4,1100
|
117
114
|
edsl/jobs/tokens/TokenUsage.py,sha256=odj2-wDNEbHl9noyFAQ0DSKV0D9cv3aDOpmXufKZ8O4,1323
|
118
|
-
edsl/language_models/
|
119
|
-
edsl/language_models/LanguageModel.py,sha256=untbXFGd56qMl3lzSQn0SS4ZDhlofWVhfxXBGwQtJSw,24690
|
115
|
+
edsl/language_models/LanguageModel.py,sha256=7kXi42P6m8kku-_UxstTapIzI-3N8a3Ks3_IRJEgxpc,25395
|
120
116
|
edsl/language_models/ModelList.py,sha256=GhjRV7y1jRvP_Yjgwv6fxksTVb8sFPBiiRRfdqW-hgg,2852
|
121
117
|
edsl/language_models/RegisterLanguageModelsMeta.py,sha256=eMtBSAnlRnC4c-0_o2QkSNyzv-uAce4BEGMXq2PLj2E,7523
|
122
|
-
edsl/language_models/__init__.py,sha256=
|
118
|
+
edsl/language_models/__init__.py,sha256=bvY7Gy6VkX1gSbNkRbGPS-M1kUnb0EohL0FSagaEaTs,109
|
123
119
|
edsl/language_models/fake_openai_call.py,sha256=dxbL5e4NLF-eTk9IduPyGwLiVCX_-eGCJDaLYPlQTqc,364
|
124
120
|
edsl/language_models/fake_openai_service.py,sha256=2AAsAinELbMZRqiepwBkWhWcLuMe5ORXUBNarrdl1ug,1714
|
125
121
|
edsl/language_models/registry.py,sha256=hfOlKbTkXrXGpZHQQPKE9uyyUCgOxoUyyIaKL2kf53U,4369
|
@@ -128,17 +124,17 @@ edsl/language_models/unused/ReplicateBase.py,sha256=J1oqf7mEyyKhRwNUomnptVqAsVFY
|
|
128
124
|
edsl/language_models/utilities.py,sha256=GWON2ahCpB-_-hhqmQ5Yi7_rKB4cd8GlucWuq6EnGZQ,2280
|
129
125
|
edsl/notebooks/Notebook.py,sha256=xi9xkxmkQ6-DwhqbjjMLpYKB0VJV20AtwEonJ6mnqjo,7739
|
130
126
|
edsl/notebooks/__init__.py,sha256=VNUA3nNq04slWNbYaNrzOhQJu3AZANpvBniyCJSzJ7U,45
|
131
|
-
edsl/prompts/Prompt.py,sha256=
|
127
|
+
edsl/prompts/Prompt.py,sha256=VLROOM2Gtf8sNdqvlTWz9LK_jIRq0p9toCJGE3xyNno,11188
|
132
128
|
edsl/prompts/__init__.py,sha256=wrtkH7JW72U93_pnmTvqQx_NoadH5OPRNfrZ5AaD7Co,87
|
133
129
|
edsl/questions/AnswerValidatorMixin.py,sha256=t_ABep50KP02GSc48Y8VAEjp35drVOngfrWXU5aVhgk,11505
|
134
|
-
edsl/questions/QuestionBase.py,sha256=
|
130
|
+
edsl/questions/QuestionBase.py,sha256=QsdYFHnWYh04JpCdx3o3WGgohBfE5X_7idQRRYrx_SA,21169
|
135
131
|
edsl/questions/QuestionBaseGenMixin.py,sha256=CPxjWZjrxuSO8YWelz6dbp7fm788gN7-T8z7jXStboQ,6017
|
136
|
-
edsl/questions/QuestionBasePromptsMixin.py,sha256=
|
132
|
+
edsl/questions/QuestionBasePromptsMixin.py,sha256=tInTg27KtmyO-hX4ZZdzgPTy4a8LZzbssUC_tAhRsxU,9552
|
137
133
|
edsl/questions/QuestionBudget.py,sha256=TJgPsyqafJdJw5if0zVxh7zHloourINUqUWfWIlRq9Y,8131
|
138
134
|
edsl/questions/QuestionCheckBox.py,sha256=wC_doEdNZi4y8Uz-tXZyQ2GYS5wQKOWhbVUnyVLoACU,12840
|
139
135
|
edsl/questions/QuestionExtract.py,sha256=PlXwMeZgPAFBXIHSXpFMYTToag-HwA9C7u6-Z3bQMek,6103
|
140
|
-
edsl/questions/QuestionFreeText.py,sha256=
|
141
|
-
edsl/questions/QuestionFunctional.py,sha256=
|
136
|
+
edsl/questions/QuestionFreeText.py,sha256=uXJxrrAGCq0-J6WpO6TBNFBNOC2ztoEVa-2UMXuwlak,3384
|
137
|
+
edsl/questions/QuestionFunctional.py,sha256=772tduB8zFs5xlssKBay__4_SilfiDkoe-IvK0s2ftU,5247
|
142
138
|
edsl/questions/QuestionList.py,sha256=vs2AE8OnbwVsly-sorb9dfIibdF1BpOaCRYyvwXYSzY,7209
|
143
139
|
edsl/questions/QuestionMultipleChoice.py,sha256=Yj94-6fwFqDI9UvjwSCOfKnp4gBB86XMmCsL7lbX-t4,10292
|
144
140
|
edsl/questions/QuestionNumerical.py,sha256=_jMZ28DZHYAv_g3Y3vCnmzerMs995on0Ng6j4pDcfHo,4959
|
@@ -155,7 +151,7 @@ edsl/questions/derived/QuestionLinearScale.py,sha256=tj_RszK9WumaKRVMS1Fy63-Q6ip
|
|
155
151
|
edsl/questions/derived/QuestionTopK.py,sha256=HT8NlbT8YBTmVNVPVIP1EyqGsiN3bu4SbFp29CVT0a4,3212
|
156
152
|
edsl/questions/derived/QuestionYesNo.py,sha256=KWJyaXSNPNxELtK0nWvIqNtpAF05MMAC0ILUjxXkVwo,2735
|
157
153
|
edsl/questions/derived/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
158
|
-
edsl/questions/descriptors.py,sha256=
|
154
|
+
edsl/questions/descriptors.py,sha256=t9AFQPHewgqeC1OZ3I3kP-i2ToXRJUAcJsP7CZIrOgY,16447
|
159
155
|
edsl/questions/prompt_templates/question_budget.jinja,sha256=-ekZYCa_KRc-xLcpf3j-YmXV0WSyIK_laOp2x3li-tA,737
|
160
156
|
edsl/questions/prompt_templates/question_checkbox.jinja,sha256=V-Dn2VJhfXyIILWIhMviTfQ5WuXh1YZerwicaA6Okzc,1136
|
161
157
|
edsl/questions/prompt_templates/question_extract.jinja,sha256=27b8iMJaA2h5UOrHPMiBCapMnJou4vSkZzkZndK2s1U,343
|
@@ -205,22 +201,22 @@ edsl/questions/templates/yes_no/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
|
|
205
201
|
edsl/questions/templates/yes_no/answering_instructions.jinja,sha256=UAcssfcYeW8zytmPOVJOVQEdwdvlRspE8WnatYvreJQ,172
|
206
202
|
edsl/questions/templates/yes_no/question_presentation.jinja,sha256=hoEVj4GQD3EYnR2AStXkMFOJeqISNoEVzBd8-cx2yWg,273
|
207
203
|
edsl/results/Dataset.py,sha256=udJvOr9ePfD5xfy5k2zaNNWr4Qg_yp5s_f1YKEcVtKc,9547
|
208
|
-
edsl/results/DatasetExportMixin.py,sha256
|
204
|
+
edsl/results/DatasetExportMixin.py,sha256=-YR-UeuIW_8u0a8HnQ9R6V41DxCq22_AlsD48fXv0sw,25890
|
209
205
|
edsl/results/DatasetTree.py,sha256=nwEgnWBqRXUxagSCEgqwikmIo8ztUxaF-QH-m-8myyQ,4985
|
210
|
-
edsl/results/Result.py,sha256=
|
211
|
-
edsl/results/Results.py,sha256=
|
212
|
-
edsl/results/ResultsDBMixin.py,sha256=
|
206
|
+
edsl/results/Result.py,sha256=ceG945O7O4SZj9bIttEQScMTPVAiq5WKunrthTOL80s,15682
|
207
|
+
edsl/results/Results.py,sha256=UxgvBPDguvTKPMkOM1JsVZMHojzwBMiZ1c9Bp3ybqIE,41396
|
208
|
+
edsl/results/ResultsDBMixin.py,sha256=Hc08aOiArBf9jbxI5uV4VL4wT6BLOkaaEgTMb3zyTUI,7922
|
213
209
|
edsl/results/ResultsExportMixin.py,sha256=XizBsPNxziyffirMA4kS7UHpYM1WIE4s1K-B7TqTfDw,1266
|
214
210
|
edsl/results/ResultsFetchMixin.py,sha256=VEa0TKDcXbnTinSKs9YaE4WjOSLmlp9Po1_9kklFvSo,848
|
215
211
|
edsl/results/ResultsGGMixin.py,sha256=SAYz8p4wb1g8x6KhBVz9NHOGib2c2XsqtTclpADrFeM,4344
|
216
212
|
edsl/results/ResultsToolsMixin.py,sha256=mseEFxJCf9sjXdIxpjITt_UZBwdXxw2o2VLg5jMrALA,3017
|
217
|
-
edsl/results/Selector.py,sha256=
|
213
|
+
edsl/results/Selector.py,sha256=4AsFD71FKTFY1a0_AImsYWcYKx-RXPG6RgwsAvuNW3k,4403
|
218
214
|
edsl/results/__init__.py,sha256=2YcyiVtXi-3vIV0ZzOy1PqBLm2gaziufJVi4fdNrAt8,80
|
219
215
|
edsl/results/tree_explore.py,sha256=hQjiO4E71rIOPDgEHgK8T8ukxqoNdgX_tvyiDlG4_9U,4624
|
220
216
|
edsl/scenarios/FileStore.py,sha256=6XeRxYJmxlAWDiVozlO0hINChgECyPTpMjJskAltFzg,14260
|
221
|
-
edsl/scenarios/Scenario.py,sha256=
|
222
|
-
edsl/scenarios/ScenarioHtmlMixin.py,sha256=
|
223
|
-
edsl/scenarios/ScenarioList.py,sha256=
|
217
|
+
edsl/scenarios/Scenario.py,sha256=k6md3dcz0iZ50hV1biD4XrN-drpUgrfmFn5i8mLOezs,17418
|
218
|
+
edsl/scenarios/ScenarioHtmlMixin.py,sha256=EmugmbPJYW5eZS30rM6pDMDQD9yrrvHjmgZWB1qBfq4,1882
|
219
|
+
edsl/scenarios/ScenarioList.py,sha256=1zbwDICXbvtUGA5bDlhThNp9pfhBGIHIqhK2cX-th50,40942
|
224
220
|
edsl/scenarios/ScenarioListExportMixin.py,sha256=wfffY9xy_1QyIM-1xnisr64izSLjmyuotUYY5iDLodc,1681
|
225
221
|
edsl/scenarios/ScenarioListPdfMixin.py,sha256=z_H2sZn5SCSq6nRLSU5jefaOlh4sqJLyOY_Ld0XCR18,8332
|
226
222
|
edsl/scenarios/__init__.py,sha256=1X03GA_ltVRzNT5KQIuATj3qBcpFCvvGWojr3wggGtk,148
|
@@ -233,9 +229,9 @@ edsl/study/__init__.py,sha256=YAvPLTPG3hK_eN9Ar3d1_d-E3laXpSya879A25-JAxU,170
|
|
233
229
|
edsl/surveys/DAG.py,sha256=dnIbrfJ_lQ3QEKjpyuo1I6b0kcnW2KMMyPir0A6J4XM,4235
|
234
230
|
edsl/surveys/Memory.py,sha256=-ikOtkkQldGB_BkPCW3o7AYwV5B_pIwlREw7aVCSHaQ,1113
|
235
231
|
edsl/surveys/MemoryPlan.py,sha256=VESoPM0C_4LUngkskE51rOca_4vbXC2yjfwrBXtHfHA,9029
|
236
|
-
edsl/surveys/Rule.py,sha256=
|
232
|
+
edsl/surveys/Rule.py,sha256=RlERae5n5jFTnEp597UF50YGXtywECU1nulYdsSlfh0,12223
|
237
233
|
edsl/surveys/RuleCollection.py,sha256=VBx9-OuBBFIJlRYfpbWIjMVFSA5iMwTzdx5yl8giQA8,14871
|
238
|
-
edsl/surveys/Survey.py,sha256=
|
234
|
+
edsl/surveys/Survey.py,sha256=aLdUpsVeIVMoCRoN1j4rUhg0yQOSfSGS5Zc_lLFVpoU,72199
|
239
235
|
edsl/surveys/SurveyCSS.py,sha256=NjJezs2sTlgFprN6IukjGKwNYmNdXnLjzV2w5K4z4RI,8415
|
240
236
|
edsl/surveys/SurveyExportMixin.py,sha256=Kvkd2ku2Kemsn2Nw-Yt8GTnGFcUqfEiKznmisAeO7ck,8339
|
241
237
|
edsl/surveys/SurveyFlowVisualizationMixin.py,sha256=dEG_f-L0ZAyWU5Ta584IX5GZurjVt1tbIISo5z61Jvg,4004
|
@@ -276,8 +272,8 @@ edsl/utilities/gcp_bucket/cloud_storage.py,sha256=dStHsG181YP9ALW-bkyO-sgMWuLV5a
|
|
276
272
|
edsl/utilities/interface.py,sha256=AaKpWiwWBwP2swNXmnFlIf3ZFsjfsR5bjXQAW47tD-8,19656
|
277
273
|
edsl/utilities/repair_functions.py,sha256=tftmklAqam6LOQQu_-9U44N-llycffhW8LfO63vBmNw,929
|
278
274
|
edsl/utilities/restricted_python.py,sha256=5-_zUhrNbos7pLhDl9nr8d24auRlquR6w-vKkmNjPiA,2060
|
279
|
-
edsl/utilities/utilities.py,sha256=
|
280
|
-
edsl-0.1.37.dist-info/LICENSE,sha256=_qszBDs8KHShVYcYzdMz3HNMtH-fKN_p5zjoVAVumFc,1111
|
281
|
-
edsl-0.1.37.dist-info/METADATA,sha256=
|
282
|
-
edsl-0.1.37.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
283
|
-
edsl-0.1.37.dist-info/RECORD,,
|
275
|
+
edsl/utilities/utilities.py,sha256=gqMtWWNEZkWLiRR9vHW-VRNy2bStEPlJ-I2aK9CwFiQ,11367
|
276
|
+
edsl-0.1.37.dev1.dist-info/LICENSE,sha256=_qszBDs8KHShVYcYzdMz3HNMtH-fKN_p5zjoVAVumFc,1111
|
277
|
+
edsl-0.1.37.dev1.dist-info/METADATA,sha256=zxaIfZBgKkMXB93JdcmLDOAz---O_D19ZqfS-NKO6wo,4476
|
278
|
+
edsl-0.1.37.dev1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
279
|
+
edsl-0.1.37.dev1.dist-info/RECORD,,
|
edsl/conversation/chips.py
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
from typing import Optional
|
2
|
-
|
3
|
-
from edsl import Agent, AgentList, QuestionFreeText
|
4
|
-
from edsl import Cache
|
5
|
-
from edsl import QuestionList
|
6
|
-
from edsl import Model
|
7
|
-
|
8
|
-
from edsl.conversation.Conversation import Conversation, ConversationList
|
9
|
-
|
10
|
-
m = Model("gemini-1.5-flash")
|
11
|
-
|
12
|
-
|
13
|
-
class ChipLover(Agent):
|
14
|
-
def __init__(self, name, chip_values, initial_chips, model: Optional[Model] = None):
|
15
|
-
self.chip_values = chip_values
|
16
|
-
self.initial_chips = initial_chips
|
17
|
-
self.current_chips = initial_chips
|
18
|
-
self.model = model or Model()
|
19
|
-
super().__init__(
|
20
|
-
name=name,
|
21
|
-
traits={
|
22
|
-
"motivation": f"""
|
23
|
-
You are {name}. You are negotiating the trading of colored 'chips' with other players. You want to maximize your score.
|
24
|
-
When you want to accept a deal, say "DEAL!"
|
25
|
-
Note that different players can have different values for the chips.
|
26
|
-
""",
|
27
|
-
"chip_values": chip_values,
|
28
|
-
"initial_chips": initial_chips,
|
29
|
-
},
|
30
|
-
)
|
31
|
-
|
32
|
-
def trade(self, chips_given_dict, chips_received_dict):
|
33
|
-
for color, amount in chips_given_dict.items():
|
34
|
-
self.current_chips[color] -= amount
|
35
|
-
for color, amount in chips_received_dict.items():
|
36
|
-
self.current_chips[color] += amount
|
37
|
-
|
38
|
-
def get_score(self):
|
39
|
-
return sum(
|
40
|
-
self.chip_values[color] * self.current_chips[color]
|
41
|
-
for color in self.chip_values
|
42
|
-
)
|
43
|
-
|
44
|
-
|
45
|
-
a1 = ChipLover(
|
46
|
-
name="Alice",
|
47
|
-
chip_values={"Green": 7, "Blue": 1, "Red": 0},
|
48
|
-
model=Model("gemini-1.5-flash"),
|
49
|
-
initial_chips={"Green": 1, "Blue": 2, "Red": 3},
|
50
|
-
)
|
51
|
-
a2 = ChipLover(
|
52
|
-
name="Bob",
|
53
|
-
chip_values={"Green": 7, "Blue": 1, "Red": 0},
|
54
|
-
initial_chips={"Green": 1, "Blue": 2, "Red": 3},
|
55
|
-
)
|
56
|
-
|
57
|
-
c1 = Conversation(agent_list=AgentList([a1, a2]), max_turns=10, verbose=True)
|
58
|
-
c2 = Conversation(agent_list=AgentList([a1, a2]), max_turns=10, verbose=True)
|
59
|
-
|
60
|
-
with Cache() as c:
|
61
|
-
combo = ConversationList([c1, c2], cache=c)
|
62
|
-
combo.run()
|
63
|
-
results = combo.to_results()
|
64
|
-
results.select("conversation_index", "index", "agent_name", "dialogue").print(
|
65
|
-
format="rich"
|
66
|
-
)
|
67
|
-
|
68
|
-
q = QuestionFreeText(
|
69
|
-
question_text="""This was a conversation/negotiation: {{ transcript }}.
|
70
|
-
What trades occurred in the conversation?
|
71
|
-
""",
|
72
|
-
question_name="trades",
|
73
|
-
)
|
74
|
-
|
75
|
-
q_actors = QuestionList(
|
76
|
-
question_text="""Here is a transcript: {{ transcript }}.
|
77
|
-
Who were the actors in the conversation?
|
78
|
-
""",
|
79
|
-
question_name="actors",
|
80
|
-
)
|
81
|
-
|
82
|
-
from edsl import QuestionList
|
83
|
-
|
84
|
-
q_transfers = QuestionList(
|
85
|
-
question_text="""This was a conversation/negotiation: {{ transcript }}.
|
86
|
-
Extract all offers and their outcomes.
|
87
|
-
Use this format: {'proposing_agent':"Alice": 'receiving_agent': "Bob", 'gives':{"Green": 1, "Blue": 2}, 'receives':{"Green": 2, "Blue": 1}, 'accepted':True}
|
88
|
-
""",
|
89
|
-
question_name="transfers",
|
90
|
-
)
|
91
|
-
|
92
|
-
transcript_analysis = (
|
93
|
-
q.add_question(q_actors).add_question(q_transfers).by(combo.summarize()).run()
|
94
|
-
)
|
95
|
-
transcript_analysis.select("trades", "actors", "transfers").print(format="rich")
|
edsl/exceptions/BaseException.py
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
class BaseException(Exception):
|
2
|
-
relevant_doc = "https://docs.expectedparrot.com/"
|
3
|
-
|
4
|
-
def __init__(self, message, *, show_docs=True):
|
5
|
-
# Format main error message
|
6
|
-
formatted_message = [message.strip()]
|
7
|
-
|
8
|
-
# Add documentation links if requested
|
9
|
-
if show_docs:
|
10
|
-
if hasattr(self, "relevant_doc"):
|
11
|
-
formatted_message.append(
|
12
|
-
f"\nFor more information, see:\n{self.relevant_doc}"
|
13
|
-
)
|
14
|
-
if hasattr(self, "relevant_notebook"):
|
15
|
-
formatted_message.append(
|
16
|
-
f"\nFor a usage example, see:\n{self.relevant_notebook}"
|
17
|
-
)
|
18
|
-
|
19
|
-
# Join with double newlines for clear separation
|
20
|
-
final_message = "\n\n".join(formatted_message)
|
21
|
-
super().__init__(final_message)
|
edsl/exceptions/scenarios.py
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
import re
|
2
|
-
import textwrap
|
3
|
-
|
4
|
-
|
5
|
-
class ScenarioError(Exception):
|
6
|
-
documentation = "https://docs.expectedparrot.com/en/latest/scenarios.html#module-edsl.scenarios.Scenario"
|
7
|
-
|
8
|
-
def __init__(self, message: str):
|
9
|
-
self.message = message + "\n" + "Documentation: " + self.documentation
|
10
|
-
super().__init__(self.message)
|
11
|
-
|
12
|
-
def __str__(self):
|
13
|
-
return self.make_urls_clickable(self.message)
|
14
|
-
|
15
|
-
@staticmethod
|
16
|
-
def make_urls_clickable(text):
|
17
|
-
url_pattern = r"https?://[^\s]+"
|
18
|
-
urls = re.findall(url_pattern, text)
|
19
|
-
for url in urls:
|
20
|
-
clickable_url = f"\033]8;;{url}\007{url}\033]8;;\007"
|
21
|
-
text = text.replace(url, clickable_url)
|
22
|
-
return text
|
@@ -1,30 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
from collections import UserDict
|
3
|
-
|
4
|
-
from edsl.enums import service_to_api_keyname
|
5
|
-
from edsl.exceptions import MissingAPIKeyError
|
6
|
-
|
7
|
-
|
8
|
-
class KeyLookup(UserDict):
|
9
|
-
@classmethod
|
10
|
-
def from_os_environ(cls):
|
11
|
-
"""Create an instance of KeyLookupAPI with keys from os.environ"""
|
12
|
-
return cls({key: value for key, value in os.environ.items()})
|
13
|
-
|
14
|
-
def get_api_token(self, service: str, remote: bool = False):
|
15
|
-
key_name = service_to_api_keyname.get(service, "NOT FOUND")
|
16
|
-
|
17
|
-
if service == "bedrock":
|
18
|
-
api_token = [self.get(key_name[0]), self.get(key_name[1])]
|
19
|
-
missing_token = any(token is None for token in api_token)
|
20
|
-
else:
|
21
|
-
api_token = self.get(key_name)
|
22
|
-
missing_token = api_token is None
|
23
|
-
|
24
|
-
if missing_token and service != "test" and not remote:
|
25
|
-
raise MissingAPIKeyError(
|
26
|
-
f"""The key for service: `{service}` is not set.
|
27
|
-
Need a key with name {key_name} in your .env file."""
|
28
|
-
)
|
29
|
-
|
30
|
-
return api_token
|
File without changes
|
File without changes
|