Skip to content

Conversation

@jaymiracola
Copy link
Contributor

Description of your changes

Adding configuration ability for local models conforming to OpenAI API standards. Switched to agents.NewOpenAIFunctionsAgent() instead of agents.NewOneShotAgent() to help handle parsing output.

I have:

Copy link
Member

@tnthornton tnthornton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jaymiracola ! I just have the one comment for something for us to keep an eye on as we're using this new functionality over time 👍

Comment on lines +145 to +154
var baseURL string
if baseURLBytes, ok := c.Data[credBaseURLKey]; ok {
baseURL = strings.Trim(string(baseURLBytes), "\n")
}

// Extract optional model from credentials, default to gpt-4
model := defaultModel
if modelBytes, ok := c.Data[credModelKey]; ok {
model = strings.Trim(string(modelBytes), "\n")
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is generally fine for now. One thing that I'm not sure about is if these configurations should stay in the secret, as roughly a configuration singleton, or if we should move them to the input. Both options are dynamic for the lifespan of the function request, but the model and the base url aren't really "sensitive". Also moving it to the input may make it a little more apparent how the function is configured within the Operation pipeline itself.

Just some things to think about as we try out this new functionality 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I struggled with where to put them. For the sake of convenience of uniformity I landed on the secret for now.

…gent for better parsing

Signed-off-by: Jay Miracola <jaymiracola@gmail.com>
Signed-off-by: Jay Miracola <jaymiracola@gmail.com>
@tnthornton tnthornton merged commit 8455b86 into main Sep 18, 2025
5 checks passed
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

Successfully merging this pull request may close these issues.

3 participants