Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed ollama plugin to genkitx-ollama #97

Merged
merged 2 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ can specify custom configurations.

```js
import { geminiPro } from '@genkit-ai/vertexai';
import { ollama } from '@genkit-ai/ollama';
import { ollama } from 'genkitx-ollama';
import { generate } from '@genkit-ai/ai';

function flipACoin(a, b) {
Expand Down
6 changes: 3 additions & 3 deletions docs/plugins/ollama.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Ollama plugin provides interfaces to any of the local LLMs supported by
## Installation

```posix-terminal
npm i --save @genkit-ai/ollama
npm i --save genkitx-ollama
```

## Configuration
Expand All @@ -24,7 +24,7 @@ ollama pull gemma
To use this plugin, specify it when you call `configureGenkit()`.

```js
import { ollama } from '@genkit-ai/ollama';
import { ollama } from 'genkitx-ollama';

export default configureGenkit({
plugins: [
Expand Down Expand Up @@ -63,7 +63,7 @@ the Google Auth library:

```js
import { GoogleAuth } from 'google-auth-library';
import { ollama, OllamaPluginParams } from '@genkit-ai/ollama';
import { ollama, OllamaPluginParams } from 'genkitx-ollama';
import { configureGenkit, isDevEnv } from '@genkit-ai/core';

const ollamaCommon = {models: [{name: "gemma:2b"}]};
Expand Down
4 changes: 2 additions & 2 deletions genkit-tools/cli/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const modelOptions: Record<ModelProvider, PromptOption> = {
label: 'Google Cloud Vertex AI',
plugin: '@genkit-ai/vertexai',
},
ollama: { label: 'Ollama (e.g. Gemma)', plugin: '@genkit-ai/ollama' },
ollama: { label: 'Ollama (e.g. Gemma)', plugin: 'genkitx-ollama' },
none: { label: 'None', plugin: undefined },
};

Expand Down Expand Up @@ -127,7 +127,7 @@ const pluginToInfo: Record<string, PluginInfo> = {
init: "vertexAI({ location: 'us-central1' })",
model: 'geminiPro',
},
'@genkit-ai/ollama': {
'genkitx-ollama': {
imports: 'ollama',
init: `ollama({
models: [{ name: 'gemma' }],
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/ollama/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@genkit-ai/ollama",
"name": "genkitx-ollama",
"description": "Genkit AI framework plugin for Ollama APIs.",
"keywords": [
"genkit",
Expand Down
8 changes: 4 additions & 4 deletions js/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/samples/coffee-shop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@genkit-ai/dev-local-vectorstore": "workspace:*",
"@genkit-ai/firebase": "workspace:*",
"@genkit-ai/googleai": "workspace:*",
"@genkit-ai/ollama": "workspace:*",
"genkitx-ollama": "workspace:*",
"genkitx-pinecone": "workspace:*",
"@genkit-ai/evaluator": "workspace:*",
"@genkit-ai/vertexai": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion js/samples/dev-ui-gallery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@genkit-ai/dev-local-vectorstore": "workspace:*",
"@genkit-ai/firebase": "workspace:*",
"@genkit-ai/googleai": "workspace:*",
"@genkit-ai/ollama": "workspace:*",
"genkitx-ollama": "workspace:*",
"genkitx-pinecone": "workspace:*",
"@genkit-ai/evaluator": "workspace:*",
"@genkit-ai/vertexai": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion js/samples/dev-ui-gallery/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { dotprompt } from '@genkit-ai/dotprompt';
import { genkitEval, GenkitMetric } from '@genkit-ai/evaluator';
import { firebase } from '@genkit-ai/firebase';
import { geminiPro, googleAI } from '@genkit-ai/googleai';
import { ollama } from '@genkit-ai/ollama';
import {
claude3Haiku,
claude3Opus,
Expand All @@ -30,6 +29,7 @@ import {
VertexAIEvaluationMetricType,
} from '@genkit-ai/vertexai';
import { chroma } from 'genkitx-chromadb';
import { ollama } from 'genkitx-ollama';
import { pinecone } from 'genkitx-pinecone';

// Turn off safety checks for evaluation so that the LLM as an evaluator can
Expand Down
2 changes: 1 addition & 1 deletion js/samples/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@genkit-ai/flow": "workspace:*",
"@genkit-ai/firebase": "workspace:*",
"@genkit-ai/googleai": "workspace:*",
"@genkit-ai/ollama": "workspace:*",
"genkitx-ollama": "workspace:*",
"@genkit-ai/vertexai": "workspace:*",
"express": "~4.19.2",
"zod": "^3.22.4"
Expand Down
2 changes: 1 addition & 1 deletion js/samples/express/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import { configureGenkit } from '@genkit-ai/core';
import { firebase } from '@genkit-ai/firebase';
import { defineFlow, run, runFlow } from '@genkit-ai/flow';
import { googleAI } from '@genkit-ai/googleai';
import { ollama } from '@genkit-ai/ollama';
import { vertexAI } from '@genkit-ai/vertexai';
import express, { Request, Response } from 'express';
import { ollama } from 'genkitx-ollama';
import * as z from 'zod';

configureGenkit({
Expand Down
2 changes: 1 addition & 1 deletion js/samples/langchain/genkit-getting-started.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To get you started, here are 10 key Genkit features we think you'll love:
1. Many models, one interface
Genkit provides plugins that give you access to popular models out of the box and a flexible model abstraction that makes it easy to integrate any model API and use community-maintained models. Trying out a new model is as easy as changing a single argument, but each model can specify custom configurations.
import { geminiPro } from '@genkit-ai/vertexai';
import { ollama } from '@genkit-ai/ollama';
import { ollama } from 'genkitx-ollama';
import { generate } from '@genkit-ai/ai';


Expand Down
2 changes: 1 addition & 1 deletion js/samples/langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@genkit-ai/firebase": "workspace:*",
"@genkit-ai/flow": "workspace:*",
"@genkit-ai/googleai": "workspace:*",
"@genkit-ai/ollama": "workspace:*",
"genkitx-ollama": "workspace:*",
"@genkit-ai/vertexai": "workspace:*",
"genkitx-langchain": "workspace:*",
"@langchain/community": "^0.0.53",
Expand Down
2 changes: 1 addition & 1 deletion js/samples/langchain/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { configureGenkit } from '@genkit-ai/core';
import { firebase } from '@genkit-ai/firebase';
import { defineFlow, run, startFlowsServer } from '@genkit-ai/flow';
import { googleAI } from '@genkit-ai/googleai';
import { ollama } from '@genkit-ai/ollama';
import { vertexAI } from '@genkit-ai/vertexai';
import { GoogleVertexAIEmbeddings } from '@langchain/community/embeddings/googlevertexai';
import { GoogleVertexAI } from '@langchain/community/llms/googlevertexai';
Expand All @@ -29,6 +28,7 @@ import {
RunnableSequence,
} from '@langchain/core/runnables';
import { GenkitTracer } from 'genkitx-langchain';
import { ollama } from 'genkitx-ollama';
import { PDFLoader } from 'langchain/document_loaders/fs/pdf';
import { formatDocumentsAsString } from 'langchain/util/document';
import { MemoryVectorStore } from 'langchain/vectorstores/memory';
Expand Down
Loading