Fix loading when installed from git: import openAIResponsesApi from pi-ai/compat
pi resolves only a fixed set of its own module paths for installed extensions; pi-ai/api/* is not among them. Add a test that keeps runtime imports within that set.
This commit is contained in:
parent
6f2f924144
commit
4a957f2796
1 changed files with 34 additions and 1 deletions
|
|
@ -3,7 +3,9 @@ import {
|
|||
type Model,
|
||||
type Provider,
|
||||
} from "@earendil-works/pi-ai";
|
||||
import { openAIResponsesApi } from "@earendil-works/pi-ai/api/openai-responses.lazy";
|
||||
// pi resolves only a fixed set of its own module paths for extensions; anything
|
||||
// else (e.g. pi-ai/api/*) fails in a git/npm install. See test/imports.test.ts.
|
||||
import { openAIResponsesApi } from "@earendil-works/pi-ai/compat";
|
||||
import { getBuiltinModels } from "@earendil-works/pi-ai/providers/all";
|
||||
|
||||
export const PROVIDER_ID = "unigpt";
|
||||
|
|
|
|||
Loading…
Reference in a new issue