Skip to content

Conversation

Titan-co
Copy link

Adds support for configuring the server to use custom OpenAI-compatible LLMs via environment variables:

  • CUSTOM_LLM_API_KEY
  • CUSTOM_LLM_BASE_URL
  • CUSTOM_LLM_MODEL_NAME

Includes:

  • A new CustomOpenAIClientWrapper class to adapt the OpenAI client to the expected interface.
  • Updates to server.ts to read the new environment variables and conditionally instantiate the custom client with precedence over other LLM configurations.
  • Addition of openai package to stagehand/package.json.
  • Adjustments to build scripts for robustness.

Adds support for configuring the server to use custom
OpenAI-compatible LLMs via environment variables:
- CUSTOM_LLM_API_KEY
- CUSTOM_LLM_BASE_URL
- CUSTOM_LLM_MODEL_NAME

Includes:
- A new `CustomOpenAIClientWrapper` class to adapt the OpenAI client
  to the expected interface.
- Updates to `server.ts` to read the new environment variables and
  conditionally instantiate the custom client with precedence over
  other LLM configurations.
- Addition of `openai` package to `stagehand/package.json`.
- Adjustments to build scripts for robustness.
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

Successfully merging this pull request may close these issues.

1 participant