Skip to content

Latest commit

 

History

History
428 lines (265 loc) · 10.4 KB

modules.md

File metadata and controls

428 lines (265 loc) · 10.4 KB

chatgpt / Exports

chatgpt

Table of contents

Classes

Type Aliases

Functions

Type Aliases

AvailableModerationModels

Ƭ AvailableModerationModels: "text-moderation-playground"

Defined in

src/types.ts:109


ContentType

Ƭ ContentType: "text"

Defined in

src/types.ts:1


ConversationJSONBody

Ƭ ConversationJSONBody: Object

https://chat.openapi.com/backend-api/conversation

Type declaration

Name Type Description
action string The action to take
conversation_id? string The ID of the conversation
messages Prompt[] Prompts to provide
model string The model to use
parent_message_id string The parent message ID

Defined in

src/types.ts:134


ConversationResponseEvent

Ƭ ConversationResponseEvent: Object

Type declaration

Name Type
conversation_id? string
error? string | null
message? Message

Defined in

src/types.ts:251


Message

Ƭ Message: Object

Type declaration

Name Type
content MessageContent
create_time string | null
end_turn null
id string
metadata MessageMetadata
recipient string
role string
update_time string | null
user string | null
weight number

Defined in

src/types.ts:257


MessageContent

Ƭ MessageContent: Object

Type declaration

Name Type
content_type string
parts string[]

Defined in

src/types.ts:270


MessageFeedbackJSONBody

Ƭ MessageFeedbackJSONBody: Object

https://chat.openapi.com/backend-api/conversation/message_feedback

Type declaration

Name Type Description
conversation_id string The ID of the conversation
message_id string The message ID
rating MessageFeedbackRating The rating
tags? MessageFeedbackTags[] Tags to give the rating
text? string The text to include

Defined in

src/types.ts:193


MessageFeedbackRating

Ƭ MessageFeedbackRating: "thumbsUp" | "thumbsDown"

Defined in

src/types.ts:249


MessageFeedbackResult

Ƭ MessageFeedbackResult: Object

Type declaration

Name Type Description
conversation_id string The ID of the conversation
message_id string The message ID
rating MessageFeedbackRating The rating
text? string The text the server received, including tags
user_id string The ID of the user

Defined in

src/types.ts:222


MessageFeedbackTags

Ƭ MessageFeedbackTags: "harmful" | "false" | "not-helpful"

Defined in

src/types.ts:220


MessageMetadata

Ƭ MessageMetadata: any

Defined in

src/types.ts:275


Model

Ƭ Model: Object

Type declaration

Name Type Description
is_special boolean Whether or not the model is special
max_tokens number Max tokens of the model
slug string Name of the model

Defined in

src/types.ts:77


ModelsResult

Ƭ ModelsResult: Object

https://chat.openapi.com/backend-api/models

Type declaration

Name Type Description
models Model[] Array of models

Defined in

src/types.ts:70


ModerationsJSONBody

Ƭ ModerationsJSONBody: Object

https://chat.openapi.com/backend-api/moderations

Type declaration

Name Type Description
input string Input for the moderation decision
model AvailableModerationModels The model to use in the decision

Defined in

src/types.ts:97


ModerationsJSONResult

Ƭ ModerationsJSONResult: Object

https://chat.openapi.com/backend-api/moderations

Type declaration

Name Type Description
blocked boolean Whether or not the input is blocked
flagged boolean Whether or not the input is flagged
moderation_id string The ID of the decision

Defined in

src/types.ts:114


Prompt

Ƭ Prompt: Object

Type declaration

Name Type Description
content PromptContent The content of the prompt
id string The ID of the prompt
role Role The role played in the prompt

Defined in

src/types.ts:161


PromptContent

Ƭ PromptContent: Object

Type declaration

Name Type Description
content_type ContentType The content type of the prompt
parts string[] The parts to the prompt

Defined in

src/types.ts:178


Role

Ƭ Role: "user" | "assistant"

Defined in

src/types.ts:3


SendConversationMessageOptions

Ƭ SendConversationMessageOptions: Omit<SendMessageOptions, "conversationId" | "parentMessageId">

Defined in

src/types.ts:286


SendMessageOptions

Ƭ SendMessageOptions: Object

Type declaration

Name Type
abortSignal? AbortSignal
conversationId? string
onConversationResponse? (response: ConversationResponseEvent) => void
onProgress? (partialResponse: string) => void
parentMessageId? string
timeoutMs? number

Defined in

src/types.ts:277


SessionResult

Ƭ SessionResult: Object

https://chat.openapi.com/api/auth/session

Type declaration

Name Type Description
accessToken string The access token
error? string | null If there was an error associated with this request
expires string ISO date of the expiration date of the access token
user User Authenticated user

Defined in

src/types.ts:8


User

Ƭ User: Object

Type declaration

Name Type Description
email? string Email of the user
features string[] Features the user is in
groups string[] Groups the user is in
id string ID of the user
image string Image of the user
name string Name of the user
picture string Picture of the user

Defined in

src/types.ts:30

Functions

markdownToText

markdownToText(markdown?): string

Parameters

Name Type
markdown? string

Returns

string

Defined in

src/utils.ts:4