Skip to content

Commit

Permalink
dynamic model selection from em project settings
Browse files Browse the repository at this point in the history
  • Loading branch information
irvins committed Dec 15, 2024
1 parent 4e3f59b commit c86df27
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion MICA.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public function redcap_module_ajax($action, $payload, $project_id, $record, $ins
$this->emDebug("chatml Messages array to API", $messages);

//CALL API ENDPOINT WITH AUGMENTED CHATML
$model = "gpt-4o";
$model = $this->getProjectSetting("llm-model");
$params = array("messages" => $messages);

// Alter model parameters if set by user
Expand Down
20 changes: 17 additions & 3 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,24 @@
"type": "checkbox"
},
{
"key": "gpt-model",
"name": "GPT Model",
"key": "llm-model",
"name": "LLM Model",
"required": false,
"type": "text",
"type": "dropdown",
"choices": [
{
"value": "gpt-4o",
"name": "GPT-4o"
},
{
"value": "claude",
"name": "Claude 3.5 Sonnet"
},
{
"value": "o1-mini",
"name": "GPT o1-mini"
}
],
"default": "gpt-4o"
},
{
Expand Down

0 comments on commit c86df27

Please sign in to comment.