working mode
This commit is contained in:
22
agent.go
22
agent.go
@@ -54,18 +54,13 @@ func NewLinuxDiagnosticAgent() *LinuxDiagnosticAgent {
|
||||
supabaseURL := os.Getenv("SUPABASE_PROJECT_URL")
|
||||
if supabaseURL == "" {
|
||||
logging.Warning("SUPABASE_PROJECT_URL not set, TensorZero integration will not work")
|
||||
supabaseURL = "https://gpqzsricripnvbrpsyws.supabase.co" // fallback
|
||||
}
|
||||
|
||||
model := os.Getenv("NANNYAPI_MODEL")
|
||||
if model == "" {
|
||||
model = "tensorzero::function_name::diagnose_and_heal"
|
||||
logging.Warning("Using default model '%s'. Set NANNYAPI_MODEL environment variable for your specific function", model)
|
||||
}
|
||||
// Default model for diagnostic and healing
|
||||
model := "tensorzero::function_name::diagnose_and_heal"
|
||||
|
||||
// Note: We don't use the OpenAI client anymore, we use direct HTTP to Supabase proxy
|
||||
agent := &LinuxDiagnosticAgent{
|
||||
client: nil, // Not used anymore
|
||||
client: nil, // Not used - we use direct HTTP to Supabase proxy
|
||||
model: model,
|
||||
executor: executor.NewCommandExecutor(10 * time.Second), // 10 second timeout for commands
|
||||
config: DefaultAgentConfig(), // Default concurrent execution config
|
||||
@@ -84,18 +79,13 @@ func NewLinuxDiagnosticAgentWithAuth(authManager interface{}) *LinuxDiagnosticAg
|
||||
supabaseURL := os.Getenv("SUPABASE_PROJECT_URL")
|
||||
if supabaseURL == "" {
|
||||
logging.Warning("SUPABASE_PROJECT_URL not set, TensorZero integration will not work")
|
||||
supabaseURL = "https://gpqzsricripnvbrpsyws.supabase.co" // fallback
|
||||
}
|
||||
|
||||
model := os.Getenv("NANNYAPI_MODEL")
|
||||
if model == "" {
|
||||
model = "tensorzero::function_name::diagnose_and_heal"
|
||||
logging.Warning("Using default model '%s'. Set NANNYAPI_MODEL environment variable for your specific function", model)
|
||||
}
|
||||
// Default model for diagnostic and healing
|
||||
model := "tensorzero::function_name::diagnose_and_heal"
|
||||
|
||||
// Note: We don't use the OpenAI client anymore, we use direct HTTP to Supabase proxy
|
||||
agent := &LinuxDiagnosticAgent{
|
||||
client: nil, // Not used anymore
|
||||
client: nil, // Not used - we use direct HTTP to Supabase proxy
|
||||
model: model,
|
||||
executor: executor.NewCommandExecutor(10 * time.Second), // 10 second timeout for commands
|
||||
config: DefaultAgentConfig(), // Default concurrent execution config
|
||||
|
||||
Reference in New Issue
Block a user