Pydantic Models¶
models
¶
Mirumoji API Pydantic Models.
AnkiExportResponse
¶
BreakdownRequest
¶
BreakdownResponse
¶
Pydantic Model for the /gpt/breakdown
response.
BreakdownResponse
¶
Bases: BaseModel
Pydantic Model for the /gpt/breakdown
response.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sentence
|
str
|
The analyzed sentence. |
required |
focus
|
FocusInfo
|
The |
required |
tokens
|
List[Token]
|
List of |
required |
gpt_explanation
|
str
|
The GPT API call response. |
required |
ChatRequest
¶
ClipResponse
¶
Pydantic Model for the /profile/clips
request.
CustomBreakdownRequest
¶
Pydantic Model for the /gpt/custom_breakdown
request.
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 |
DictLookup
¶
Pydantic Model representing information about a dictionary
lookup word used by /dict/word
endpoint.
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[JMEntry]
|
List of JMEntry models. |
required |
jmnentries
|
List[JMNEntry]
|
List of JMNEntry models. |
required |
kanji
|
List[KanjiInfo]
|
List of KanjiInfo models. |
required |
meanings
|
List[str]
|
List of gloss strings from the first entry's sense |
required |
jlpt
|
str
|
JLPT vocabulary level for the word or 'Unkonwn' |
required |
examples
|
List[str]
|
List of example sentences. |
required |
DictWildcardLookup
¶
Pydantic Model representing information about a wilcard
dictionary lookup pattern used by /dict/wildcard
endpoint.
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[JMEntry]
|
List of JMEntry models. |
required |
jmnentries
|
List[JMNEntry]
|
List of JMNEntry models. |
required |
kanji
|
List[KanjiInfo]
|
List of KanjiInfo models. |
required |
examples
|
List[str]
|
List of example sentences. |
required |
FocusInfo
¶
Pydantic Model representing information about the focus word of a sentence breakdown request.
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[str]
|
List of meanings for the word. |
required |
jlpt
|
str
|
JLPT vocabulary level for the word or 'Unkonwn' |
required |
examples
|
List[str]
|
List of example sentences. |
required |
GptTemplateBase
¶
Pydantic Model representing the base for a profile's gpt template.
GptTemplateResponse
¶
Pydantic Model representing the response of profile/gpt_template
endpoint.
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
¶
Pydantic Model representing a single JMDictEntry for a word.
JMEntry
¶
Bases: BaseModel
Pydantic Model representing a single JMDictEntry for a queried word.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rank
|
int
|
Priority rank for entry |
required |
kana
|
List[str]
|
List of kana readings |
required |
kanji
|
List[str]
|
List of kanji readings |
required |
senses
|
List[WordSense]
|
List of WordSense models |
required |
JMNEntry
¶
Pydantic Model representing a single JMNeDictEntry for a word.
JMNEntry
¶
Bases: BaseModel
Pydantic Model representing a single JMNeDictEntry for a queried word.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kana
|
List[str]
|
List of kana readings |
required |
kanji
|
List[str]
|
List of kanji readings |
required |
translation_type
|
str
|
Type of name |
required |
gloss
|
List[str]
|
List of translation strings |
required |
KanjiInfo
¶
Pydantic Model representing a single Kanji entry from KANJIDIC2
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
¶
Pydantic Model representing the response of profile/files
endpoint.
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
¶
Pydantic Model representing the response of profile/transcripts
endpoint.
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 |
WordSense
¶
Pydantic Model representing a single sense on a JMDictEntry model