imseldrith's picture
Initial upload from Colab
9e27976 verified
raw
history blame contribute delete
535 Bytes
import { Hono } from "hono"
import { forwardError } from "~/lib/error"
import { handleCountTokens } from "./count-tokens-handler"
import { handleCompletion } from "./handler"
export const messageRoutes = new Hono()
messageRoutes.post("/", async (c) => {
try {
return await handleCompletion(c)
} catch (error) {
return await forwardError(c, error)
}
})
messageRoutes.post("/count_tokens", async (c) => {
try {
return await handleCountTokens(c)
} catch (error) {
return await forwardError(c, error)
}
})