yao/agent/llm/llm.go
Max 124bd38f7a Implement global uses configuration and enhance assistant capabilities
- Added global uses configuration to the assistant, allowing for centralized management of vision, audio, search, and fetch settings.
- Updated the Assistant struct and related methods to support the new Uses configuration, improving flexibility in assistant operations.
- Refactored the Stream method to utilize the new CompletionResponse type, enhancing response handling.
- Introduced new methods for building requests and managing capabilities, streamlining the assistant's interaction with various connectors.
2025-11-14 19:17:21 +08:00

15 lines
491 B
Go

package llm
import (
"github.com/yaoapp/gou/connector"
"github.com/yaoapp/yao/agent/context"
"github.com/yaoapp/yao/agent/llm/providers"
)
// New create a new LLM instance
// conn: connector object from connector.Select()
// options: completion options containing capabilities and other settings
func New(conn connector.Connector, options *context.CompletionOptions) (LLM, error) {
// Select appropriate provider based on capabilities
return providers.SelectProvider(conn, options)
}