Spaces:
Sleeping
Sleeping
File size: 952 Bytes
ea24308 fd7ae53 ea24308 df21017 100cdde ea24308 fd7ae53 df21017 fd7ae53 ea24308 9f7d07d ea24308 fd7ae53 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
import typer
from rich import print
from .chat import chat as chat_plugin
app = typer.Typer(help="RepoSage Synth CLI")
@app.command()
def hello(name: str = "world"):
"""Warm-up command: prints Hello, {name}!"""
print(f"[bold green]Hello, {name}![/]")
@app.command()
def heatmap():
"""Show token-similarity heatmap from tensor.pt."""
# import here so chat() doesn’t drag in sklearn
from .heatmap import get_heatmap_figure
get_heatmap_figure()
@app.command()
def chat(question: str = typer.Argument(..., help="Question to ask RepoSage")):
"""Invoke the embedding Q&A."""
response = chat_plugin(question)
print(response)
@app.command()
def transform(prompt: str = typer.Argument(..., help="Prompt for transformer demo")):
"""Invoke the single‐block transformer next-token demo."""
from .transformer_demo import transformer_next
print(transformer_next(prompt))
if __name__ == "__main__":
app()
|