Skip to content

Commit e732821

Browse files
committed
fix deprecated
1 parent 05568cd commit e732821

File tree

1 file changed

+3
-3
lines changed
  • compose/graph/react_with_interrupt

1 file changed

+3
-3
lines changed

compose/graph/react_with_interrupt/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434
)
3535

3636
func main() {
37-
compose.RegisterSerializableType[myState]("state")
37+
_ = compose.RegisterSerializableType[myState]("state")
3838

3939
ctx := context.Background()
4040
runner, err := composeGraph[map[string]any, *schema.Message](
@@ -95,7 +95,7 @@ func newChatTemplate(_ context.Context) prompt.ChatTemplate {
9595
)
9696
}
9797

98-
func newChatModel(ctx context.Context) model.ChatModel {
98+
func newChatModel(ctx context.Context) model.ToolCallingChatModel {
9999
cm, err := openai.NewChatModel(ctx, &openai.ChatModelConfig{
100100
APIKey: os.Getenv("OPENAI_API_KEY"),
101101
Model: os.Getenv("OPENAI_MODEL"),
@@ -146,7 +146,7 @@ type myState struct {
146146
history []*schema.Message
147147
}
148148

149-
func composeGraph[I, O any](ctx context.Context, tpl prompt.ChatTemplate, cm model.ChatModel, tn *compose.ToolsNode, store compose.CheckPointStore) (compose.Runnable[I, O], error) {
149+
func composeGraph[I, O any](ctx context.Context, tpl prompt.ChatTemplate, cm model.ToolCallingChatModel, tn *compose.ToolsNode, store compose.CheckPointStore) (compose.Runnable[I, O], error) {
150150
g := compose.NewGraph[I, O](compose.WithGenLocalState(func(ctx context.Context) *myState {
151151
return &myState{}
152152
}))

0 commit comments

Comments
 (0)