| 109 | } |
| 110 | |
| 111 | func printUsage() { |
| 112 | fmt.Println("Usage: go run main-testopenai.go [--model <model>] [--tools] [message]") |
| 113 | fmt.Println("Examples:") |
| 114 | fmt.Println(" go run main-testopenai.go 'Stream me a limerick about gophers coding in Go.'") |
| 115 | fmt.Println(" go run main-testopenai.go --model gpt-4 'What is 2+2?'") |
| 116 | fmt.Println(" go run main-testopenai.go --tools 'What is 2+2? Use the adder tool.'") |
| 117 | fmt.Println("") |
| 118 | fmt.Println("Default model: gpt-5-mini") |
| 119 | fmt.Println("") |
| 120 | fmt.Println("Environment variables:") |
| 121 | fmt.Println(" OPENAI_APIKEY (required)") |
| 122 | } |
| 123 | |
| 124 | func main() { |
| 125 | var model string |