
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
google-llm-bridge
Advanced tools
Google Generative AI(Gemini)์ llm-bridge-spec ๊ณตํต ์ธํฐํ์ด์ค๋ฅผ ์ฐ๊ฒฐํ๋ ์ด๋ํฐ์
๋๋ค. ๋ชจ๋ธ, ๊ฐ๊ฒฉ, ์ปจํ
์คํธ ์ ๋ณด์ ์์ฑ ์ต์
์ ํ๊ณณ์์ ๊ด๋ฆฌํ์ฌ ์ ๋ชจ๋ธ์ด ์ถ๊ฐ๋๋๋ผ๋ ์ต์ํ์ ์์ ์ผ๋ก ํ์ฅํ ์ ์์ต๋๋ค.
GoogleModelEnum๊ณผ Zod ์คํค๋ง๋ก ๋ชจ๋ธ๊ณผ ์ต์
์ ๊ฒ์ฆํ๊ณ ๊ธฐ๋ณธ๊ฐ์ ์ ๊ณตํฉ๋๋ค.toolCalls๋ก ๋ณํํ๊ณ , ์คํธ๋ฆผ ๋ชจ๋์์๋ ์ฆ๋ถ ํ
์คํธ์ ์ฌ์ฉ๋์ ์์ฐจ์ ์ผ๋ก ์ ๊ณตํฉ๋๋ค.pnpm add google-llm-bridge llm-bridge-spec @google/generative-ai zod
import { createGoogleAIBridge, GoogleModelEnum } from 'google-llm-bridge';
const bridge = createGoogleAIBridge({
apiKey: process.env.GOOGLE_API_KEY!,
model: GoogleModelEnum.GEMINI_1_5_FLASH,
temperature: 0.4,
maxOutputTokens: 2048,
safetySettings: [{ category: 'HARM_CATEGORY_HATE_SPEECH', threshold: 'BLOCK_LOW_AND_ABOVE' }],
});
const response = await bridge.invoke({
messages: [
{ role: 'system', content: [{ contentType: 'text', value: 'You are a concise assistant.' }] },
{ role: 'user', content: [{ contentType: 'text', value: '์์ธ ๋ ์จ๋ฅผ ์๋ ค์ค.' }] },
],
tools: [
{
name: 'getWeather',
description: 'Retrieve the weather forecast',
parameters: {
type: 'object',
properties: { city: { type: 'string' } },
required: ['city'],
},
},
],
});
console.log(response.content.value);
if (response.toolCalls?.length) {
console.log('tool call arguments:', response.toolCalls[0].arguments);
}
const stream = bridge.invokeStream({
messages: [
{ role: 'user', content: [{ contentType: 'text', value: '10์ค ์ด๋ด๋ก ์๊ธฐ์๊ฐํด์ค' }] },
],
});
for await (const chunk of stream) {
if (chunk.content.value) {
process.stdout.write(chunk.content.value);
}
}
| ์ต์ | ์ค๋ช |
|---|---|
model | GoogleModelEnum ์ค ํ๋ (๊ธฐ๋ณธ๊ฐ gemini-1.5-flash) |
temperature, topP, topK | ์ํ๋ง ํ๋ผ๋ฏธํฐ |
maxOutputTokens, stopSequences, candidateCount | ์ถ๋ ฅ ์ ์ด ์ต์ |
responseMimeType, responseSchema | JSON ์ถ๋ ฅ ๊ฐ์ ยท์คํค๋ง ์ ์ |
presencePenalty, frequencyPenalty | ๋ฐ๋ณต ์ต์ ๊ณ์ |
safetySettings | Safety ํํฐ ๊ธฐ์ค(์นดํ ๊ณ ๋ฆฌ/์๊ณ๊ฐ) |
์ง์๋๋ ๋ชจ๋ธ๊ณผ ์ต์ ์คํ์ docs/models.md์์ ํ์ธํ ์ ์์ต๋๋ค. ๋ฌธ์์ ์ ๋ฆฌ๋ ์ ๋ณด๋ google-models.ts์ MODEL_METADATA๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์๋์ผ๋ก ์ ์ง๋ฉ๋๋ค.
FAQs
Google Gemini LLM Bridge
The npm package google-llm-bridge receives a total of 4 weekly downloads. As such, google-llm-bridge popularity was classified as not popular.
We found that google-llm-bridge demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: whatโs affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.