This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "redis_test" | |
version = "0.1.0" | |
edition = "2021" | |
publish = false | |
[dependencies] | |
redis = "0.32" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "redis_test" | |
version = "0.1.0" | |
edition = "2021" | |
publish = false | |
[dependencies] | |
redis = "0.32" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "workers-rs-2" | |
version = "0.1.0" | |
edition = "2021" | |
# https://github.com/rustwasm/wasm-pack/issues/1247 | |
[package.metadata.wasm-pack.profile.release] | |
wasm-opt = false | |
[lib] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GOOGLE_GENAI_USE_VERTEXAI=FALSE | |
GOOGLE_API_KEY="key" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GOOGLE_GENAI_USE_VERTEXAI=FALSE | |
GOOGLE_API_KEY="key" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { generateText, tool } from "ai"; | |
import { z } from "zod"; | |
// サイコロを振ってください。1から6までの整数を返してください。 | |
export const getNumber = tool({ | |
description: "入力された面数のサイコロを振ります。", | |
parameters: z.object({ | |
dice: z.number().min(1).describe("サイコロの面数").optional().default(6), | |
}), | |
execute: async ({ dice }) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { google } from '@ai-sdk/google'; | |
import { Agent } from '@mastra/core/agent'; | |
import { Memory } from '@mastra/memory'; | |
import { LibSQLStore } from '@mastra/libsql'; | |
import { weatherTool } from '../tools'; | |
import { getNumber } from '../tools/getNumber'; | |
import { getSpreadSheet } from '../tools/getSpreadSheet'; | |
import { getSheetSearchUp } from '../tools/getSheetSearchUp'; | |
const MODEL_NAME = 'gemini-2.0-flash'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; | |
import { z } from "zod"; | |
import 'dotenv/config' | |
console.log("API_URL=", process.env.API_URL); | |
const server = new McpServer({ | |
name: "mcp-2ex", | |
version: "1.0.0", | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"mcpServers": { | |
"mcp-2ex": { | |
"command": "node", | |
"args": [ | |
"/path123/mcp/mcp-2ex/build/index.js" | |
], | |
"env": { | |
"API_URL": "http://localhost:8787", | |
"API_KEY": "123" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {By, Builder, Browser} = require('selenium-webdriver'); | |
const assert = require("assert"); | |
(async function firstTest() { | |
let driver; | |
try { | |
driver = await new Builder().forBrowser(Browser.CHROME).build(); | |
await driver.get('http://localhost:5173'); | |