Skip to content

Commit

Permalink
small updates to docs and fixes (#28)
Browse files Browse the repository at this point in the history
* small updates to docs and fixes

* update groq test
  • Loading branch information
davidoort authored May 15, 2024
1 parent 8aeb2d4 commit 568504f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NOTE: as you will see, you do not need to have a Firebase project to use Genkit
## Set up Genkit packages and DevUI
1. Rename .env.local to .env and add your API key to it, or specify it in the environment variable `{PLUGIN_NAME}_API_KEY` (e.g. `OPENAI_API_KEY`).

2. Run `npm install` to install the dependencies.
2. Run `npm run init` to install the dependencies.
3. Run `npm run start:browser` to launch Genkit and the Dev UI.

Genkit is configured from the `index.ts`, where you can import and initialize the plugin and define prompts, flows, models and other tools which could be accessed directly through Gekit Dev UI:
Expand Down
2 changes: 2 additions & 0 deletions examples/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"main": "lib/index.js",
"scripts": {
"init": "npm --prefix ../ install && npm --prefix ../ run build",
"start": "npx genkit start",
"start:browser": "npx genkit start -o",
"start:dev": "npm --prefix ../ run build && npx genkit start",
"compile": "npx tsc",
"build": "npm run build:clean && npm run compile",
"build:clean": "rm -rf ./lib",
Expand Down
6 changes: 3 additions & 3 deletions examples/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ const codeDotPrompt = defineDotprompt(
},
output: {
schema: z.object({
exist: z.boolean(),
color: z.string(),
details: z.string(),
exist: z.boolean().describe('Whether the object exists in the image'),
color: z.string().describe('The color of the object'),
details: z.string().describe('Details about the object'),
}),
},
config: {
Expand Down
4 changes: 4 additions & 0 deletions plugins/cohere/src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const commandRPlus = modelRef({
multiturn: true,
tools: true,
media: false,
systemRole: true,
output: ["text"],
},
},
Expand All @@ -84,6 +85,7 @@ export const commandR = modelRef({
multiturn: true,
tools: true,
media: false,
systemRole: true,
output: ["text"],
},
},
Expand All @@ -99,6 +101,7 @@ export const command = modelRef({
multiturn: true,
tools: true,
media: false,
systemRole: true,
output: ["text"],
},
},
Expand All @@ -114,6 +117,7 @@ export const commandLight = modelRef({
multiturn: true,
tools: true,
media: false,
systemRole: true,
output: ["text"],
},
},
Expand Down
4 changes: 2 additions & 2 deletions plugins/groq/src/groq_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ export const SUPPORTED_GROQ_MODELS = {
};

export const DEFAULT_MODEL_VERSION = {
"llama-3-8b": "llama-3-8b-32768",
"llama-3-70b": "llama-3-70b-32768",
"llama-3-8b": "llama3-8b-8192",
"llama-3-70b": "llama3-70b-8192",
"mixtral-8-7b": "mixtral-8x7b-32768",
"gemma-7b": "gemma-7b-it",
};
Expand Down
2 changes: 1 addition & 1 deletion plugins/groq/tests/groq_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ describe('toGroqRequestBody', () => {
content: 'Tell a joke about dogs.',
},
],
model: 'llama-3-8b-32768',
model: 'llama3-8b-8192',
temperature: 0.7,
max_tokens: 100,
top_p: 0.9,
Expand Down

0 comments on commit 568504f

Please sign in to comment.