lmg-anon / mikupad

LLM Frontend in a single html file
https://lmg-anon.github.io/mikupad/mikupad.html
Creative Commons Zero v1.0 Universal
233 stars 26 forks source link

Encode/Decode request body #39

Open AlpinDale opened 7 months ago

AlpinDale commented 7 months ago

Hi! I've been trying to use mikupad with my custom OpenAI API server, but I don't have a /v1/token/encode endpoint. I was adding it, but unsure what the request body looks like from mikupad's side, and what sort of response it expects.

lmg-anon commented 6 months ago

The /v1/token/encode endpoint belongs to the tabby API. The request is a JSON object with a single text field, and the response is a list of tokens. You can also add the /v1/internal/token-count endpoint, which returns a JSON object with a length field indicating the token count.