INNER CODE UNIT · TypeScript
currentPage
hyperbrowserai/HyperAgent · src/agent/index.ts:102
public set currentPage(page: Page) {
this._currentPage = page;
}
constructor(params: HyperAgentConfig<T> = {}) {
if (!params.llm) {
if (process.env.OPENAI_API_KEY) {
this.llm = createLLMClient({
provider: "openai",
model: "gpt-4o",
temperature: 0,
});
} else {
throw new HyperagentError("No LLM provider provided", 400);
}
} else if (typeof params.llm === "object" && "provider" in params.llm) {
// It's an LLMConfig
this.llm = createLLMClient(params.llm);