@@ -29,6 +29,15 @@ import { ApiSettings } from '../types/internal';
2929import { BackendType } from '../public-types' ;
3030import * as GoogleAIMapper from '../googleai-mappers' ;
3131
32+ /**
33+ * Generates a content stream from a request body.
34+ *
35+ * @param apiSettings The {@link ApiSettings} to use for the request.
36+ * @param model The model to use for the request.
37+ * @param params The {@link GenerateContentRequest} to send.
38+ * @param requestOptions The {@link RequestOptions} to use for the request.
39+ * @returns The {@link GenerateContentStreamResult} from the request.
40+ */
3241export async function generateContentStream (
3342 apiSettings : ApiSettings ,
3443 model : string ,
@@ -49,6 +58,16 @@ export async function generateContentStream(
4958 return processStream ( response , apiSettings ) ;
5059}
5160
61+ /**
62+ * Generates content from a request body.
63+ *
64+ * @param apiSettings The {@link ApiSettings} to use for the request.
65+ * @param model The model to use for the request.
66+ * @param params The {@link GenerateContentRequest} to send.
67+ * @param requestOptions The {@link RequestOptions} to use for the request.
68+ * @returns The {@link GenerateContentResult} from the request.
69+ */
70+
5271export async function generateContent (
5372 apiSettings : ApiSettings ,
5473 model : string ,
@@ -73,6 +92,13 @@ export async function generateContent(
7392 } ;
7493}
7594
95+ /**
96+ * Processes a generate content response from a request.
97+ *
98+ * @param response The {@link Response} to process.
99+ * @param apiSettings The {@link ApiSettings} to use for the request.
100+ * @returns The {@link GenerateContentResponse} from the request.
101+ */
76102async function processGenerateContentResponse (
77103 response : Response ,
78104 apiSettings : ApiSettings ,
0 commit comments