henomis/lingoose

Require Pointer Type

Closed this issue · 5 comments

Function: openai.FunctionDefinition{

Captura de pantalla 2024-03-21 165857
imagen

We could use Type: openai.AssistantToolTypeFunction, Function: &openai.FunctionDefinition{}

@Lenstack I don't understand your issue. Please check imports and be sure to alias lingoose's openai to avoid conflicts with the go openai package.

@henomis Internally, lingoose uses "github.com/sashabaranov/go-openai". Therefore, in the implementation of getChatCompletionRequestTools, when using openai.FunctionDefinition{}, it requires to be called as &openai.FunctionDefinition{} because "FunctionDefinition" is a pointer.

@Lenstack Lingoose uses v1.19.2 of the go-openai package. In this version FunctionDefinition is not a pointer.
If it had been a pointer the code would give compiling errors. Your PR is broken, indeed.

As there's been no follow-up on the requested changes, I'm closing this issue.