Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdcf6766

Browse files
committed
chore: upgrade aisdk-go
Signed-off-by: Danny Kopping <dannykopping@gmail.com>
1 parent348d19d commitdcf6766

File tree

9 files changed

+1554
-24
lines changed

9 files changed

+1554
-24
lines changed

‎coderd/ai/ai.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/anthropics/anthropic-sdk-go"
77
anthropicoption"github.com/anthropics/anthropic-sdk-go/option"
8-
"github.com/kylecarbs/aisdk-go"
8+
"github.com/coder/aisdk-go"
99
"github.com/openai/openai-go"
1010
openaioption"github.com/openai/openai-go/option"
1111
"golang.org/x/xerrors"
@@ -85,12 +85,12 @@ func ModelsFromConfig(ctx context.Context, configs []codersdk.AIProviderConfig)
8585
}
8686
ifoptions.SystemPrompt!="" {
8787
systemMessage= []anthropic.TextBlockParam{
88-
*anthropic.NewTextBlock(options.SystemPrompt).OfRequestTextBlock,
88+
*anthropic.NewTextBlock(options.SystemPrompt).OfText,
8989
}
9090
}
9191
returnaisdk.AnthropicToDataStream(client.Messages.NewStreaming(ctx, anthropic.MessageNewParams{
9292
Messages:anthropicMessages,
93-
Model:options.Model,
93+
Model:anthropic.Model(options.Model),
9494
System:systemMessage,
9595
Tools:aisdk.ToolsToAnthropic(options.Tools),
9696
MaxTokens:8192,

‎coderd/chat.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"net/http"
77
"time"
88

9-
"github.com/kylecarbs/aisdk-go"
9+
"github.com/coder/aisdk-go"
1010

1111
"github.com/coder/coder/v2/coderd/ai"
1212
"github.com/coder/coder/v2/coderd/database"
@@ -301,7 +301,7 @@ You are running as an agent - please keep going until the user's query is comple
301301
})
302302
return
303303
}
304-
stream=stream.WithToolCalling(func(toolCall aisdk.ToolCall)aisdk.ToolCallResult {
304+
stream=stream.WithToolCalling(func(toolCall aisdk.ToolCall)any {
305305
tool,ok:=handlers[toolCall.Name]
306306
if!ok {
307307
returnnil

‎coderd/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"net/http"
66

7-
"github.com/kylecarbs/aisdk-go"
7+
"github.com/coder/aisdk-go"
88

99
"github.com/coder/coder/v2/coderd/httpapi"
1010
"github.com/coder/coder/v2/coderd/rbac"

‎codersdk/chat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"time"
99

1010
"github.com/google/uuid"
11-
"github.com/kylecarbs/aisdk-go"
11+
"github.com/coder/aisdk-go"
1212
"golang.org/x/xerrors"
1313
)
1414

‎codersdk/toolsdk/toolsdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"io"
99

1010
"github.com/google/uuid"
11-
"github.com/kylecarbs/aisdk-go"
11+
"github.com/coder/aisdk-go"
1212
"golang.org/x/xerrors"
1313

1414
"github.com/coder/coder/v2/codersdk"

‎codersdk/toolsdk/toolsdk_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/google/uuid"
13-
"github.com/kylecarbs/aisdk-go"
13+
"github.com/coder/aisdk-go"
1414
"github.com/stretchr/testify/assert"
1515
"github.com/stretchr/testify/require"
1616
"go.uber.org/goleak"

‎go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,13 +484,13 @@ require (
484484
)
485485

486486
require (
487-
github.com/anthropics/anthropic-sdk-gov0.2.0-beta.3
487+
github.com/anthropics/anthropic-sdk-gov1.4.0
488+
github.com/coder/aisdk-gov0.0.9
488489
github.com/coder/previewv0.0.2-0.20250604144457-c9862a17f652
489490
github.com/fsnotify/fsnotifyv1.9.0
490-
github.com/kylecarbs/aisdk-gov0.0.8
491491
github.com/mark3labs/mcp-gov0.31.0
492-
github.com/openai/openai-gov0.1.0-beta.10
493-
google.golang.org/genaiv0.7.0
492+
github.com/openai/openai-gov1.3.0
493+
google.golang.org/genaiv1.10.0
494494
)
495495

496496
require (

‎go.sum

Lines changed: 1538 additions & 8 deletions
Large diffs are not rendered by default.

‎site/src/api/typesGenerated.ts

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp