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

Aider and/or LLM got confused about what was in the context #1675

Open
jbellis opened this issue Sep 23, 2024 · 4 comments · May be fixed by #1982
Open

Aider and/or LLM got confused about what was in the context #1675

jbellis opened this issue Sep 23, 2024 · 4 comments · May be fixed by #1982
Labels
question Further information is requested

Comments

@jbellis
Copy link
Contributor

jbellis commented Sep 23, 2024

Issue

Aider says that astra.py is in context but the LLM acts like it is not until I drop and re-add.

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
colbert_live/db/astra.py example/cmdline/db.py                                                                                         
> /drop example/cmdline/db.py                                                                                                          

Removed example/cmdline/db.py from the chat
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
colbert_live/db/astra.py                                                                                                               
> add a `verbose` flag to the `AstraDB` constructor, and "if self.verbose: print(...)" statements where it makes sense                 


To implement the verbose flag in the AstraDB constructor and add appropriate print statements, we'll need to modify the                
colbert_live/db/astra.py file. This file contains the AstraDB class and related methods.                                               

Please add the colbert_live/db/astra.py file to the chat so I can propose the necessary changes.                                       


Tokens: 5.7k sent, 76 received. Cost: $0.02 message, $0.85 session.
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
colbert_live/db/astra.py                                                                                                               
> /clear                                                                                                                               

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
colbert_live/db/astra.py                                                                                                               
> add a `verbose` flag to the `AstraDB` constructor, and "if self.verbose: print(...)" statements where it makes sense                 


To implement the verbose flag in the AstraDB constructor and add appropriate print statements, we'll need to modify the                
colbert_live/db/astra.py file. This file contains the AstraDB class definition and related methods.                                    

Before I can propose any changes, I need you to add the colbert_live/db/astra.py file to the chat. Once you've done that, I can provide
the necessary SEARCH/REPLACE blocks to implement the requested changes.                                                                


Tokens: 4.9k sent, 104 received. Cost: $0.02 message, $0.87 session.
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
colbert_live/db/astra.py                                                                                                               
> /clear                                                                                                                               

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
colbert_live/db/astra.py                                                                                                               
> /drop                                                                                                                                

Dropping all files from the chat session.
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> /add colbert_live/db/astra.py                                                                                                        

Added /home/jonathan/Projects/colbert-live/colbert_live/db/astra.py to the chat
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
colbert_live/db/astra.py                                                                                                               
> add a `verbose` flag to the `AstraDB` constructor, and "if self.verbose: print(...)" statements where it makes sense                 


Certainly! I'll add a verbose flag to the AstraDB constructor and include "if self.verbose: print(...)" statements where appropriate.  
Here are the changes:                                                                                                                  

Version and model info

Aider v0.57.1
Main model: claude-3-5-sonnet-20240620 with diff edit format, infinite output
Weak model: claude-3-haiku-20240307
Git repo: .git with 15 files
Repo-map: using 1024 tokens

@fry69 fry69 added the question Further information is requested label Sep 23, 2024
@paul-gauthier
Copy link
Collaborator

Are you sure astra.py wasn't part of the chat as a read-only file? In that case the LLM can't edit it until you properly /add it.

@jbellis
Copy link
Contributor Author

jbellis commented Oct 7, 2024

I can't say for sure. Would you be open to a PR to mark read-only files in the session differently than read/write files?

@paul-gauthier
Copy link
Collaborator

Sure. Been trying to think of a nice, compact and intuitive way to display that distinction.

@fry69
Copy link
Collaborator

fry69 commented Oct 8, 2024

Just mark the read/write files with a *.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
3 participants