@agentskit/adapters 0.13.0 → 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/catalog/index.cjs +2 -1
- package/dist/catalog/index.cjs.map +1 -1
- package/dist/catalog/index.js +1 -1
- package/dist/{chunk-726IKNNR.js → chunk-77QS3QRT.js} +4 -3
- package/dist/chunk-77QS3QRT.js.map +1 -0
- package/dist/index.cjs +23 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -13
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/dist/chunk-726IKNNR.js.map +0 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Connect to any LLM provider — and swap between them — without touching your
|
|
|
6
6
|
[](https://www.npmjs.com/package/@agentskit/adapters)
|
|
7
7
|
[](https://bundlejs.com/?q=@agentskit/adapters)
|
|
8
8
|
[](../../LICENSE)
|
|
9
|
-
[](../../docs/STABILITY.md)
|
|
10
10
|
[](https://github.com/AgentsKit-io/agentskit)
|
|
11
11
|
|
|
12
12
|
**Tags:** `ai` · `agents` · `llm` · `agentskit` · `openai` · `anthropic` · `claude` · `gemini` · `chatgpt` · `ollama` · `embeddings` · `providers`
|
package/dist/catalog/index.cjs
CHANGED
|
@@ -153579,6 +153579,7 @@ function createStreamSource(doFetch, parse, errorLabel, retry) {
|
|
|
153579
153579
|
// src/openai.ts
|
|
153580
153580
|
function openai(config) {
|
|
153581
153581
|
const { apiKey, model, baseUrl = "https://api.openai.com", retry } = config;
|
|
153582
|
+
const apiRoot = baseUrl.replace(/\/v1\/?$/, "");
|
|
153582
153583
|
const isCanonicalOpenAI = (() => {
|
|
153583
153584
|
try {
|
|
153584
153585
|
return new URL(baseUrl).host === "api.openai.com";
|
|
@@ -153615,7 +153616,7 @@ function openai(config) {
|
|
|
153615
153616
|
};
|
|
153616
153617
|
if (includeUsage) body.stream_options = { include_usage: true };
|
|
153617
153618
|
return createStreamSource(
|
|
153618
|
-
(signal) => fetch(`${
|
|
153619
|
+
(signal) => fetch(`${apiRoot}/v1/chat/completions`, {
|
|
153619
153620
|
method: "POST",
|
|
153620
153621
|
headers: {
|
|
153621
153622
|
"Content-Type": "application/json",
|