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

Migrated from RetrievalQA, removed print statements #6

Merged
merged 8 commits into from
Oct 22, 2024

Conversation

kshitijdshah99
Copy link
Contributor

I have added paths of all the docs and modified the code as per our requirements. This Fixes #4

rag_agent.py Show resolved Hide resolved
rag_agent.py Outdated Show resolved Hide resolved
rag_agent.py Outdated Show resolved Hide resolved
rag_agent.py Outdated Show resolved Hide resolved
rag_agent.py Outdated Show resolved Hide resolved
@chimosky
Copy link
Member

You've set an initial value for self.model in a640e38, but haven't removed the kwarg you passed to set_model.

Your initial value means that set_model doesn't need to be called if you're setting it to the same value as the one that's been set.

@chimosky
Copy link
Member

Just looked at c45998c, I didn't say you needed to remove the function, it's not redundant.

I said "You've set an initial value for self.model in a640e38, but haven't removed the kwarg you passed to set_model."

Please let me know if you don't understand what I meant.

@kshitijdshah99
Copy link
Contributor Author

kshitijdshah99 commented Oct 17, 2024

ok so you want me to do this changes?

def __init__(self, model="llama3.1"):
        """
        Initializing the RAG agent with a default model like Llama3.1.
        """
        self.model = OllamaLLM(model=model)
        self.retriever = None
        self.prompt = ChatPromptTemplate.from_template(PROMPT_TEMPLATE)

    def set_model(self, model):
        self.model = OllamaLLM(model=model)

@chimosky
Copy link
Member

Yes, that's what I want.

The init docstring is stating the obvious, if that's all it does then I don't think we need it.

rag_agent.py Outdated Show resolved Hide resolved
Signed-off-by: Chihurumnaya Ibiam <[email protected]>
@chimosky
Copy link
Member

Fixed the issues with redundant comments in 3ca1ff7.

@chimosky chimosky merged commit 9a28f68 into sugarlabs:review-changes Oct 22, 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 this pull request may close these issues.

2 participants