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

Rag not Enabled by default #249

Closed
jlewi opened this issue Sep 18, 2024 · 0 comments · Fixed by #251
Closed

Rag not Enabled by default #249

jlewi opened this issue Sep 18, 2024 · 0 comments · Fixed by #251

Comments

@jlewi
Copy link
Owner

jlewi commented Sep 18, 2024

I flipped the value to be true but it doesn't actually get enabled if you have an empty RAG config in your configuration.

The problem is here

if c.Agent == nil || c.Agent.RAG == nil {

If the config.Agent is nil or config.Agent.RAG is nil we won't enable RAG but we should. We should return whatever the default value is as set by the constant.

jlewi added a commit that referenced this issue Sep 20, 2024
* Fix #249
* The bug was the function UseRAGEnabled was using a hard coded value for the default
  rather than the constant. As a result, when we recently changed the default to be true
  it wasn't actually enabled by default.

* Refactor viper processing so its easy to test configuration in a unittest
* We want to be able to create instances of viper using viper.New in the unittest
  so that we don't have to only use the global viper instance.

* To support that we refactor InitViper into a separate function which takes as an argument *viper.Viper
@jlewi jlewi closed this as completed in e14d50a Sep 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

Successfully merging a pull request may close this issue.

1 participant