File size: 6,557 Bytes
fcaa164 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
openapi: 3.0.1
info:
title: Speak
description: Learn how to say anything in another language with Speak, your AI-powered language tutor.
version: 'v1'
servers:
- url: https://api.speak.com
paths:
/v1/public/openai/translate:
post:
operationId: translate
summary: Translate and explain how to say a specific phrase or word in another language.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/translateRequest'
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/translateResponse'
/v1/public/openai/explain-phrase:
post:
operationId: explainPhrase
summary: Explain the meaning and usage of a specific foreign language phrase that the user is asking about.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/explainPhraseRequest'
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/explainPhraseResponse'
/v1/public/openai/explain-task:
post:
operationId: explainTask
summary: Explain the best way to say or do something in a specific situation or context with a foreign language. Use this endpoint when the user asks more general or high-level questions.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/explainTaskRequest'
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/explainTaskResponse'
components:
schemas:
translateRequest:
type: object
required:
- phrase_to_translate
- learning_language
- native_language
- additional_context
- full_query
properties:
phrase_to_translate:
type: string
description: Phrase or concept to translate into the foreign language and explain further.
learning_language:
type: string
description: The foreign language that the user is learning and asking about. Always use the full name of the language (e.g. Spanish, French).
native_language:
type: string
description: The user's native language. Infer this value from the language the user asked their question in. Always use the full name of the language (e.g. Spanish, French).
additional_context:
type: string
description: A description of any additional context in the user's question that could affect the explanation - e.g. setting, scenario, situation, tone, speaking style and formality, usage notes, or any other qualifiers.
full_query:
type: string
description: Full text of the user's question.
translateResponse:
type: object
properties:
explanation:
type: string
description: An explanation of how to say the input phrase in the foreign language.
explainPhraseRequest:
type: object
required:
- foreign_phrase
- learning_language
- native_language
- additional_context
- full_query
properties:
foreign_phrase:
type: string
description: Foreign language phrase or word that the user wants an explanation for.
learning_language:
type: string
description: The language that the user is asking their language question about. The value can be inferred from question - e.g. for "Somebody said no mames to me, what does that mean", the value should be "Spanish" because "no mames" is a Spanish phrase. Always use the full name of the language (e.g. Spanish, French).
native_language:
type: string
description: The user's native language. Infer this value from the language the user asked their question in. Always use the full name of the language (e.g. Spanish, French).
additional_context:
type: string
description: A description of any additional context in the user's question that could affect the explanation - e.g. setting, scenario, situation, tone, speaking style and formality, usage notes, or any other qualifiers.
full_query:
type: string
description: Full text of the user's question.
explainPhraseResponse:
type: object
properties:
explanation:
type: string
description: An explanation of what the foreign language phrase means, and when you might use it.
explainTaskRequest:
type: object
required:
- task_description
- learning_language
- native_language
- additional_context
- full_query
properties:
task_description:
type: string
description: Description of the task that the user wants to accomplish or do. For example, "tell the waiter they messed up my order" or "compliment someone on their shirt"
learning_language:
type: string
description: The foreign language that the user is learning and asking about. The value can be inferred from question - for example, if the user asks "how do i ask a girl out in mexico city", the value should be "Spanish" because of Mexico City. Always use the full name of the language (e.g. Spanish, French).
native_language:
type: string
description: The user's native language. Infer this value from the language the user asked their question in. Always use the full name of the language (e.g. Spanish, French).
additional_context:
type: string
description: A description of any additional context in the user's question that could affect the explanation - e.g. setting, scenario, situation, tone, speaking style and formality, usage notes, or any other qualifiers.
full_query:
type: string
description: Full text of the user's question.
explainTaskResponse:
type: object
properties:
explanation:
type: string
description: An explanation of the best thing to say in the foreign language to accomplish the task described in the user's question.
|