Class: ChatCompletionsHandler
- Inherits:
-
Tep::Handler
- Object
- Tep::Handler
- ChatCompletionsHandler
- Defined in:
- lib/toy/serve/openai/handlers.rb
Instance Method Summary collapse
Instance Method Details
#handle(req, res) ⇒ Object
118 119 120 121 122 123 124 |
# File 'lib/toy/serve/openai/handlers.rb', line 118 def handle(req, res) res.headers["Content-Type"] = "application/json" res.set_status(501) "{\"error\":{\"message\":\"chat/completions requires a tokenizer; " + "this server speaks IDs only. Use POST /v1/completions with " + "prompt as an int array.\",\"type\":\"not_implemented\"}}\n" end |