vcapi-workers / Exports / controllers/openai
Module: controllers/openai
OpenAI 系機能のコントローラー
Table of contents
Variables
Functions
Variables
chatRemapOption
• Const chatRemapOption: Object
Type declaration
| Name | Type |
|---|---|
getMapping | (json: JSONObject) => number[] |
mappingKey | (c: Context) => string |
Defined in
src/controllers/openai.ts:34 (opens in a new tab)
openAiChat
• Const openAiChat: Hono<Env, RemoveBlankRecord<RemoveBlankRecord<RemoveBlankRecord<Schema<"get", "/:gid/talks", unknown, {}> | Schema<"get", "/:gid/talks/create", unknown, {}>> | Schema<"get", "/:gid/talks/:id/append", unknown, {}>> | Schema<"get", "/:gid/talks/:id/delete", unknown, {}>>, "/">
OpenAI Chat の MVC Controller
Defined in
src/controllers/openai.ts:160 (opens in a new tab)
Functions
appendSentence
▸ appendSentence(c): Promise<Response>
既存の会話に続けて入力する。 簡単のため listChatTalks と同じ形のレスポンスを返す
Parameters
| Name | Type |
|---|---|
c | Context |
Returns
Promise<Response>
Defined in
src/controllers/openai.ts:122 (opens in a new tab)
createTalk
▸ createTalk(c): Promise<Response>
新しい会話を作る。簡単のため listChatTalks と同じ形のレスポンスを返す
Parameters
| Name | Type |
|---|---|
c | Context |
Returns
Promise<Response>
Defined in
src/controllers/openai.ts:63 (opens in a new tab)
deleteTalk
▸ deleteTalk(c): Promise<Response>
会話を削除する。 簡単のため listChatTalks と同じ形のレスポンスを返す
Parameters
| Name | Type |
|---|---|
c | Context |
Returns
Promise<Response>
Defined in
src/controllers/openai.ts:147 (opens in a new tab)
listChatTalks
▸ listChatTalks(c): Promise<Response>
会話一覧を返す
Parameters
| Name | Type |
|---|---|
c | Context |
Returns
Promise<Response>
{
chatTalks: {
id: number;
chatSentences: {
role: string;
content: string;
}[]
}