From ba4f27642b6c3a0ff6b18ad86d5ea1755f51c1bb Mon Sep 17 00:00:00 2001 From: pranav-kural Date: Sun, 7 Jul 2024 17:26:40 -0400 Subject: [PATCH] removed github package workflow + updated getFirebaseApp --- .github/workflows/publish-github.yml | 38 --------------------------- src/agents/chat-agent.ts | 4 +-- src/index.ts | 21 ++++++++++++++- src/integrations/firebase/firebase.ts | 2 +- 4 files changed, 23 insertions(+), 42 deletions(-) delete mode 100644 .github/workflows/publish-github.yml diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml deleted file mode 100644 index e5aa5d9..0000000 --- a/.github/workflows/publish-github.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Publish package to GitHub Packages -on: - release: - types: [published] -jobs: - release: - runs-on: ubuntu-latest - permissions: - contents: write - packages: write - steps: - - name: Checkout - uses: actions/checkout@v4 - - # Setup .npmrc file to publish to GitHub Packages - - name: Install Node.js and Setup NPMRC - uses: actions/setup-node@v4 - with: - node-version: "20.x" - registry-url: "https://npm.pkg.github.com" - scope: "@oconva" - - - name: set registery - run: npm config set registry https://npm.pkg.github.com/oconva - - - name: set auth - run: npm config set //npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} - - - name: set org registry - run: npm config set @oconva:registry https://npm.pkg.github.com - - - name: Install dependencies - run: npm ci - - - name: Publish 🚀 - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/src/agents/chat-agent.ts b/src/agents/chat-agent.ts index 562fd0f..317abc5 100644 --- a/src/agents/chat-agent.ts +++ b/src/agents/chat-agent.ts @@ -53,7 +53,7 @@ export type ChatAgentConfig = { modelConfig?: ModelConfig; } & AgentTypeConfig; -type DefaultChatAgentConfigType = { +export type DefaultChatAgentConfigType = { agentType: ChatAgentType; model: SupportedModels; }; @@ -157,7 +157,7 @@ export interface ChatAgentInterface extends ChatAgentAttributes, ChatAgentMethods {} -type GenerateSystemPromptResponseParams = { +export type GenerateSystemPromptResponseParams = { agentType?: ChatAgentType; prompt: Dotprompt; model?: string; diff --git a/src/index.ts b/src/index.ts index aea5c54..61d1499 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,12 +1,31 @@ +// import { ChatAgent } from "./agents/chat-agent"; // import { defineChatEndpoint } from "./endpoints/endpoints"; // import { runServer, setupGenkit } from "./genkit/genkit"; + // setupGenkit(); // defineChatEndpoint({ +// chatAgent: new ChatAgent({ +// agentType: "close-ended", +// topic: "Store Inventory Data", +// model: "gemini15Flash", +// modelConfig: { +// version: "latest", +// temperature: 0.5, +// maxOutputTokens: 2048, +// safetySettings: [ +// { +// category: "HARM_CATEGORY_DANGEROUS_CONTENT", +// threshold: "BLOCK_LOW_AND_ABOVE", +// }, +// ], +// }, +// }), // endpoint: "chat", +// topic: "Store Inventory Data", // }); // runServer(); -export {}; +export {}; \ No newline at end of file diff --git a/src/integrations/firebase/firebase.ts b/src/integrations/firebase/firebase.ts index f180596..7bdb2fe 100644 --- a/src/integrations/firebase/firebase.ts +++ b/src/integrations/firebase/firebase.ts @@ -10,7 +10,7 @@ import { * @param params App options for initializing the Firebase app. * @returns instance of the Firebase app. */ -export const getFirebaseApp = (params: AppOptions): app.App => +export const getFirebaseApp = (params?: AppOptions): app.App => initializeApp(params); /**