edsl 0.1.44__py3-none-any.whl → 0.1.45__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/InvigilatorBase.py +3 -1
- edsl/agents/PromptConstructor.py +62 -34
- edsl/agents/QuestionInstructionPromptBuilder.py +111 -68
- edsl/agents/QuestionTemplateReplacementsBuilder.py +69 -16
- edsl/agents/question_option_processor.py +15 -6
- edsl/coop/CoopFunctionsMixin.py +3 -4
- edsl/coop/coop.py +23 -9
- edsl/enums.py +3 -3
- edsl/inference_services/AnthropicService.py +11 -9
- edsl/inference_services/AvailableModelFetcher.py +2 -0
- edsl/inference_services/AwsBedrock.py +1 -2
- edsl/inference_services/AzureAI.py +12 -9
- edsl/inference_services/GoogleService.py +9 -4
- edsl/inference_services/InferenceServicesCollection.py +2 -2
- edsl/inference_services/MistralAIService.py +1 -2
- edsl/inference_services/OpenAIService.py +9 -4
- edsl/inference_services/PerplexityService.py +2 -1
- edsl/inference_services/{GrokService.py → XAIService.py} +2 -2
- edsl/inference_services/registry.py +2 -2
- edsl/jobs/Jobs.py +9 -0
- edsl/jobs/JobsChecks.py +10 -13
- edsl/jobs/async_interview_runner.py +3 -1
- edsl/jobs/check_survey_scenario_compatibility.py +5 -5
- edsl/jobs/interviews/InterviewExceptionEntry.py +12 -0
- edsl/jobs/tasks/TaskHistory.py +1 -1
- edsl/language_models/LanguageModel.py +0 -3
- edsl/language_models/PriceManager.py +45 -5
- edsl/language_models/model.py +47 -26
- edsl/questions/QuestionBase.py +21 -0
- edsl/questions/QuestionBasePromptsMixin.py +103 -0
- edsl/questions/QuestionFreeText.py +22 -5
- edsl/questions/descriptors.py +4 -0
- edsl/questions/question_base_gen_mixin.py +94 -29
- edsl/results/Dataset.py +65 -0
- edsl/results/DatasetExportMixin.py +299 -32
- edsl/results/Result.py +27 -0
- edsl/results/Results.py +22 -2
- edsl/results/ResultsGGMixin.py +7 -3
- edsl/scenarios/DocumentChunker.py +2 -0
- edsl/scenarios/FileStore.py +10 -0
- edsl/scenarios/PdfExtractor.py +21 -1
- edsl/scenarios/Scenario.py +25 -9
- edsl/scenarios/ScenarioList.py +73 -3
- edsl/scenarios/handlers/__init__.py +1 -0
- edsl/scenarios/handlers/docx.py +5 -1
- edsl/scenarios/handlers/jpeg.py +39 -0
- edsl/surveys/Survey.py +5 -4
- edsl/surveys/SurveyFlowVisualization.py +91 -43
- edsl/templates/error_reporting/exceptions_table.html +7 -8
- edsl/templates/error_reporting/interview_details.html +1 -1
- edsl/templates/error_reporting/interviews.html +0 -1
- edsl/templates/error_reporting/overview.html +2 -7
- edsl/templates/error_reporting/performance_plot.html +1 -1
- edsl/templates/error_reporting/report.css +1 -1
- edsl/utilities/PrettyList.py +14 -0
- edsl-0.1.45.dist-info/METADATA +246 -0
- {edsl-0.1.44.dist-info → edsl-0.1.45.dist-info}/RECORD +60 -59
- edsl-0.1.44.dist-info/METADATA +0 -110
- {edsl-0.1.44.dist-info → edsl-0.1.45.dist-info}/LICENSE +0 -0
- {edsl-0.1.44.dist-info → edsl-0.1.45.dist-info}/WHEEL +0 -0
edsl-0.1.44.dist-info/METADATA
DELETED
@@ -1,110 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: edsl
|
3
|
-
Version: 0.1.44
|
4
|
-
Summary: Create and analyze LLM-based surveys
|
5
|
-
Home-page: https://www.expectedparrot.com/
|
6
|
-
License: MIT
|
7
|
-
Keywords: LLM,social science,surveys,user research
|
8
|
-
Author: Apostolos Filippas
|
9
|
-
Author-email: apostolos@expectedparrot.com
|
10
|
-
Requires-Python: >=3.9.1,<3.13
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
14
|
-
Classifier: Programming Language :: Python :: 3.11
|
15
|
-
Classifier: Programming Language :: Python :: 3.12
|
16
|
-
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
17
|
-
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
18
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
19
|
-
Requires-Dist: aiohttp (>=3.9.1,<4.0.0)
|
20
|
-
Requires-Dist: anthropic (>=0.45.0,<0.46.0)
|
21
|
-
Requires-Dist: azure-ai-inference (>=1.0.0b3,<2.0.0)
|
22
|
-
Requires-Dist: black[jupyter] (>=24.4.2,<25.0.0)
|
23
|
-
Requires-Dist: boto3 (>=1.34.161,<2.0.0)
|
24
|
-
Requires-Dist: google-generativeai (>=0.8.2,<0.9.0)
|
25
|
-
Requires-Dist: groq (>=0.9.0,<0.10.0)
|
26
|
-
Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
|
27
|
-
Requires-Dist: json-repair (>=0.28.4,<0.29.0)
|
28
|
-
Requires-Dist: jupyter (>=1.0.0,<2.0.0)
|
29
|
-
Requires-Dist: markdown2 (>=2.4.11,<3.0.0)
|
30
|
-
Requires-Dist: matplotlib (>=3.8,<3.9)
|
31
|
-
Requires-Dist: mistralai (>=1.0.2,<2.0.0)
|
32
|
-
Requires-Dist: nest-asyncio (>=1.5.9,<2.0.0)
|
33
|
-
Requires-Dist: numpy (>=1.22,<2.0)
|
34
|
-
Requires-Dist: openai (>=1.4.0,<2.0.0)
|
35
|
-
Requires-Dist: openpyxl (>=3.1.5,<4.0.0)
|
36
|
-
Requires-Dist: pandas (>=2.1.4,<3.0.0)
|
37
|
-
Requires-Dist: platformdirs (>=4.3.6,<5.0.0)
|
38
|
-
Requires-Dist: pydot (>=2.0.0,<3.0.0)
|
39
|
-
Requires-Dist: pygments (>=2.17.2,<3.0.0)
|
40
|
-
Requires-Dist: pypdf2 (>=3.0.1,<4.0.0)
|
41
|
-
Requires-Dist: pyreadstat (>=1.2.7,<2.0.0)
|
42
|
-
Requires-Dist: python-docx (>=1.1.0,<2.0.0)
|
43
|
-
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
|
44
|
-
Requires-Dist: python-pptx (>=1.0.2,<2.0.0)
|
45
|
-
Requires-Dist: restrictedpython (>=7.1,<8.0)
|
46
|
-
Requires-Dist: rich (>=13.7.0,<14.0.0)
|
47
|
-
Requires-Dist: setuptools (<72.0)
|
48
|
-
Requires-Dist: simpleeval (>=0.9.13,<0.10.0)
|
49
|
-
Requires-Dist: sqlalchemy (>=2.0.23,<3.0.0)
|
50
|
-
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
51
|
-
Requires-Dist: tenacity (>=8.2.3,<9.0.0)
|
52
|
-
Requires-Dist: urllib3 (>=1.25.4,<1.27)
|
53
|
-
Project-URL: Documentation, https://docs.expectedparrot.com
|
54
|
-
Description-Content-Type: text/markdown
|
55
|
-
|
56
|
-
# Expected Parrot Domain-Specific Language
|
57
|
-
<p align="center">
|
58
|
-
<img src="https://github.com/expectedparrot/edsl/blob/main/static/logo.png?raw=true" alt="edsl.png" width="100"/>
|
59
|
-
</p>
|
60
|
-
|
61
|
-
The Expected Parrot Domain-Specific Language (EDSL) package lets you conduct computational social science and market research with AI. Use it to design surveys and experiments, simulate responses with large language models, and perform data labeling and other research tasks. Results are formatted as specified datasets and come with built-in methods for analyzing, visualizing, and sharing.
|
62
|
-
|
63
|
-
## 🔗 Links
|
64
|
-
- [PyPI](https://pypi.org/project/edsl/)
|
65
|
-
- [Documentation](https://docs.expectedparrot.com)
|
66
|
-
- [Getting started](https://docs.expectedparrot.com/en/latest/starter_tutorial.html)
|
67
|
-
- [Discord](https://discord.com/invite/mxAYkjfy9m)
|
68
|
-
- [Twitter](https://x.com/ExpectedParrot)
|
69
|
-
- [LinkedIn](https://www.linkedin.com/company/expectedparrot/)
|
70
|
-
- [Blog](https://blog.expectedparrot.com)
|
71
|
-
|
72
|
-
## 🌎 Hello, World!
|
73
|
-
A quick example:
|
74
|
-
|
75
|
-
```python
|
76
|
-
# Import a question type
|
77
|
-
from edsl import QuestionMultipleChoice
|
78
|
-
|
79
|
-
# Construct a question using the question type template
|
80
|
-
q = QuestionMultipleChoice(
|
81
|
-
question_name="example_question",
|
82
|
-
question_text="How do you feel today?",
|
83
|
-
question_options=["Bad", "OK", "Good"]
|
84
|
-
)
|
85
|
-
|
86
|
-
# Run it with the default language model
|
87
|
-
results = q.run()
|
88
|
-
|
89
|
-
# Inspect the results
|
90
|
-
results.select("example_question")
|
91
|
-
```
|
92
|
-
|
93
|
-
Output:
|
94
|
-
```python
|
95
|
-
┏━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
96
|
-
┃ answer.example_question ┃
|
97
|
-
┡━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
98
|
-
│ Good │
|
99
|
-
└─────────────────────────┘
|
100
|
-
```
|
101
|
-
|
102
|
-
## 💻 Requirements
|
103
|
-
* EDSL is compatible with Python 3.9 - 3.12.
|
104
|
-
* API keys for large language models that you want to use, stored in a `.env` file.
|
105
|
-
See instructions on [storing API keys](https://docs.expectedparrot.com/en/latest/api_keys.html) and [activating remote inference](https://docs.expectedparrot.com/en/latest/remote_inference.html).
|
106
|
-
|
107
|
-
## 💡 Contributions, feature requests & bugs
|
108
|
-
Interested in contributing? Want us to add a new feature? Found a bug for us to squash?
|
109
|
-
Please send us an email at [info@expectedparrot.com](mailto:info@expectedparrot.com) or message us at our [Discord channel](https://discord.com/invite/mxAYkjfy9m).
|
110
|
-
|
File without changes
|
File without changes
|