Skip to content

Commit

Permalink
feat(models): add support for ollama and google gen ai
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpiac authored Feb 26, 2025
2 parents 9902748 + 5094cd8 commit eb5e5ea
Show file tree
Hide file tree
Showing 16 changed files with 6,819 additions and 18 deletions.
3 changes: 0 additions & 3 deletions examples/basic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'dotenv/config';

const main = async () => {
try {
console.log('couoc');
if (!process.env.OPENAI_API_KEY) {
throw new Error('OPENAI_API_KEY is not set');
}
Expand All @@ -29,8 +28,6 @@ const main = async () => {
],
});

console.log('couoc');

const result = await openator.start(
'https://amazon.com',
'Find a black wirelesskeyboard and return the price.',
Expand Down
1 change: 1 addition & 0 deletions examples/google/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OPENAI_API_KEY=your-key
27 changes: 27 additions & 0 deletions examples/google/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ChatOpenAI, initOpenator } from 'openator';

console.log('coucou');

import 'dotenv/config';

const main = async () => {
try {
const llm = new ChatOpenAI({
apiKey: process.env.OPEN_AI_API_KEY!,
});

const openator = initOpenator({
llm,
headless: false,
});

const result = await openator.start(
'https://amazon.com',
'Find a black wirelesskeyboard and return the price.',
);
} catch (error) {
console.error(error);
}
};

main();
Loading

0 comments on commit eb5e5ea

Please sign in to comment.