-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
105 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
""" | ||
Runs the Claude function call API. | ||
""" | ||
|
||
from typing import List | ||
|
||
|
||
def get_all_features() -> List[str]: | ||
""" | ||
Gets all the available features. | ||
Returns: | ||
- List of all available features. | ||
""" | ||
|
||
experiments_features = [ | ||
"features.experiments.experiment_name", | ||
"features.experiments.experiment_description", | ||
"features.experiments.participant_source", | ||
"features.experiments.participant_source_category", | ||
"features.experiments.units_randomized", | ||
"features.experiments.units_analyzed", | ||
"features.experiments.sample_size_randomized", | ||
"features.experiments.sample_size_analyzed", | ||
"features.experiments.sample_size_notes", | ||
"features.experiments.adults", | ||
"features.experiments.age_mean", | ||
"features.experiments.age_sd", | ||
"features.experiments.female_perc", | ||
"features.experiments.male_perc", | ||
"features.experiments.gender_other", | ||
"features.experiments.language", | ||
"features.experiments.language_secondary", | ||
"features.experiments.compensation", | ||
"features.experiments.demographics_conditions", | ||
"features.experiments.population_other", | ||
"features.experiments.condition.name", | ||
"features.experiments.condition.description", | ||
"features.experiments.condition.type", | ||
"features.experiments.condition.message", | ||
"features.experiments.condition.behavior.name", | ||
"features.experiments.condition.behavior.description", | ||
"features.experiments.condition.behavior.priority", | ||
"features.experiments.condition.behavior.focal", | ||
] | ||
|
||
|
||
experiments_function_call = { | ||
"name": "define_experiments_conditions_and_behaviors", | ||
"description": "Define the conditions and behaviors in each experiment. Each condition and behavior should be a separate object with specified properties and values under the experiments object.", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"experiments": { | ||
"type": "array", | ||
"description": "Array of experiments objects with detailed properties.", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"conditions": {}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
"required": [ | ||
"experiments", | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
""" | ||
Experiments feature module. | ||
""" | ||
|
||
from features.gpt_feature import GPTFeature | ||
|
||
|
||
class Feature(GPTFeature): | ||
""" | ||
Experiments feature. This feature is responsible for indicating the experiments in the study. | ||
""" | ||
|
||
def __init__(self, *args, **kwargs): | ||
feature_name = "experiments" | ||
feature_type = "object" | ||
feature_prompt = ( | ||
"Define the experiments in this paper. " | ||
"Each experiment should be a separate object with the following properties. " # This could be moved to where aggregation is done | ||
) | ||
feature_enum = None | ||
feature_description = "The experiments in a paper." | ||
super().__init__( | ||
feature_name, | ||
feature_type, | ||
feature_prompt, | ||
feature_enum, | ||
feature_description, | ||
*args, | ||
**kwargs | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters