Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sunderme committed Jun 27, 2024
1 parent 1b4009a commit 1c03225
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/aichatassistant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,18 @@ void AIChatAssistant::slotSend()

QJsonObject dd;
dd["model"]=config->ai_preferredModel;
if(config->ai_provider!=2){
if(config->ai_provider==0){
// work-around for llamafile for now
dd["temperature"]=config->ai_temperature;
}
if(config->ai_provider==1){
// work-around for openai
bool ok;
float val=config->ai_temperature.toFloat(&ok);
if(ok){
dd["temperature"]=val;
}
}
if(config->ai_streamResults){
dd["stream"] = "True";
m_timer=new QTimer();
Expand Down

0 comments on commit 1c03225

Please sign in to comment.