Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/magefile/mage v1.15.0
github.com/mattn/go-shellwords v1.0.13
github.com/modelcontextprotocol/go-sdk v1.6.1
github.com/openai/openai-go v1.12.0
github.com/openai/openai-go/v3 v3.44.0
github.com/ossf/osv-schema/bindings/go v0.0.0-20260424063704-83285ce2a866
github.com/r3labs/diff/v3 v3.0.2
github.com/smartystreets/goconvey v1.8.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ github.com/neurosnap/sentences v1.0.6 h1:iBVUivNtlwGkYsJblWV8GGVFmXzZzak907Ci8aA
github.com/neurosnap/sentences v1.0.6/go.mod h1:pg1IapvYpWCJJm/Etxeh0+gtMf1rI1STY9S7eUCPbDc=
github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
github.com/openai/openai-go v1.12.0 h1:NBQCnXzqOTv5wsgNC36PrFEiskGfO5wccfCWDo9S1U0=
github.com/openai/openai-go v1.12.0/go.mod h1:g461MYGXEXBVdV5SaR/5tNzNbSfwTBBefwc+LlDCK0Y=
github.com/openai/openai-go/v3 v3.44.0 h1:kkGh+jb/sKfSh5P74Jk5mCRufaQ0q7oH+lq+pNlWjsk=
github.com/openai/openai-go/v3 v3.44.0/go.mod h1:cdufnVK14cWcT9qA1rRtrXx4FTRsgbDPW7Ia7SS5cZo=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
Expand Down
6 changes: 3 additions & 3 deletions pkg/llmprovider/openaiprovider/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

"github.com/grafana/plugin-validator/pkg/llmprovider"
"github.com/grafana/plugin-validator/pkg/logme"
"github.com/openai/openai-go"
"github.com/openai/openai-go/option"
"github.com/openai/openai-go/shared"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/option"
"github.com/openai/openai-go/v3/shared"
)

// Client implements llmprovider.Provider for OpenAI.
Expand Down Expand Up @@ -110,12 +110,12 @@
func toAssistantMessage(msg llmprovider.Message) openai.ChatCompletionMessageParamUnion {
text := extractText(msg.Parts)

var toolCalls []openai.ChatCompletionMessageToolCallParam

Check failure on line 113 in pkg/llmprovider/openaiprovider/client.go

View workflow job for this annotation

GitHub Actions / test

undefined: openai.ChatCompletionMessageToolCallParam
for _, part := range msg.Parts {
if tc, ok := part.(llmprovider.ToolCallPart); ok {
toolCalls = append(toolCalls, openai.ChatCompletionMessageToolCallParam{

Check failure on line 116 in pkg/llmprovider/openaiprovider/client.go

View workflow job for this annotation

GitHub Actions / test

undefined: openai.ChatCompletionMessageToolCallParam
ID: tc.ID,
Function: openai.ChatCompletionMessageToolCallFunctionParam{

Check failure on line 118 in pkg/llmprovider/openaiprovider/client.go

View workflow job for this annotation

GitHub Actions / test

undefined: openai.ChatCompletionMessageToolCallFunctionParam
Name: tc.Name,
Arguments: tc.Arguments,
},
Expand Down Expand Up @@ -149,14 +149,14 @@

// --- Tool conversion ---

func toOpenAITools(tools []llmprovider.Tool) []openai.ChatCompletionToolParam {

Check failure on line 152 in pkg/llmprovider/openaiprovider/client.go

View workflow job for this annotation

GitHub Actions / test

undefined: openai.ChatCompletionToolParam
var result []openai.ChatCompletionToolParam

Check failure on line 153 in pkg/llmprovider/openaiprovider/client.go

View workflow job for this annotation

GitHub Actions / test

undefined: openai.ChatCompletionToolParam
for _, tool := range tools {
if tool.Function == nil {
continue
}

param := openai.ChatCompletionToolParam{

Check failure on line 159 in pkg/llmprovider/openaiprovider/client.go

View workflow job for this annotation

GitHub Actions / test

undefined: openai.ChatCompletionToolParam
Function: shared.FunctionDefinitionParam{
Name: tool.Function.Name,
Description: openai.String(tool.Function.Description),
Expand Down
Loading