Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written)
OpenAssistant Conversations (oasst2)
Can you give me an example of a python script that opens an api point and serves a string?
In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
- User
Can you give me an example of a python script that opens an api point and serves a string?
- Assistant
Here's a simple example of a Flask server in Python which creates an endpoint which sends a string back to a user:
from flask import Flask, request app = Flask(__name__) @app.route('/', methods=['POST']) def echo(): request_body = request.get_json(force=True) return request_body['input'] app.run(port=3000)This application can be tested with curl as:
curl -X POST -H 'Content-Type: application/json' -d '{"input": "Hello server"}' http://127.0.0.1:3000/
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)