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

Require Pointer Type #185

Closed
Lenstack opened this issue Mar 21, 2024 · 5 comments
Closed

Require Pointer Type #185

Lenstack opened this issue Mar 21, 2024 · 5 comments

Comments

@Lenstack
Copy link

Lenstack commented Mar 21, 2024

Function: openai.FunctionDefinition{

Captura de pantalla 2024-03-21 165857
imagen

@Lenstack
Copy link
Author

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

@henomis
Copy link
Owner

henomis commented Apr 9, 2024

@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.

@Lenstack
Copy link
Author

Lenstack commented Apr 9, 2024

@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.

@henomis
Copy link
Owner

henomis commented Apr 10, 2024

@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.

@henomis
Copy link
Owner

henomis commented May 20, 2024

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

@henomis henomis closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants