feat: switch to OpenRouter for web search integration
This commit is contained in:
parent
07d2042eb7
commit
7fd8146ec5
7 changed files with 33 additions and 29 deletions
|
|
@ -29,6 +29,14 @@ func NewClient(apiKey string) *Client {
|
|||
return &Client{rest: cli}
|
||||
}
|
||||
|
||||
func NewClientWithBaseUrl(apiKey string, baseURL string) *Client {
|
||||
cli := NewClient(apiKey)
|
||||
if baseURL != "" {
|
||||
cli.rest.SetBaseURL(baseURL)
|
||||
}
|
||||
return cli
|
||||
}
|
||||
|
||||
func (c *Client) ChatCompletion(request ChatRequest) (*ChatResponse, error) {
|
||||
// Note: this function might not work due to the header timeout set on the http client.
|
||||
// We should probably not use this anyway.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue