diff --git a/scripts/prompt.js b/scripts/prompt.js index 38ef5b7..3a38eeb 100644 --- a/scripts/prompt.js +++ b/scripts/prompt.js @@ -5,7 +5,7 @@ class Tests { #toolkit; constructor () { - this.#key = process.env.GoogleGenAIKey + this.#key = process.env.GoogleGenAIKey; this.#toolkit = new GoogleGenAI({ apiKey: this.#key }); } @@ -15,6 +15,19 @@ class Tests { "contents": contents }); + return response; + }; + + async analyzefile (model, message, files) { + const contents = [ + { text: message }, ...files + ]; + + const response = await this.#toolkit.models.generateContent({ + model: model, + contents: contents + }); + return response; } }