Major integrations and fixes: - Added BACKBEAT SDK integration for P2P operation timing - Implemented beat-aware status tracking for distributed operations - Added Docker secrets support for secure license management - Resolved KACHING license validation via HTTPS/TLS - Updated docker-compose configuration for clean stack deployment - Disabled rollback policies to prevent deployment failures - Added license credential storage (CHORUS-DEV-MULTI-001) Technical improvements: - BACKBEAT P2P operation tracking with phase management - Enhanced configuration system with file-based secrets - Improved error handling for license validation - Clean separation of KACHING and CHORUS deployment stacks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
69 lines
2.1 KiB
Go
69 lines
2.1 KiB
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"time"
|
|
|
|
"chorus/reasoning"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Println("🧠 CHORUS ResetData Reasoning Engine Test")
|
|
fmt.Println("====================================================")
|
|
|
|
// Get API key from environment
|
|
apiKey := os.Getenv("RESETDATA_API_KEY")
|
|
if apiKey == "" {
|
|
fmt.Println("❌ RESETDATA_API_KEY environment variable is required")
|
|
os.Exit(1)
|
|
}
|
|
|
|
fmt.Printf("📋 Using API key: %s...\n", apiKey[:20])
|
|
|
|
// Configure the reasoning engine
|
|
resetdataConfig := reasoning.ResetDataConfig{
|
|
BaseURL: "https://models.au-syd.resetdata.ai/v1",
|
|
APIKey: apiKey,
|
|
Model: "meta/llama-3.1-8b-instruct:ptu-9f3627a0-4909-4561-8996-272774e91fc8",
|
|
Timeout: 30 * time.Second,
|
|
}
|
|
|
|
reasoning.SetAIProvider("resetdata")
|
|
reasoning.SetResetDataConfig(resetdataConfig)
|
|
reasoning.SetModelConfig([]string{"meta/llama-3.1-8b-instruct"}, "", "meta/llama-3.1-8b-instruct")
|
|
|
|
fmt.Println("🌐 Testing ResetData integration through CHORUS reasoning engine...")
|
|
|
|
// Test the reasoning engine
|
|
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
|
defer cancel()
|
|
|
|
testPrompt := "What is the capital of France? Answer briefly."
|
|
fmt.Printf("🤔 Asking: %s\n", testPrompt)
|
|
|
|
response, err := reasoning.GenerateResponse(ctx, "meta/llama-3.1-8b-instruct", testPrompt)
|
|
if err != nil {
|
|
fmt.Printf("❌ Reasoning engine test failed: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
fmt.Println("✅ CHORUS ResetData integration test successful!")
|
|
fmt.Printf("📝 Response: %s\n", response)
|
|
|
|
// Test with different model format
|
|
fmt.Println("\n🔄 Testing with full model identifier...")
|
|
response2, err := reasoning.GenerateResponse(ctx, "meta/llama-3.1-8b-instruct:ptu-9f3627a0-4909-4561-8996-272774e91fc8", "What is 5+3? Answer briefly.")
|
|
if err != nil {
|
|
fmt.Printf("❌ Second test failed: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
fmt.Println("✅ Second test successful!")
|
|
fmt.Printf("📝 Response: %s\n", response2)
|
|
|
|
fmt.Println("\n====================================================")
|
|
fmt.Println("🎉 All CHORUS ResetData integration tests passed!")
|
|
fmt.Println("✨ ResetData is now the default AI provider for CHORUS")
|
|
} |