neuralmesh / microservergen

Serves as the template to enable llms in any gihub project
GNU General Public License v3.0
0 stars 0 forks source link

make it use langchain #2

Open m-c-frank opened 9 months ago

m-c-frank commented 9 months ago

the goal for now is to implement the microservergen to use langchain for long term sustainability.

the steps towards the bigger picture are:

  1. fetch the current README.md of this project
  2. make it more concise for this particular task while losing zero information, perhaps even increase the amount of information. the ratio of information gain to reduction of tokens representing the readme content needs to be extremely good.
  3. to do that use prompt engineering tricks to make a foundational llm understand that it needs to respond in a clear concise professional and neutral language. and only do exactly what was asked and really focus on what needs to be done right now with the asymptotically fewest steps possible.
  4. then we will actually change the microservergen.sh file which sets up the actual server
  5. then we will need to make sure it works.

so for now. if you have any questions please let me know now before we begin.

m-c-frank commented 9 months ago

yes i fully understand. for now i think you mean that we need to run the curl command to get the current README.md file

m-c-frank commented 9 months ago

yes exactly! but in the future i would have needed you to respond with:

  1. Fetch the current README.md of the project using the provided textraw-server endpoint:
    run
    curl http://2.201.132.120:8000/neuralmesh/microservergen/main/README.md
m-c-frank commented 9 months ago

okay i think i really understand now. i will do exactly that to make sure that we reach the goal in as few steps as possible.

m-c-frank commented 9 months ago

perfect. the result of the curl response is:

content of file neuralmesh/microservergen/main/README.md

"# microservergen\nThis script, microservergen.sh, automates the creation of a microserver that simulates the functionality described in a textdump.\n\n## Overview\nThe script sets up a FastAPI server inside a Docker container. It's configured to respond with specific implementation details of an issue text dump when accessed via a web URL.\nfor now this will be based on github issues and is using the gh cli to get the entire disccussion history of a particular issue to propose a way to implement it.\n\n## relevant tools\nit also has an understanding of relevant tools for this task. one of which is gitraw-server. where if requried, the server can make a request to and fetch the raw content of a file hosted on github. here is the actual readme textdump of that project:\n\n```bash\nusing the textraw-server to retrieve relevant information (http://2.201.132.120:8000/{user}/{repo}/{branch}/{filepath}). The textraw-server is completely described by the provided script, which includes steps for stopping conflicting Docker containers, creating a server script for a FastAPI application, managing dependencies, setting up Docker, and deploying the FastAPI server. My approach is to offer clear, actionable advice based on the user's query, ensuring the solutions are straightforward and tailored to specific needs.\n```\n\n## Key Features\nDocker Container Management: Stops any conflicting Docker containers using port 8000.\nFastAPI Server: Creates a Python FastAPI server script to handle HTTP GET requests.\nDocker and Docker Compose Setup: Includes Dockerfile and docker-compose.yml for containerization and orchestration.\nAutomatic Build and Deployment: Builds and deploys the Docker container, making the server accessible on localhost:8000.\n## How to Use\nRun ./microservergen.sh.\nAccess the server at http://localhost:8000/{owner}/{repo}/{issue_number}.\nPrerequisites\nDocker and Docker Compose should be installed on your machine.\n## Testing\nThe script includes an optional curl command for testing: curl -f \"http://localhost:8000/m-c-frank/apimesh/main/gitraw-server.sh\".\n"

now continue with step 2.:

write a better more concise README.md for this particular task while losing zero information, perhaps even increase the amount of information. the ratio of information gain to reduction of tokens representing the readme content needs to be extremely good. You should now respond with a full README.md which is not too long, you get the point by now i think. make sure you i can just copy paste the entire thing. dont ask any more questions or comment anything

m-c-frank commented 9 months ago

null

github-actions[bot] commented 9 months ago

.

microservergen

This script automates the creation of a microserver that simulates the functionality described in a textdump.

Overview

This script sets up a FastAPI server inside a Docker container. It's configured to respond with specific implementation details of an issue text dump when accessed via a web URL. It also has an understanding of relevant tools for this task. One of which is gitraw-server, which makes a request to and fetches the raw content of a file hosted on GitHub.

Key Features

How to Use