Skip to content

[CLI] update cli lmcache query engine#2871

Merged
deng451e merged 1 commit intoLMCache:devfrom
deng451e:cli_lmcache_query_update
Mar 26, 2026
Merged

[CLI] update cli lmcache query engine#2871
deng451e merged 1 commit intoLMCache:devfrom
deng451e:cli_lmcache_query_update

Conversation

@deng451e
Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

Special notes for your reviewers:

If applicable:

  • this PR contains user facing changes - docs added
  • this PR contains unit tests

Signed-off-by: deng451e <838677410@qq.com>
@deng451e deng451e requested review from KuntaiDu and sammshen March 25, 2026 23:59
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the lmcache CLI's query engine command by introducing a convenient built-in placeholder for common document loading. This change streamlines the user experience for querying with default lmcache documents and updates the relevant documentation to guide users on its new functionality.

Highlights

  • Built-in Prompt Placeholder: Introduced a new built-in {lmcache} placeholder for the lmcache query engine command, allowing users to easily load a default document without specifying its full path.
  • Documentation Updates: Updated the CLI design and getting started documentation to reflect the new {lmcache} placeholder and clarify the --prompt argument's capabilities for custom and built-in documents.
  • Code Refactoring: Refactored the import of transformers.AutoTokenizer in lmcache/cli/prompt.py to be lazy-loaded within the _load_tokenizer function, potentially improving startup performance or dependency management.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces built-in document placeholders for the query engine CLI command, allowing users to reference predefined documents like {lmcache} directly in prompts. It also refactors the transformers library import to be lazy-loaded within the _load_tokenizer function. Feedback indicates that tests are missing for the new built-in placeholder feature, the resolve_documents docstring needs updating to reflect the new functionality, and the lazy-loading of the transformers import violates project conventions for import placement.

Comment thread lmcache/cli/prompt.py
Comment thread lmcache/cli/prompt.py
Comment thread lmcache/cli/prompt.py
Copy link
Copy Markdown
Contributor

@KuntaiDu KuntaiDu left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Copy Markdown
Contributor

@sammshen sammshen left a comment

Choose a reason for hiding this comment

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

LGTM!

@deng451e deng451e enabled auto-merge (squash) March 26, 2026 23:02
@github-actions github-actions Bot added the full Run comprehensive tests on this PR label Mar 26, 2026
@deng451e deng451e merged commit 4c15a24 into LMCache:dev Mar 26, 2026
56 of 58 checks passed
jooho-XCENA pushed a commit to xcena-dev/LMCache that referenced this pull request Apr 2, 2026
update cli lmcache query

Signed-off-by: deng451e <838677410@qq.com>
jooho-XCENA pushed a commit to xcena-dev/LMCache that referenced this pull request Apr 2, 2026
update cli lmcache query

Signed-off-by: deng451e <838677410@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full Run comprehensive tests on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants