@@ -82,7 +82,7 @@ def to_answer_style(x: AnswerStyleOptions) -> AnswerStyle:
82
82
def _make_grounding_passages (source : GroundingPassagesOptions ) -> protos .GroundingPassages :
83
83
"""
84
84
Converts the `source` into a `protos.GroundingPassage`. A `GroundingPassages` contains a list of
85
- `protos.GroundingPassage` objects, which each contain a `protos.Contant ` and a string `id`.
85
+ `protos.GroundingPassage` objects, which each contain a `protos.Content ` and a string `id`.
86
86
87
87
Args:
88
88
source: `Content` or a `GroundingPassagesOptions` that will be converted to protos.GroundingPassages.
@@ -191,7 +191,7 @@ def _make_generate_answer_request(
191
191
single question to answer. For multi-turn queries, this is a repeated field that contains
192
192
conversation history and the last `Content` in the list containing the question.
193
193
inline_passages: Grounding passages (a list of `Content`-like objects or `(id, content)` pairs,
194
- or a `protos.GroundingPassages`) to send inline with the request. Exclusive with `semantic_retreiver `,
194
+ or a `protos.GroundingPassages`) to send inline with the request. Exclusive with `semantic_retriever `,
195
195
one must be set, but not both.
196
196
semantic_retriever: A Corpus, Document, or `protos.SemanticRetrieverConfig` to use for grounding. Exclusive with
197
197
`inline_passages`, one must be set, but not both.
@@ -267,7 +267,7 @@ def generate_answer(
267
267
>>> my_corpus = retriever.get_corpus('my_corpus')
268
268
>>> genai.generate_answer(
269
269
... content=question,
270
- ... semantic_retreiver =my_corpus
270
+ ... semantic_retriever =my_corpus
271
271
... )
272
272
273
273
@@ -276,7 +276,7 @@ def generate_answer(
276
276
contents: The question to be answered by the model, grounded in the
277
277
provided source.
278
278
inline_passages: Grounding passages (a list of `Content`-like objects or (id, content) pairs,
279
- or a `protos.GroundingPassages`) to send inline with the request. Exclusive with `semantic_retreiver `,
279
+ or a `protos.GroundingPassages`) to send inline with the request. Exclusive with `semantic_retriever `,
280
280
one must be set, but not both.
281
281
semantic_retriever: A Corpus, Document, or `protos.SemanticRetrieverConfig` to use for grounding. Exclusive with
282
282
`inline_passages`, one must be set, but not both.
@@ -330,7 +330,7 @@ async def generate_answer_async(
330
330
contents: The question to be answered by the model, grounded in the
331
331
provided source.
332
332
inline_passages: Grounding passages (a list of `Content`-like objects or (id, content) pairs,
333
- or a `protos.GroundingPassages`) to send inline with the request. Exclusive with `semantic_retreiver `,
333
+ or a `protos.GroundingPassages`) to send inline with the request. Exclusive with `semantic_retriever `,
334
334
one must be set, but not both.
335
335
semantic_retriever: A Corpus, Document, or `protos.SemanticRetrieverConfig` to use for grounding. Exclusive with
336
336
`inline_passages`, one must be set, but not both.
0 commit comments