Pydantic Models¶
AnkiExportResponse
¶
Bases: BaseModel
Pydantic Model for Anki Export Endpoint Response
Parameters:
Name | Type | Description | Default |
---|---|---|---|
anki_deck_url
|
str
|
The media URL from FastAPI stactic media serving to the deck file. |
required |
BreakdownRequest
¶
BreakdownResponse
¶
ChatRequest
¶
ClipResponse
¶
CustomBreakdownRequest
¶
Bases: BaseModel
Pydantic Model for the /gpt/custom_breakdown
request.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sentence
|
str
|
The sentence to analyze |
required |
focus
|
str
|
The optinal focus word. |
required |
sysMsg
|
str
|
The custom system message for the model. |
required |
prompt
|
str
|
The custom prompt for the model. |
required |
version
|
str
|
The custom model version |
required |
ClipResponse
¶
DictLookup
¶
Bases: BaseModel
Pydantic Model representing information extracted from kotobase for a query word.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
word
|
str
|
Query word. |
required |
jmentries
|
list
|
List of JMEntry models. |
required |
jmnentries
|
list
|
List of JMNEntry models. |
required |
kanji
|
list
|
List of KanjiInfo models. |
required |
meanings
|
list
|
List of gloss strings from the first entry's sense |
required |
jlpt
|
str
|
JLPT vocabulary level for the word or 'Unkonwn' |
required |
examples
|
list
|
List of example sentences. |
required |
DictWildcardLookup
¶
Bases: BaseModel
Pydantic Model representing information extracted from kotobase for a query word.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pattern
|
str
|
Query word. |
required |
jmentries
|
list
|
List of JMEntry models. |
required |
jmnentries
|
list
|
List of JMNEntry models. |
required |
kanji
|
list
|
List of KanjiInfo models. |
required |
examples
|
list
|
List of example sentences. |
required |
FocusInfo
¶
Bases: BaseModel
Pydantic Model representing information about the focus word of a sentence breakdown request.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
word
|
str
|
Word to breakdown. |
required |
reading
|
str
|
Word Kana. |
required |
meanings
|
list
|
List of meanings for the word. |
required |
jlpt
|
str
|
JLPT vocabulary level for the word or 'Unkonwn' |
required |
examples
|
list
|
List of example sentences. |
required |
GptTemplateBase
¶
GptTemplateResponse
¶
Bases: GptTemplateBase
Pydantic Model representing the response of profile/gpt_template
endpoint.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The database ID of the template. |
required |
JMEntry
¶
JMNEntry
¶
Bases: BaseModel
Pydantic Model representing a single JMNeDictEntry for a queried word.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kana
|
list
|
List of kana readings |
required |
kanji
|
list
|
List of kanji readings |
required |
translation_type
|
str
|
Type of name |
required |
gloss
|
list
|
List of translation strings |
required |
KanjiInfo
¶
Bases: BaseModel
Pydantic Model representing a single Kanji entry from KANJIDIC2
Parameters:
Name | Type | Description | Default |
---|---|---|---|
literal
|
str
|
String of Kanji Literal |
required |
grade
|
int
|
Optional Integer of Japanese Grade in which Kanji is learned |
required |
stroke_count
|
int
|
Integer representing number of strokes in handwriting. |
required |
meanings
|
List[str]
|
List of String representing known meanings. |
required |
onyomi
|
List[str]
|
List of strings representing on readings. |
required |
kunyomi
|
List[str]
|
List of strings representing kun readings. |
required |
jlpt_kanjidic
|
int
|
Optional Integer representing JLPT level in KANJIDIC2 |
required |
jlpt_tanos
|
int
|
Optional Integer representing JLPT level in Tanos list. |
required |
ProfileFileResponse
¶
Bases: BaseModel
Pydantic Model representing the response of profile/files
endpoint.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The database ID of the file |
required |
file_name
|
str
|
Base file name. |
required |
get_url
|
str
|
URL where FastAPI is serving the stactic file. |
required |
file_type
|
str
|
Optional information about file. |
required |
created_at
|
str
|
Optional creation date information. |
required |
ProfileTranscriptResponse
¶
Bases: BaseModel
Pydantic Model representing the response of profile/transcripts
endpoint.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The database ID of the transcript |
required |
transcript
|
str
|
Transcript text. |
required |
original_file_name
|
str
|
Optional name of the audio file transcribed. |
required |
gpt_explanation
|
str
|
Optional GPT explanation for the transcription if it was created. |
required |
get_url
|
str
|
Optional URL where FastAPI is serving the transcribed audio file |
required |
created_at
|
str
|
Optional information about creation date. |
required |