edsl 0.1.43__tar.gz → 0.1.44__tar.gz
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-0.1.43 → edsl-0.1.44}/PKG-INFO +1 -1
- {edsl-0.1.43 → edsl-0.1.44}/edsl/Base.py +15 -6
- edsl-0.1.44/edsl/__version__.py +1 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/coop/coop.py +35 -3
- {edsl-0.1.43 → edsl-0.1.44}/edsl/enums.py +4 -1
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/AnthropicService.py +2 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/GoogleService.py +2 -0
- edsl-0.1.44/edsl/inference_services/GrokService.py +11 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/InferenceServiceABC.py +1 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/OpenAIService.py +1 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/TestService.py +1 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/registry.py +2 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/JobsChecks.py +7 -7
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/JobsPrompts.py +3 -3
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/LanguageModel.py +5 -2
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/model.py +43 -11
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/Results.py +2 -1
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/FileStore.py +19 -8
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/Survey.py +27 -6
- {edsl-0.1.43 → edsl-0.1.44}/pyproject.toml +1 -1
- edsl-0.1.43/edsl/__version__.py +0 -1
- {edsl-0.1.43 → edsl-0.1.44}/LICENSE +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/README.md +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/BaseDiff.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/TemplateLoader.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/agents/Agent.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/agents/AgentList.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/agents/Invigilator.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/agents/InvigilatorBase.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/agents/PromptConstructor.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/agents/QuestionInstructionPromptBuilder.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/agents/QuestionTemplateReplacementsBuilder.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/agents/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/agents/descriptors.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/agents/prompt_helpers.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/agents/question_option_processor.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/auto/AutoStudy.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/auto/StageBase.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/auto/StageGenerateSurvey.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/auto/StageLabelQuestions.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/auto/StagePersona.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/auto/StagePersonaDimensionValueRanges.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/auto/StagePersonaDimensionValues.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/auto/StagePersonaDimensions.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/auto/StageQuestions.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/auto/SurveyCreatorPipeline.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/auto/utilities.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/base/Base.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/config.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/conversation/Conversation.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/conversation/car_buying.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/conversation/chips.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/conversation/mug_negotiation.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/conversation/next_speaker_utilities.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/coop/CoopFunctionsMixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/coop/ExpectedParrotKeyHandler.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/coop/PriceFetcher.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/coop/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/coop/utils.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/data/Cache.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/data/CacheEntry.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/data/CacheHandler.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/data/RemoteCacheSync.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/data/SQLiteDict.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/data/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/data/orm.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/data_transfer_models.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/BaseException.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/agents.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/cache.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/configuration.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/coop.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/data.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/general.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/inference_services.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/jobs.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/language_models.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/prompts.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/questions.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/results.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/scenarios.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/exceptions/surveys.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/AvailableModelCacheHandler.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/AvailableModelFetcher.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/AwsBedrock.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/AzureAI.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/DeepInfraService.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/DeepSeekService.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/GroqService.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/InferenceServicesCollection.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/MistralAIService.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/OllamaService.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/PerplexityService.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/ServiceAvailability.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/TogetherAIService.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/data_structures.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/models_available_cache.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/rate_limits_cache.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/inference_services/write_available.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/AnswerQuestionFunctionConstructor.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/Answers.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/FetchInvigilator.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/InterviewTaskManager.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/InterviewsConstructor.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/Jobs.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/JobsComponentConstructor.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/JobsRemoteInferenceHandler.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/JobsRemoteInferenceLogger.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/RequestTokenEstimator.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/async_interview_runner.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/buckets/BucketCollection.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/buckets/ModelBuckets.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/buckets/TokenBucket.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/buckets/TokenBucketAPI.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/buckets/TokenBucketClient.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/check_survey_scenario_compatibility.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/data_structures.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/decorators.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/interviews/Interview.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/interviews/InterviewExceptionCollection.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/interviews/InterviewExceptionEntry.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/interviews/InterviewStatistic.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/interviews/InterviewStatisticsCollection.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/interviews/InterviewStatusDictionary.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/interviews/InterviewStatusLog.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/interviews/ReportErrors.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/interviews/interview_status_enum.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/jobs_status_enums.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/loggers/HTMLTableJobLogger.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/results_exceptions_handler.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/runners/JobsRunnerAsyncio.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/runners/JobsRunnerStatus.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/runners/JobsRunnerStatusData.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/tasks/QuestionTaskCreator.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/tasks/TaskCreators.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/tasks/TaskHistory.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/tasks/TaskStatusLog.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/tasks/task_status_enum.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/tokens/InterviewTokenUsage.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/jobs/tokens/TokenUsage.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/ComputeCost.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/ModelList.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/PriceManager.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/RawResponseHandler.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/RegisterLanguageModelsMeta.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/ServiceDataSources.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/fake_openai_call.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/fake_openai_service.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/key_management/KeyLookup.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/key_management/KeyLookupBuilder.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/key_management/KeyLookupCollection.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/key_management/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/key_management/models.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/repair.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/language_models/utilities.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/notebooks/Notebook.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/notebooks/NotebookToLaTeX.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/notebooks/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/prompts/Prompt.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/prompts/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/ExceptionExplainer.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/HTMLQuestion.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/QuestionBase.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/QuestionBasePromptsMixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/QuestionBudget.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/QuestionCheckBox.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/QuestionDict.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/QuestionExtract.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/QuestionFreeText.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/QuestionFunctional.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/QuestionList.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/QuestionMatrix.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/QuestionMultipleChoice.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/QuestionNumerical.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/QuestionRank.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/Quick.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/SimpleAskMixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/answer_validator_mixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/compose_questions.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/data_structures.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/decorators.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/derived/QuestionLikertFive.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/derived/QuestionLinearScale.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/derived/QuestionTopK.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/derived/QuestionYesNo.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/derived/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/descriptors.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/loop_processor.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/prompt_templates/question_budget.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/prompt_templates/question_checkbox.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/prompt_templates/question_extract.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/prompt_templates/question_free_text.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/prompt_templates/question_linear_scale.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/prompt_templates/question_list.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/prompt_templates/question_multiple_choice.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/prompt_templates/question_numerical.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/question_base_gen_mixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/question_registry.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/register_questions_meta.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/response_validator_abc.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/response_validator_factory.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/settings.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/budget/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/budget/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/budget/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/checkbox/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/checkbox/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/checkbox/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/dict/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/dict/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/dict/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/extract/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/extract/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/extract/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/free_text/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/free_text/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/free_text/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/likert_five/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/likert_five/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/likert_five/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/linear_scale/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/linear_scale/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/linear_scale/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/list/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/list/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/list/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/matrix/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/matrix/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/matrix/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/multiple_choice/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/multiple_choice/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/multiple_choice/html.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/multiple_choice/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/numerical/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/numerical/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/numerical/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/rank/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/rank/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/rank/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/top_k/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/top_k/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/top_k/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/yes_no/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/yes_no/answering_instructions.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/questions/templates/yes_no/question_presentation.jinja +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/CSSParameterizer.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/Dataset.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/DatasetExportMixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/DatasetTree.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/MarkdownToDocx.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/MarkdownToPDF.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/Result.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/ResultsExportMixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/ResultsGGMixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/TableDisplay.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/TextEditor.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/file_exports.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/results_fetch_mixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/results_selector.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/results_tools_mixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/smart_objects.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/table_data_class.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/table_display.css +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/table_renderers.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/results/tree_explore.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/ConstructDownloadLink.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/DocumentChunker.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/DocxScenario.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/PdfExtractor.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/Scenario.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/ScenarioHtmlMixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/ScenarioList.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/ScenarioListExportMixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/ScenarioListPdfMixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/directory_scanner.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/file_methods.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/csv.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/docx.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/html.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/json.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/latex.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/md.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/pdf.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/png.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/pptx.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/py.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/sql.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/sqlite.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/handlers/txt.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/scenario_join.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/scenarios/scenario_selector.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/shared.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/study/ObjectEntry.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/study/ProofOfWork.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/study/SnapShot.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/study/Study.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/study/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/ConstructDAG.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/DAG.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/EditSurvey.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/InstructionHandler.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/Memory.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/MemoryManagement.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/MemoryPlan.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/Rule.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/RuleCollection.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/RuleManager.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/Simulator.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/SurveyCSS.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/SurveyExportMixin.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/SurveyFlowVisualization.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/SurveyQualtricsImport.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/SurveyToApp.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/base.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/descriptors.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/instructions/ChangeInstruction.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/instructions/Instruction.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/instructions/InstructionCollection.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/surveys/instructions/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/templates/error_reporting/base.html +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/templates/error_reporting/exceptions_by_model.html +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/templates/error_reporting/exceptions_by_question_name.html +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/templates/error_reporting/exceptions_by_type.html +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/templates/error_reporting/exceptions_table.html +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/templates/error_reporting/interview_details.html +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/templates/error_reporting/interviews.html +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/templates/error_reporting/overview.html +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/templates/error_reporting/performance_plot.html +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/templates/error_reporting/report.css +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/templates/error_reporting/report.html +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/templates/error_reporting/report.js +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/tools/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/tools/clusters.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/tools/embeddings.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/tools/embeddings_plotting.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/tools/plotting.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/tools/summarize.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/PrettyList.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/SystemInfo.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/ast_utilities.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/data/Registry.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/data/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/data/scooter_results.json +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/decorators.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/gcp_bucket/__init__.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/gcp_bucket/cloud_storage.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/interface.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/is_notebook.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/is_valid_variable_name.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/naming_utilities.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/remove_edsl_version.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/repair_functions.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/restricted_python.py +0 -0
- {edsl-0.1.43 → edsl-0.1.44}/edsl/utilities/utilities.py +0 -0
@@ -64,17 +64,26 @@ class PersistenceMixin:
|
|
64
64
|
@classmethod
|
65
65
|
def pull(
|
66
66
|
cls,
|
67
|
-
|
68
|
-
|
69
|
-
expected_parrot_url: Optional[str] = None,
|
67
|
+
url_or_uuid: Optional[Union[str, UUID]] = None,
|
68
|
+
#expected_parrot_url: Optional[str] = None,
|
70
69
|
):
|
71
|
-
"""Pull the object from coop.
|
70
|
+
"""Pull the object from coop.
|
71
|
+
|
72
|
+
Args:
|
73
|
+
url_or_uuid: Either a UUID string or a URL pointing to the object
|
74
|
+
expected_parrot_url: Optional URL for the Parrot server
|
75
|
+
"""
|
72
76
|
from edsl.coop import Coop
|
73
77
|
from edsl.coop.utils import ObjectRegistry
|
74
78
|
|
75
79
|
object_type = ObjectRegistry.get_object_type_by_edsl_class(cls)
|
76
|
-
coop = Coop(
|
77
|
-
|
80
|
+
coop = Coop()
|
81
|
+
|
82
|
+
# Determine if input is URL or UUID
|
83
|
+
if url_or_uuid and ("http://" in str(url_or_uuid) or "https://" in str(url_or_uuid)):
|
84
|
+
return coop.get(url=url_or_uuid, expected_object_type=object_type)
|
85
|
+
else:
|
86
|
+
return coop.get(uuid=url_or_uuid, expected_object_type=object_type)
|
78
87
|
|
79
88
|
@classmethod
|
80
89
|
def delete(cls, uuid: Optional[Union[str, UUID]] = None, url: Optional[str] = None):
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.1.44"
|
@@ -4,10 +4,8 @@ import requests
|
|
4
4
|
|
5
5
|
from typing import Any, Optional, Union, Literal, TypedDict
|
6
6
|
from uuid import UUID
|
7
|
-
from collections import UserDict, defaultdict
|
8
7
|
|
9
8
|
import edsl
|
10
|
-
from pathlib import Path
|
11
9
|
|
12
10
|
from edsl.config import CONFIG
|
13
11
|
from edsl.data.CacheEntry import CacheEntry
|
@@ -340,7 +338,7 @@ class Coop(CoopFunctionsMixin):
|
|
340
338
|
|
341
339
|
try:
|
342
340
|
response = self._send_server_request(
|
343
|
-
uri="api/v0/edsl-settings", method="GET", timeout=
|
341
|
+
uri="api/v0/edsl-settings", method="GET", timeout=20
|
344
342
|
)
|
345
343
|
self._resolve_server_response(response, check_api_key=False)
|
346
344
|
return response.json()
|
@@ -866,6 +864,40 @@ class Coop(CoopFunctionsMixin):
|
|
866
864
|
"usd": response_json.get("cost_in_usd"),
|
867
865
|
}
|
868
866
|
|
867
|
+
################
|
868
|
+
# PROJECTS
|
869
|
+
################
|
870
|
+
def create_project(
|
871
|
+
self,
|
872
|
+
survey: Survey,
|
873
|
+
project_name: str,
|
874
|
+
survey_description: Optional[str] = None,
|
875
|
+
survey_alias: Optional[str] = None,
|
876
|
+
survey_visibility: Optional[VisibilityType] = "unlisted",
|
877
|
+
):
|
878
|
+
"""
|
879
|
+
Create a survey object on Coop, then create a project from the survey.
|
880
|
+
"""
|
881
|
+
survey_details = self.create(
|
882
|
+
object=survey,
|
883
|
+
description=survey_description,
|
884
|
+
alias=survey_alias,
|
885
|
+
visibility=survey_visibility,
|
886
|
+
)
|
887
|
+
survey_uuid = survey_details.get("uuid")
|
888
|
+
response = self._send_server_request(
|
889
|
+
uri=f"api/v0/projects/create-from-survey",
|
890
|
+
method="POST",
|
891
|
+
payload={"project_name": project_name, "survey_uuid": str(survey_uuid)},
|
892
|
+
)
|
893
|
+
self._resolve_server_response(response)
|
894
|
+
response_json = response.json()
|
895
|
+
return {
|
896
|
+
"name": response_json.get("project_name"),
|
897
|
+
"uuid": response_json.get("uuid"),
|
898
|
+
"url": f"{self.url}/home/projects/{response_json.get('uuid')}",
|
899
|
+
}
|
900
|
+
|
869
901
|
################
|
870
902
|
# DUNDER METHODS
|
871
903
|
################
|
@@ -67,6 +67,7 @@ class InferenceServiceType(EnumWithChecks):
|
|
67
67
|
TOGETHER = "together"
|
68
68
|
PERPLEXITY = "perplexity"
|
69
69
|
DEEPSEEK = "deepseek"
|
70
|
+
GROK = "grok"
|
70
71
|
|
71
72
|
|
72
73
|
# unavoidable violation of the DRY principle but it is necessary
|
@@ -86,6 +87,7 @@ InferenceServiceLiteral = Literal[
|
|
86
87
|
"together",
|
87
88
|
"perplexity",
|
88
89
|
"deepseek",
|
90
|
+
"grok",
|
89
91
|
]
|
90
92
|
|
91
93
|
available_models_urls = {
|
@@ -108,7 +110,8 @@ service_to_api_keyname = {
|
|
108
110
|
InferenceServiceType.MISTRAL.value: "MISTRAL_API_KEY",
|
109
111
|
InferenceServiceType.TOGETHER.value: "TOGETHER_API_KEY",
|
110
112
|
InferenceServiceType.PERPLEXITY.value: "PERPLEXITY_API_KEY",
|
111
|
-
InferenceServiceType.DEEPSEEK.value: "DEEPSEEK_API_KEY"
|
113
|
+
InferenceServiceType.DEEPSEEK.value: "DEEPSEEK_API_KEY",
|
114
|
+
InferenceServiceType.GROK.value: "XAI_API_KEY",
|
112
115
|
}
|
113
116
|
|
114
117
|
|
@@ -17,6 +17,8 @@ class AnthropicService(InferenceServiceABC):
|
|
17
17
|
output_token_name = "output_tokens"
|
18
18
|
model_exclude_list = []
|
19
19
|
|
20
|
+
available_models_url = 'https://docs.anthropic.com/en/docs/about-claude/models'
|
21
|
+
|
20
22
|
@classmethod
|
21
23
|
def get_model_list(cls, api_key: str = None):
|
22
24
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
from typing import Any, List
|
2
|
+
from edsl.inference_services.OpenAIService import OpenAIService
|
3
|
+
|
4
|
+
|
5
|
+
class GrokService(OpenAIService):
|
6
|
+
"""Openai service class."""
|
7
|
+
|
8
|
+
_inference_service_ = "grok"
|
9
|
+
_env_key_name_ = "XAI_API_KEY"
|
10
|
+
_base_url_ = "https://api.x.ai/v1"
|
11
|
+
_models_list_cache: List[str] = []
|
@@ -14,6 +14,7 @@ from edsl.inference_services.TestService import TestService
|
|
14
14
|
from edsl.inference_services.TogetherAIService import TogetherAIService
|
15
15
|
from edsl.inference_services.PerplexityService import PerplexityService
|
16
16
|
from edsl.inference_services.DeepSeekService import DeepSeekService
|
17
|
+
from edsl.inference_services.GrokService import GrokService
|
17
18
|
|
18
19
|
try:
|
19
20
|
from edsl.inference_services.MistralAIService import MistralAIService
|
@@ -35,6 +36,7 @@ services = [
|
|
35
36
|
TogetherAIService,
|
36
37
|
PerplexityService,
|
37
38
|
DeepSeekService,
|
39
|
+
GrokService,
|
38
40
|
]
|
39
41
|
|
40
42
|
if mistral_available:
|
@@ -31,7 +31,7 @@ class JobsChecks:
|
|
31
31
|
from edsl.language_models.model import Model
|
32
32
|
from edsl.enums import service_to_api_keyname
|
33
33
|
|
34
|
-
for model in self.jobs.models + [Model()]:
|
34
|
+
for model in self.jobs.models: # + [Model()]:
|
35
35
|
if not model.has_valid_api_key():
|
36
36
|
key_name = service_to_api_keyname.get(
|
37
37
|
model._inference_service_, "NOT FOUND"
|
@@ -134,22 +134,22 @@ class JobsChecks:
|
|
134
134
|
|
135
135
|
edsl_auth_token = secrets.token_urlsafe(16)
|
136
136
|
|
137
|
-
print("
|
137
|
+
print("API keys are required to run surveys with language models. The following keys are needed to run this survey: ")
|
138
138
|
for api_key in missing_api_keys:
|
139
139
|
print(f" 🔑 {api_key}")
|
140
140
|
print(
|
141
|
-
"\nYou can
|
141
|
+
"\nYou can provide your own keys or use an Expected Parrot key to access all available models."
|
142
142
|
)
|
143
|
-
print("
|
143
|
+
print("Please see the documentation page to learn about options for managing keys: https://docs.expectedparrot.com/en/latest/api_keys.html")
|
144
144
|
|
145
145
|
coop = Coop()
|
146
146
|
coop._display_login_url(
|
147
147
|
edsl_auth_token=edsl_auth_token,
|
148
|
-
link_description="\n
|
148
|
+
link_description="\n➡️ Click the link below to create an account and get an Expected Parrot key:\n",
|
149
149
|
)
|
150
150
|
|
151
151
|
print(
|
152
|
-
"\nOnce you log in,
|
152
|
+
"\nOnce you log in, your key will be stored on your computer and your survey will start running at the Expected Parrot server."
|
153
153
|
)
|
154
154
|
|
155
155
|
api_key = coop._poll_for_api_key(edsl_auth_token)
|
@@ -159,7 +159,7 @@ class JobsChecks:
|
|
159
159
|
return
|
160
160
|
|
161
161
|
path_to_env = write_api_key_to_env(api_key)
|
162
|
-
print("\n✨
|
162
|
+
print("\n✨ Your key has been stored at the following path: ")
|
163
163
|
print(f" {path_to_env}")
|
164
164
|
|
165
165
|
# Retrieve API key so we can continue running the job
|
@@ -200,10 +200,10 @@ class JobsPrompts:
|
|
200
200
|
import warnings
|
201
201
|
|
202
202
|
warnings.warn(
|
203
|
-
"Price data could not be retrieved. Using default estimates for input and output token prices. Input: $
|
203
|
+
"Price data could not be retrieved. Using default estimates for input and output token prices. Input: $1.00 / 1M tokens; Output: $1.00 / 1M tokens"
|
204
204
|
)
|
205
|
-
input_price_per_token = 0.
|
206
|
-
output_price_per_token = 0.
|
205
|
+
input_price_per_token = 0.000001 # $1.00 / 1M tokens
|
206
|
+
output_price_per_token = 0.000001 # $1.00 / 1M tokens
|
207
207
|
|
208
208
|
# Compute the number of characters (double if the question involves piping)
|
209
209
|
user_prompt_chars = len(str(user_prompt)) * get_piping_multiplier(
|
@@ -518,7 +518,11 @@ class LanguageModel(
|
|
518
518
|
"""
|
519
519
|
from edsl.language_models.model import get_model_class
|
520
520
|
|
521
|
-
|
521
|
+
# breakpoint()
|
522
|
+
|
523
|
+
model_class = get_model_class(
|
524
|
+
data["model"], service_name=data.get("inference_service", None)
|
525
|
+
)
|
522
526
|
return model_class(**data)
|
523
527
|
|
524
528
|
def __repr__(self) -> str:
|
@@ -574,7 +578,6 @@ class LanguageModel(
|
|
574
578
|
return Model(skip_api_key_check=True)
|
575
579
|
|
576
580
|
def from_cache(self, cache: "Cache") -> LanguageModel:
|
577
|
-
|
578
581
|
from copy import deepcopy
|
579
582
|
from types import MethodType
|
580
583
|
from edsl import Cache
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import textwrap
|
2
2
|
from random import random
|
3
|
-
from typing import Optional, TYPE_CHECKING, List
|
3
|
+
from typing import Optional, TYPE_CHECKING, List, Callable
|
4
4
|
|
5
5
|
from edsl.utilities.PrettyList import PrettyList
|
6
6
|
from edsl.config import CONFIG
|
@@ -11,17 +11,21 @@ from edsl.inference_services.InferenceServicesCollection import (
|
|
11
11
|
from edsl.inference_services.data_structures import AvailableModels
|
12
12
|
from edsl.inference_services.InferenceServiceABC import InferenceServiceABC
|
13
13
|
from edsl.enums import InferenceServiceLiteral
|
14
|
+
from edsl.exceptions.inference_services import InferenceServiceError
|
14
15
|
|
15
16
|
if TYPE_CHECKING:
|
16
17
|
from edsl.results.Dataset import Dataset
|
17
18
|
|
18
19
|
|
19
|
-
def get_model_class(model_name, registry: Optional[InferenceServicesCollection] = None):
|
20
|
+
def get_model_class(model_name, registry: Optional[InferenceServicesCollection] = None, service_name: Optional[InferenceServiceLiteral] = None):
|
20
21
|
from edsl.inference_services.registry import default
|
21
22
|
|
22
23
|
registry = registry or default
|
23
|
-
|
24
|
-
|
24
|
+
try:
|
25
|
+
factory = registry.create_model_factory(model_name, service_name=service_name)
|
26
|
+
return factory
|
27
|
+
except (InferenceServiceError, Exception) as e:
|
28
|
+
return Model._handle_model_error(model_name, e)
|
25
29
|
|
26
30
|
|
27
31
|
class Meta(type):
|
@@ -58,6 +62,33 @@ class Model(metaclass=Meta):
|
|
58
62
|
"""Set a new registry"""
|
59
63
|
cls._registry = registry
|
60
64
|
|
65
|
+
@classmethod
|
66
|
+
def _handle_model_error(cls, model_name: str, error: Exception):
|
67
|
+
"""Handle errors from model creation and execution with notebook-aware behavior."""
|
68
|
+
if isinstance(error, InferenceServiceError):
|
69
|
+
services = [s._inference_service_ for s in cls.get_registry().services]
|
70
|
+
message = (
|
71
|
+
f"Model '{model_name}' not found in any services.\n"
|
72
|
+
"It is likely that our registry is just out of date.\n"
|
73
|
+
"Simply adding the service name to your model call should fix this.\n"
|
74
|
+
f"Available services are: {services}\n"
|
75
|
+
f"To specify a model with a service, use:\n"
|
76
|
+
f'Model("{model_name}", service_name="<service_name>")'
|
77
|
+
)
|
78
|
+
else:
|
79
|
+
message = f"An error occurred: {str(error)}"
|
80
|
+
|
81
|
+
# Check if we're in a notebook environment
|
82
|
+
try:
|
83
|
+
get_ipython()
|
84
|
+
print(message)
|
85
|
+
return None
|
86
|
+
except NameError:
|
87
|
+
# Not in a notebook, raise the exception
|
88
|
+
if isinstance(error, InferenceServiceError):
|
89
|
+
raise InferenceServiceError(message)
|
90
|
+
raise error
|
91
|
+
|
61
92
|
def __new__(
|
62
93
|
cls,
|
63
94
|
model_name: Optional[str] = None,
|
@@ -69,9 +100,7 @@ class Model(metaclass=Meta):
|
|
69
100
|
"Instantiate a new language model."
|
70
101
|
# Map index to the respective subclass
|
71
102
|
if model_name is None:
|
72
|
-
model_name =
|
73
|
-
cls.default_model
|
74
|
-
) # when model_name is None, use the default model, set in the config file
|
103
|
+
model_name = cls.default_model
|
75
104
|
|
76
105
|
if registry is not None:
|
77
106
|
cls.set_registry(registry)
|
@@ -79,10 +108,13 @@ class Model(metaclass=Meta):
|
|
79
108
|
if isinstance(model_name, int): # can refer to a model by index
|
80
109
|
model_name = cls.available(name_only=True)[model_name]
|
81
110
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
111
|
+
try:
|
112
|
+
factory = cls.get_registry().create_model_factory(
|
113
|
+
model_name, service_name=service_name
|
114
|
+
)
|
115
|
+
return factory(*args, **kwargs)
|
116
|
+
except (InferenceServiceError, Exception) as e:
|
117
|
+
return cls._handle_model_error(model_name, e)
|
86
118
|
|
87
119
|
@classmethod
|
88
120
|
def add_model(cls, service_name, model_name) -> None:
|
@@ -1326,7 +1326,7 @@ class Results(UserList, Mixins, Base):
|
|
1326
1326
|
except Exception as e:
|
1327
1327
|
raise ResultsError(f"Failed to fetch remote results: {str(e)}")
|
1328
1328
|
|
1329
|
-
def fetch(self, polling_interval: float = 1.0) -> Results:
|
1329
|
+
def fetch(self, polling_interval: [float, int] = 1.0) -> Results:
|
1330
1330
|
"""
|
1331
1331
|
Polls the server for job completion and updates this Results instance with the completed data.
|
1332
1332
|
|
@@ -1346,6 +1346,7 @@ class Results(UserList, Mixins, Base):
|
|
1346
1346
|
remote_job_data = JobsRemoteInferenceHandler.check_status(self.job_info.job_uuid)
|
1347
1347
|
|
1348
1348
|
while remote_job_data.get("status") not in ["completed", "failed"]:
|
1349
|
+
print("Waiting for remote job to complete...")
|
1349
1350
|
import time
|
1350
1351
|
time.sleep(polling_interval)
|
1351
1352
|
remote_job_data = JobsRemoteInferenceHandler.check_status(self.job_info.job_uuid)
|
@@ -9,7 +9,8 @@ from edsl.scenarios.Scenario import Scenario
|
|
9
9
|
from edsl.utilities.remove_edsl_version import remove_edsl_version
|
10
10
|
|
11
11
|
from edsl.scenarios.file_methods import FileMethods
|
12
|
-
|
12
|
+
from typing import Union
|
13
|
+
from uuid import UUID
|
13
14
|
|
14
15
|
class FileStore(Scenario):
|
15
16
|
__documentation__ = "https://docs.expectedparrot.com/en/latest/filestore.html"
|
@@ -262,7 +263,12 @@ class FileStore(Scenario):
|
|
262
263
|
# raise TypeError("No text method found for this file type.")
|
263
264
|
|
264
265
|
def push(
|
265
|
-
self,
|
266
|
+
self,
|
267
|
+
description: Optional[str] = None,
|
268
|
+
alias: Optional[str] = None,
|
269
|
+
visibility: Optional[str] = "unlisted",
|
270
|
+
expected_parrot_url: Optional[str] = None,
|
271
|
+
|
266
272
|
) -> dict:
|
267
273
|
"""
|
268
274
|
Push the object to Coop.
|
@@ -272,17 +278,22 @@ class FileStore(Scenario):
|
|
272
278
|
scenario_version = Scenario.from_dict(self.to_dict())
|
273
279
|
if description is None:
|
274
280
|
description = "File: " + self.path
|
275
|
-
info = scenario_version.push(description=description, visibility=visibility)
|
281
|
+
info = scenario_version.push(description=description, visibility=visibility, expected_parrot_url=expected_parrot_url, alias=alias)
|
276
282
|
return info
|
277
283
|
|
278
284
|
@classmethod
|
279
|
-
def pull(cls,
|
285
|
+
def pull(cls, url_or_uuid: Union[str, UUID]) -> "FileStore":
|
280
286
|
"""
|
281
|
-
|
282
|
-
|
283
|
-
:
|
287
|
+
Pull a FileStore object from Coop.
|
288
|
+
|
289
|
+
Args:
|
290
|
+
url_or_uuid: Either a UUID string or a URL pointing to the object
|
291
|
+
expected_parrot_url: Optional URL for the Parrot server
|
292
|
+
|
293
|
+
Returns:
|
294
|
+
FileStore: The pulled FileStore object
|
284
295
|
"""
|
285
|
-
scenario_version = Scenario.pull(
|
296
|
+
scenario_version = Scenario.pull(url_or_uuid)
|
286
297
|
return cls.from_dict(scenario_version.to_dict())
|
287
298
|
|
288
299
|
@classmethod
|
@@ -942,12 +942,11 @@ class Survey(SurveyExportMixin, Base):
|
|
942
942
|
# TODO: temp fix by creating a cache
|
943
943
|
if cache is None:
|
944
944
|
from edsl.data import Cache
|
945
|
+
|
945
946
|
c = Cache()
|
946
947
|
else:
|
947
948
|
c = cache
|
948
949
|
|
949
|
-
|
950
|
-
|
951
950
|
jobs: "Jobs" = self.get_job(model=model, agent=agent, **kwargs).using(c)
|
952
951
|
return await jobs.run_async(
|
953
952
|
disable_remote_inference=disable_remote_inference,
|
@@ -1244,6 +1243,28 @@ class Survey(SurveyExportMixin, Base):
|
|
1244
1243
|
|
1245
1244
|
return self.by(s).by(agent).by(model)
|
1246
1245
|
|
1246
|
+
###################
|
1247
|
+
# COOP METHODS
|
1248
|
+
###################
|
1249
|
+
def humanize(
|
1250
|
+
self,
|
1251
|
+
project_name: str,
|
1252
|
+
survey_description: Optional[str] = None,
|
1253
|
+
survey_alias: Optional[str] = None,
|
1254
|
+
survey_visibility: Optional["VisibilityType"] = "unlisted",
|
1255
|
+
):
|
1256
|
+
"""
|
1257
|
+
Create a survey object on Coop.
|
1258
|
+
Then, create a project on Coop so you can share the survey with humans.
|
1259
|
+
"""
|
1260
|
+
from edsl.coop import Coop
|
1261
|
+
|
1262
|
+
c = Coop()
|
1263
|
+
project_details = c.create_project(
|
1264
|
+
self, project_name, survey_description, survey_alias, survey_visibility
|
1265
|
+
)
|
1266
|
+
return project_details
|
1267
|
+
|
1247
1268
|
|
1248
1269
|
def main():
|
1249
1270
|
"""Run the example survey."""
|
@@ -1255,16 +1276,16 @@ def main():
|
|
1255
1276
|
q0 = QuestionMultipleChoice(
|
1256
1277
|
question_name="q0",
|
1257
1278
|
question_text="What is the capital of France?",
|
1258
|
-
question_options=["London", "Paris", "Rome", "Boston", "I don't know"]
|
1279
|
+
question_options=["London", "Paris", "Rome", "Boston", "I don't know"],
|
1259
1280
|
)
|
1260
1281
|
q1 = QuestionList(
|
1261
1282
|
question_name="q1",
|
1262
1283
|
question_text="Name some cities in France.",
|
1263
|
-
max_list_items
|
1284
|
+
max_list_items=5,
|
1264
1285
|
)
|
1265
1286
|
q2 = QuestionNumerical(
|
1266
1287
|
question_name="q2",
|
1267
|
-
question_text="What is the population of {{ q0.answer }}?"
|
1288
|
+
question_text="What is the population of {{ q0.answer }}?",
|
1268
1289
|
)
|
1269
1290
|
s = Survey(questions=[q0, q1, q2])
|
1270
1291
|
s = s.add_rule(q0, "q0 == 'Paris'", q2)
|
@@ -1281,4 +1302,4 @@ if __name__ == "__main__":
|
|
1281
1302
|
import doctest
|
1282
1303
|
|
1283
1304
|
# doctest.testmod(optionflags=doctest.ELLIPSIS | doctest.SKIP)
|
1284
|
-
doctest.testmod(optionflags=doctest.ELLIPSIS)
|
1305
|
+
doctest.testmod(optionflags=doctest.ELLIPSIS)
|
edsl-0.1.43/edsl/__version__.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.1.43"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|