Skip to content

Commit

Permalink
chore(docs): add deleted readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ddayto21 committed Feb 5, 2025
1 parent 386562f commit 336fd60
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
API Design

Define a single POST /search-books operation in the openapi spec

Use JSON schemas for request, response, and errors.

The request body has a single property “query” (string).

The response returns either a successful JSON with “recommendations” (an array of objects containing “title,” “authors,” and “description”) and possibly a top-level “message” for moderation warnings, or an error JSON if something fails.

Include a “Book” model with fields “title” (string), “authors” (array of strings), and “description” (string). Define an “Error” model with “code” (string or integer) and “message” (string) for any issues like profanity detection or OpenLibrary/LLM failures. Specify 400 or 403 for validation/moderation errors, and 500 for system errors.

Add documentation to describe LLM integration for query processing and response generation, and that the backend uses OpenLibrary based on the LLM-refined query.

Keep the latency requirement in mind: the spec can’t be overly complex or add extra synchronous calls.

0 comments on commit 336fd60

Please sign in to comment.