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

[Feature] llm Options #180

Open
729993031 opened this issue Dec 14, 2024 · 1 comment
Open

[Feature] llm Options #180

729993031 opened this issue Dec 14, 2024 · 1 comment

Comments

@729993031
Copy link

729993031 commented Dec 14, 2024

Background

I wish to experiment with other LLM models like Tongyi or Claude, but it's not feasible.

const completion = await openai.chat.completions.create({

Aspiration

Provide a solution akin to browser-use, allowing the integration of custom models.

import { OpenAI } from "@langchain/openai";

const llm = new OpenAI({
  model: "gpt-3.5-turbo-instruct",
  temperature: 0,
  maxTokens: undefined,
  timeout: undefined,
  maxRetries: 2,
  apiKey: process.env.OPENAI_API_KEY,
  // other params...
});
const mid = new PuppeteerAgent(page,{llm});

Benefits

  1. less code、lower maintenance complexity
  2. The token cost of GPT-4 is relatively high; in certain scenarios, cheaper models can be employed to achieve similar outcomes.
@yuyutaotao
Copy link
Collaborator

Try these params: https://midscenejs.com/model-provider.html

That should work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants