INNER CODE UNIT · Python

analysis_token_limit

mrwadams/stride-gpt · apps/web/main.py:587

    analysis_token_limit = int(token_limit * 0.7)

    # Progress bar for GitHub analysis
    progress_bar = st.progress(0)
    status_text = st.empty()
    status_text.text("Analyzing repository structure...")

    # First, get the README to prioritize it
    readme_content = ""
    readme_tokens = 0
    try:
        readme_file = repo.get_contents("README.md", ref=default_branch)
        readme_content = base64.b64decode(readme_file.content).decode()
        readme_tokens = estimate_tokens(readme_content, token_estimation_model)
    except GithubException:
        try:
            # Try lowercase readme.md as fallback
            readme_file = repo.get_contents("readme.md", ref=default_branch)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…