Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written)
OpenAssistant Conversations (oasst2)
Create a simple web server using the Python framework FastAPI that returns "Hello,…
In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
- User
Create a simple web server using the Python framework FastAPI that returns "Hello, world!" to the user upon loading the website in a web browser. The text should be formatted as an HTML heading of type h1.
- Assistant
from fastapi import FastAPI app = FastAPI() @app.get("/") def hello_world(): return "<h1>Hello, world!</h1>" if __name__ == "__main__": app.run(debug=True)In the code above, the
FastAPIclass is imported from thefastapimodule. An instance of theFastAPIclass is then created and stored in the app variable. The@app.get("/")decorator creates a route for the root URL ("/") and returns the string"<h1>Hello, world!</h1>"as the response. Finally, theapp.run(debug=True)method is called to start the FastAPI web server in debug mode.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)