[#110] Add AI client with multi-provider support and UI #113
@@ -10760,13 +10760,15 @@ cmd_ai_start(ProfWin* window, const char* const command, gchar** args)
|
||||
// /ai start [<provider>/<model>]
|
||||
const gchar* provider_model = (g_strv_length(args) >= 2) ? args[1] : NULL;
|
||||
|
||||
auto_gchar gchar* owned_provider_name = NULL;
|
||||
const gchar* provider_name = "openai";
|
||||
const gchar* model = "gpt-4o";
|
||||
|
||||
if (provider_model) {
|
||||
const gchar* slash = strchr(provider_model, '/');
|
||||
if (slash) {
|
||||
provider_name = g_strndup(provider_model, slash - provider_model);
|
||||
owned_provider_name = g_strndup(provider_model, slash - provider_model);
|
||||
provider_name = owned_provider_name;
|
||||
model = slash + 1;
|
||||
} else {
|
||||
// Just a model name, use default provider
|
||||
|
||||
Reference in New Issue
Block a user