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

Assert and query will fail if OPENAI_API_KEY is set but empty #376

Open
jxoir opened this issue Feb 11, 2025 · 1 comment
Open

Assert and query will fail if OPENAI_API_KEY is set but empty #376

jxoir opened this issue Feb 11, 2025 · 1 comment

Comments

@jxoir
Copy link

jxoir commented Feb 11, 2025

Assertion and query will fail if OPENAI_API_KEY is set but empty, ex.: OPENAI_API_KEY="" will create an assertion failed error however this error doesn't happen when using ai Action or Action (this happens both in chrome playground and using the bridge connector from ts).

Error:


Playground:
Assertion failed: there are some search results
Reason: Cannot find config for AI model service. You should set it before using. https://midscenejs.com/model-provider.html

CMD TSX

/node_modules/@midscene/web/dist/lib/bridge-mode.js:1598
      throw new Error(`${errMsg}
            ^

Error: Assertion failed: there are some search results
Reason: Cannot find config for AI model service. You should set it before using. https://midscenejs.com/model-provider.html
    at AgentOverChromeBridge.aiAssert (/node_modules/@midscene/web/dist/lib/bridge-mode.js:1598:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async <anonymous> (/demo.tsx:17:5)

In both cases it works for the action run as expected (as I'm using my own openai backend and it doesn't require openai api key) but it breaks for query and assert

@zhoushaw
Copy link
Member

@jxoir The document here includes configuration instructions. Additionally, you can test your OpenAI parameter connectivity using our test project: connectivity test.

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