From 10231d2b7d979a1a7063faa22d50b7cd6134587f Mon Sep 17 00:00:00 2001 From: yukimemi Date: Mon, 8 Jan 2024 09:57:40 +0900 Subject: [PATCH] :zap: Remove unused file. --- denops/futago/futago.ts | 2 +- denops/futago/main.ts | 2 +- main.ts | 21 --------------------- 3 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 main.ts diff --git a/denops/futago/futago.ts b/denops/futago/futago.ts index cb330a5..2b8dae6 100644 --- a/denops/futago/futago.ts +++ b/denops/futago/futago.ts @@ -4,7 +4,7 @@ // Last Change : 2024/01/08 09:51:00. // ============================================================================= -import { ensure, is } from "https://deno.land/x/unknownutil@v3.11.0/mod.ts"; +import { ensure, is } from "https://deno.land/x/unknownutil@v3.13.0/mod.ts"; import { ChatSession, GenerateContentStreamResult, diff --git a/denops/futago/main.ts b/denops/futago/main.ts index 4ca6b7c..96962ec 100644 --- a/denops/futago/main.ts +++ b/denops/futago/main.ts @@ -14,7 +14,7 @@ import * as autocmd from "https://deno.land/x/denops_std@v5.2.0/autocmd/mod.ts"; import * as vars from "https://deno.land/x/denops_std@v5.2.0/variable/mod.ts"; import type { Denops } from "https://deno.land/x/denops_std@v5.2.0/mod.ts"; import xdg from "https://deno.land/x/xdg@v10.6.0/src/mod.deno.ts"; -import { assert, is } from "https://deno.land/x/unknownutil@v3.11.0/mod.ts"; +import { assert, is } from "https://deno.land/x/unknownutil@v3.13.0/mod.ts"; import { ensureFile } from "https://deno.land/std@0.211.0/fs/mod.ts"; import { getLogger, handlers, setup } from "https://deno.land/std@0.211.0/log/mod.ts"; import { join } from "https://deno.land/std@0.211.0/path/mod.ts"; diff --git a/main.ts b/main.ts deleted file mode 100644 index 3f52f4b..0000000 --- a/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ensure, is } from "https://deno.land/x/unknownutil@v3.11.0/mod.ts"; -import { GoogleGenerativeAI } from "npm:@google/generative-ai"; - -// Access your API key as an environment variable (see "Set up your API key" above) -const genAI = new GoogleGenerativeAI( - ensure(Deno.env.get("GEMINI_API_KEY"), is.String), -); - -async function run() { - // For text-only input, use the gemini-pro model - const model = genAI.getGenerativeModel({ model: "gemini-pro" }); - - const prompt = "あなたの名前はなんですか?"; - - const result = await model.generateContent(prompt); - const response = await result.response; - const text = response.text(); - console.log(text); -} - -run();