mirror of
https://github.com/senju1337/senju.git
synced 2025-12-23 23:39:27 +00:00
refactor: Apply precommit autochanges
This commit is contained in:
parent
e6da82595a
commit
ab47d13938
5 changed files with 37 additions and 34 deletions
|
|
@ -3,10 +3,13 @@
|
|||
# For the full list of built-in configuration values, see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.abspath("../../senju"))
|
||||
|
||||
project = 'senju'
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from flask import (Flask, redirect, render_template, request, url_for,
|
||||
send_from_directory)
|
||||
from flask import (Flask, redirect, render_template, request,
|
||||
send_from_directory, url_for)
|
||||
|
||||
from senju.haiku import Haiku
|
||||
from senju.store_manager import StoreManager
|
||||
|
||||
import os
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
store = StoreManager(Path("/tmp/store.db"))
|
||||
|
|
@ -121,7 +120,8 @@ def generate_haiku():
|
|||
API endpoint to generate a new haiku based on the provided prompt.
|
||||
|
||||
Accepts POST requests with JSON data containing a 'prompt' field.
|
||||
Generates a haiku using the prompt, saves it to the store, and returns the ID.
|
||||
Generates a haiku using the prompt, saves it to the store,
|
||||
and returns the ID.
|
||||
|
||||
Returns:
|
||||
str: The ID of the newly created haiku if method is POST.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue