I will need to implement this modularity for the application I am building and I am happy to leave this thing open source. I'm opening this issue because I'm not sure of the motivations for the code to be written this way.
Possible Solution 1
I believe we can have a fixed model for all llms, as in general, we want to achieve the same result. I don't really like this solution, but it should solve the problem in the short term.
Possible Solution 2
Another proposal would be to create an interface for the parameters where each llm will implement its own structure, the interface only guarantees that they all share mandatory methods, such as the name of the parameters
Problem
The structure of the
FunctionDefinition
still uses any type of parameter, the code is not as modular when it allows it. This creates a problem forcing the client to implement a function call interface for each provider. https://github.com/tmc/langchaingo/blob/03b74ec5c76370198108c00a64c36f33d10c9601/llms/options.go#L81Context
I will need to implement this modularity for the application I am building and I am happy to leave this thing open source. I'm opening this issue because I'm not sure of the motivations for the code to be written this way.
Possible Solution 1
I believe we can have a fixed model for all llms, as in general, we want to achieve the same result. I don't really like this solution, but it should solve the problem in the short term.
Possible Solution 2
Another proposal would be to create an interface for the parameters where each llm will implement its own structure, the interface only guarantees that they all share mandatory methods, such as the name of the parameters
Let's discuss