diff --git a/functions/most_popular_repo_bedrock_agent/github_agent_actions/index.py b/functions/most_popular_repo_bedrock_agent/github_agent_actions/index.py index 4d1f932c..7391f38b 100644 --- a/functions/most_popular_repo_bedrock_agent/github_agent_actions/index.py +++ b/functions/most_popular_repo_bedrock_agent/github_agent_actions/index.py @@ -50,11 +50,9 @@ def get_github_repository_readme_agent_action(input): .get_readme() .decoded_content.decode("utf-8") ) - if len(readme_content) > 10000: - response = ( - f"Here are the first 10,000 characters of the README for {input}." - ) - response += "\n" + readme_content[:10000] + if len(readme_content) > 5000: + response = f"Here are the first 5,000 characters of the README for {input}." + response += "\n" + readme_content[:5000] else: response = f"Here are the full contents of the README for {input}." response += "\n" + readme_content diff --git a/functions/most_popular_repo_langchain/index.py b/functions/most_popular_repo_langchain/index.py index 44355087..1b618591 100644 --- a/functions/most_popular_repo_langchain/index.py +++ b/functions/most_popular_repo_langchain/index.py @@ -54,10 +54,10 @@ def get_github_repo_readme(input): .get_readme() .decoded_content.decode("utf-8") ) - if len(readme_content) > 10000: - response = f"Here are the first 10,000 characters of the README for {input}, inside XML tags." + if len(readme_content) > 5000: + response = f"Here are the first 5,000 characters of the README for {input}, inside XML tags." response += "\n" - response += "\n" + readme_content[:10000] + response += "\n" + readme_content[:5000] else: response = ( f"Here is the README for {input}, inside XML tags."