Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToOpenAPIV3() return both nil openapi3.Schema and nil error #91

Open
cruvie opened this issue Mar 2, 2025 · 1 comment
Open

ToOpenAPIV3() return both nil openapi3.Schema and nil error #91

cruvie opened this issue Mar 2, 2025 · 1 comment

Comments

@cruvie
Copy link

cruvie commented Mar 2, 2025

Describe the bug

GOROOT=/Users/cruvie/go/pkg/mod/golang.org/[email protected] #gosetup
GOPATH=/Users/cruvie/go #gosetup
/Users/cruvie/go/pkg/mod/golang.org/[email protected]/bin/go build -o /Users/cruvie/Library/Caches/JetBrains/IntelliJIdea2024.3/tmp/GoLand/___1go_build_github.com_cloudwego_eino_examples_cmk_kkRAG_main -gcflags all=-N -l github.com/cloudwego/eino-examples/cmk/kkRAG/main #gosetup
"/Users/cruvie/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/go-plugin/lib/dlv/macarm/dlv" --listen=127.0.0.1:52507 --headless=true --api-version=2 --check-go-version=false --only-same-user=false exec /Users/cruvie/Library/Caches/JetBrains/IntelliJIdea2024.3/tmp/GoLand/___1go_build_github.com_cloudwego_eino_examples_cmk_kkRAG_main -- #gosetup
API server listening at: 127.0.0.1:52507
panic: failed to wait for tasks: execute node[Lambda5] fail: failed to wait for tasks: execute node[chat] fail: panic error: runtime error: invalid memory address or nil pointer dereference, 
	stack: goroutine 1 [running]:
	runtime/debug.Stack()
		/Users/cruvie/go/pkg/mod/golang.org/[email protected]/src/runtime/debug/stack.go:26 +0x64
	github.com/cloudwego/eino/compose.(*taskManager).executor.func1()
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/graph_manager.go:225 +0x80
	panic({0x10351bf80?, 0x103a11350?})
		/Users/cruvie/go/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:785 +0xf0
	github.com/cloudwego/eino-ext/components/model/ollama.toOllamaTools({0x14000062418, 0x1, 0x1})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/eino-ext/components/model/[email protected]/chatmodel.go:384 +0x128
	github.com/cloudwego/eino-ext/components/model/ollama.(*ChatModel).genRequest(0x140001992c0, {0x103608110, 0x14000098720}, 0x0, {0x1400009a190, 0x2, 0x2}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/eino-ext/components/model/[email protected]/chatmodel.go:267 +0x9cc
	github.com/cloudwego/eino-ext/components/model/ollama.(*ChatModel).Generate(0x140001992c0, {0x103608110, 0x14000098720}, {0x1400009a190, 0x2, 0x2}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/eino-ext/components/model/[email protected]/chatmodel.go:103 +0x134
	github.com/cloudwego/eino/compose.(*runnablePacker[...]).Invoke(0x10361c080, {0x103608110, 0x14000098720}, {0x1400009a190, 0x2, 0x2}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/runnable.go:223 +0x88
	github.com/cloudwego/eino/compose.(*runnablePacker[...]).toComposableRunnable.func4({0x1034cc8c0, 0x140000a6060}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/runnable.go:192 +0x204
	github.com/cloudwego/eino/compose.runnableInvoke({0x103608110, 0x14000098720}, 0x14000154b80, {0x1034cc8c0, 0x140000a6060}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/graph_run.go:112 +0x7c
	github.com/cloudwego/eino/compose.(*taskManager).executor(0x140000a0050, 0x1400009c2a0)
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/graph_manager.go:234 +0x1fc
	github.com/cloudwego/eino/compose.(*taskManager).submit(0x140000a0050, {0x1400009e050, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/graph_manager.go:261 +0x538
	github.com/cloudwego/eino/compose.(*runner).run(0x14000001440, {0x103608110, 0x140000985d0}, 0x0, {0x1034cc8c0, 0x140000a6048}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/graph_run.go:201 +0xaf0
	github.com/cloudwego/eino/compose.(*runner).invoke(0x14000001440, {0x103608110, 0x140000984e0}, {0x1034cc8c0, 0x140000a6048}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/graph_run.go:97 +0x74
	github.com/cloudwego/eino/compose.(*runner).toComposableRunnable.func1({0x103608110, 0x140000984e0}, {0x1034cc8c0, 0x140000a6048}, {0x103a4b3a0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/graph_run.go:383 +0x128
	github.com/cloudwego/eino/compose.runWithCallbacks[...].func1({0x1034cc8c0, 0x140000a6048}, {0x103a4b3a0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/utils.go:168 +0x110
	github.com/cloudwego/eino/compose.toGenericRunnable[...].func1({0x140000a6018, 0x2, 0x3}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/runnable.go:527 +0xdc
	github.com/cloudwego/eino/compose.(*runnablePacker[...]).wrapRunnableCtx.func1({0x140000a6018, 0x2, 0x3}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/runnable.go:99 +0xb8
	github.com/cloudwego/eino/compose.(*runnablePacker[...]).Invoke(0x10361b900, {0x103608110, 0x14000098480}, {0x140000a6018, 0x2, 0x3}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/runnable.go:223 +0x88
	github.com/cloudwego/eino/flow/agent/react.(*Agent).Generate(0x140001998f0, {0x103608110, 0x14000098480}, {0x140000a6018, 0x2, 0x3}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/flow/agent/react/react.go:310 +0xc4
	github.com/cloudwego/eino/compose.runWithCallbacks[...].func1({0x140000a6018, 0x2, 0x3}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/utils.go:168 +0x134
	github.com/cloudwego/eino/compose.(*runnablePacker[...]).Invoke(0x10361b720, {0x103608110, 0x14000098480}, {0x140000a6018, 0x2, 0x3}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/runnable.go:223 +0x88
	github.com/cloudwego/eino/compose.(*runnablePacker[...]).toComposableRunnable.func4({0x1034cc8c0, 0x140000a6030}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/runnable.go:192 +0x204
	github.com/cloudwego/eino/compose.runnableInvoke({0x103608110, 0x14000098480}, 0x14000154e00, {0x1034cc8c0, 0x140000a6030}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/graph_run.go:112 +0x7c
	github.com/cloudwego/eino/compose.(*taskManager).executor(0x140000a0000, 0x1400009c150)
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/graph_manager.go:234 +0x1fc
	github.com/cloudwego/eino/compose.(*taskManager).submit(0x140000a0000, {0x1400009e030, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/graph_manager.go:261 +0x538
	github.com/cloudwego/eino/compose.(*runner).run(0x14000001560, {0x103608110, 0x14000098030}, 0x0, {0x1035124e0, 0x14000199bc0}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/graph_run.go:201 +0xaf0
	github.com/cloudwego/eino/compose.(*runner).invoke(0x14000001560, {0x103608110, 0x14000098030}, {0x1035124e0, 0x14000199bc0}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/graph_run.go:97 +0x74
	github.com/cloudwego/eino/compose.(*runner).toComposableRunnable.func1({0x103608110, 0x14000098030}, {0x1035124e0, 0x14000199bc0}, {0x103a4b3a0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/graph_run.go:383 +0x128
	github.com/cloudwego/eino/compose.runWithCallbacks[...].func1({0x1035124e0, 0x14000199bc0}, {0x103a4b3a0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/utils.go:168 +0x110
	github.com/cloudwego/eino/compose.toGenericRunnable[...].func1({0x1035124e0, 0x14000199bc0}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/runnable.go:527 +0xbc
	github.com/cloudwego/eino/compose.(*runnablePacker[...]).wrapRunnableCtx.func1({0x1035124e0, 0x14000199bc0}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/runnable.go:99 +0xb0
	github.com/cloudwego/eino/compose.(*runnablePacker[...]).Invoke(0x10361b360, {0x1036081f0, 0x103a4b3a0}, {0x1035124e0, 0x14000199bc0}, {0x0, 0x0, 0x0})
		/Users/cruvie/go/pkg/mod/github.com/cloudwego/[email protected]/compose/runnable.go:223 +0x80
	main.main()
		/Users/cruvie/cruvie-space/code-hub/open-source/eino-examples/cmk/kkRAG/main/main.go:15 +0x1d8
	

goroutine 1 [running]:
main.main()
	/Users/cruvie/cruvie-space/code-hub/open-source/eino-examples/cmk/kkRAG/main/main.go:20 +0x2e4

调试器 已完成,退出代码为 0

To Reproduce

Steps to reproduce the behavior:

  1. run main.go

kkRAG.zip

Expected behavior

run with no error

Screenshots

Image

Version:

0.3.14

Environment:

AR='ar'
CC='clang'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='clang++'
GCCGO='gccgo'
GO111MODULE='on'
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/Users/cruvie/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/Users/cruvie/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/zc/n4bjshb57n9cmlp4nn3ljg800000gp/T/go-build2658195621=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE='actiontech.cloud'
GOMOD='/Users/cruvie/cruvie-space/code-hub/open-source/eino-examples/go.mod'
GOMODCACHE='/Users/cruvie/go/pkg/mod'
GONOPROXY='gitee.com/cruvie,actiontech.cloud'
GONOSUMDB='gitee.com/cruvie,actiontech.cloud'
GOOS='darwin'
GOPATH='/Users/cruvie/go'
GOPRIVATE='gitee.com/cruvie,actiontech.cloud'
GOPROXY='https://goproxy.cn,direct'
GOROOT='/Users/cruvie/go/go1.24.0'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/cruvie/Library/Application Support/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/cruvie/go/go1.24.0/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.24.0'
GOWORK=''
PKG_CONFIG='pkg-config'

Additional context

I think it is a bug and I made a pr to fix this.

return nil, nil

@shentongmartin
Copy link
Contributor

This is an intended behavior. We probably won't change this because certain model will not accept a zero valued &OpenAPIV3{}. We will fix the ollama chatmodel implementation to account for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants