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

[Feat]: Contextual Code Additions. #210

Open
samyakkkk opened this issue Feb 11, 2024 · 1 comment
Open

[Feat]: Contextual Code Additions. #210

samyakkkk opened this issue Feb 11, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@samyakkkk
Copy link
Contributor

Is your feature request related to a problem?

FlutterGPT currently passes contextual code of all classes/methods referred in the current file by fetching it with Dart Analysis Server.

However, for optimisation reasons, we just limit ourselves to the code inside the current project. This could be a problem when users are using submodules or are using new versions of packages or unpopular packages not understood by the default model.****

Describe the solution that you'd like

We need a smart algorithm to figure out what context to include and not include and also assign weightage to each of them so we can shortlist or filter when running short on token limit.

Let's think of all possible cases, - including when using stateful widgets, variables, generated code, packages code etc. and how to include them.

Describe alternatives that you have considered

No response

Additional Information

No response

Acceptance Criteria

After thorough discussion and once approved by everyone in the team, then only we will start to implement.

@samyakkkk samyakkkk added the enhancement New feature or request label Feb 11, 2024
@samyakkkk
Copy link
Contributor Author

Putting all contextual code that should be included in order of priority:

  • From the current project
  • From other local projects (submodules etc).
  • From published packages.

What to include depending on if the code object is from 1,2 or 3.

  • Entire Code File [1] [10000 tokens truncated]
  • Entire Code Object [2] [8000 tokens truncated]
  • Only the used function with other function signatures [6000 tokens truncated]

(Open to further suggestions)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: In Progress
Development

No branches or pull requests

1 participant