# Functions
No description provided by the author
FindAvailablePort finds an available port starting from the given port.
GenerateRandomDigits generates a string of random digits with the specified length.
GenerateRandomImage creates a random colored image with a pattern.
GenerateRandomString generates a random string with the specified length.
GetIPInfo retrieves location and ISP information for an IP address.
GetPlatformInfo extracts platform information from User-Agent.
GetRandomUniqueColors returns n unique random colors from the basic colors.
GetSeparator returns a separator line of standard width.
No description provided by the author
IsPortAvailable checks if a port is available.
No description provided by the author
MaskKey masks a key string by showing only the first and last n characters.
MaskString masks a string by showing only the first and last few characters.
Min returns the minimum of two integers.
NewClient creates a new API client.
NewPrinter creates a new Printer with the given writer.
normalizeURL ensures the URL ends with /v1/chat/completions for OpenAI-compatible APIs.
ShowMainMenu displays the main menu and returns the user's choice.
ShowMenu displays a menu and returns user's choice.
# Constants
Colors.
Colors.
Colors.
Colors.
Colors.
Colors.
Colors.
Colors.
No description provided by the author
Emojis.
Menu-specific emojis.
Emojis.
Emojis.
Menu-specific emojis.
Menu-specific emojis.
Emojis.
Emojis.
Emojis.
Menu-specific emojis.
Emojis.
Emojis.
Emojis.
emoji for loading.
Menu-specific emojis.
Emojis.
Emojis.
Emojis.
Menu-specific emojis.
Menu-specific emojis.
Emojis.
Emojis.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Common formatting.
Common formatting.
# Variables
BasicColors provides a list of basic colors with their names.
Menu constants.
Menu constants.
Menu constants.
Menu constants.
# Structs
AddressInfo 存储地址解析结果.
APIResponse represents an API response.
ChatResponse represents a chat completion response.
Choice represents a response choice.
Client represents an API client.
ColorInfo represents a basic color with its name ColorInfo represents a basic color with its name.
ErrorResponse represents an API error response.
ImageURL represents an image URL.
IPInfo represents the response from IP-API.
Menu represents a menu with title and items.
MenuItem represents a menu item.
Message represents a chat message.
MessageContent represents the content of a message.
Printer handles output formatting with configurable writer.
Request represents a chat request.
Response represents a chat response.
StreamChoice represents a streaming choice.
StreamResponse represents a streaming response.
# Type aliases
AddressType 表示地址类型.