This is an attempt to use OpenAI Assistant to review CVs.
Create a virtual environment and install the requirements:
python3 -m venv path/to/venv
pip install -r requirements.txt
Run the server:
flask --app src/tallkotte run [--debug] [--port PORT]
POST /message
Content-Type: application/json
{"text": "Summarize the CV of John Doe"}
This returns a Message object, as shown below:
{
"content": [
"Summarize the CV of John Doe"
],
"created_at": 1711992736,
"id": "msg_B2GTTdyAxzyC2aeSQJi3P1Xf",
"role": "user",
"run_id": "run_ClD5W2INBdLoiYJGBzWmwDhA",
"thread_id": "thread_uaw30EcQnmQceaXLNaZy9vpT"
}
The id
of the message should be used to make the request to get the response.
GET /messages/msg_B2GTTdyAxzyC2aeSQJi3P1Xf/response HTTP/1.1
Host: <host:port>
This returns the response to the specified message.
[
{
"content": [
"John Doe's experience is as follows...."
],
"created_at": 1711992737,
"id": "msg_jnp9ITGeT59ZhokkVjrNgU4p",
"role": "assistant",
"run_id": "run_ClD5W2INBdLoiYJGBzWmwDhA",
"thread_id": "thread_uaw30EcQnmQceaXLNaZy9vpT"
}
]