@melaya/runner 1.0.44 → 1.0.45
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/dist/localRagIngest.py +6 -1
- package/localRagIngest.py +6 -1
- package/package.json +1 -1
package/dist/localRagIngest.py
CHANGED
|
@@ -136,12 +136,17 @@ async def _ingest(args) -> int:
|
|
|
136
136
|
# LM Studio exposes an OpenAI-compatible /v1; reuse the OpenAI
|
|
137
137
|
# client pointed at its local endpoint. Dim default = 768 (the
|
|
138
138
|
# FE picker should report the real dim per loaded model).
|
|
139
|
+
# base_url MUST be passed at construction (the OpenAI 1.x
|
|
140
|
+
# AsyncClient bakes the URL into its httpx client during
|
|
141
|
+
# __init__; setting `client.base_url = ...` after the fact is a
|
|
142
|
+
# no-op and the next request resolves an empty hostname →
|
|
143
|
+
# `[Errno 8] nodename nor servname provided`).
|
|
139
144
|
embedder = OpenAITextEmbedding(
|
|
140
145
|
api_key="lmstudio",
|
|
141
146
|
model_name=args.embedder_model,
|
|
142
147
|
dimensions=768,
|
|
148
|
+
base_url="http://localhost:1234/v1",
|
|
143
149
|
)
|
|
144
|
-
embedder.client.base_url = "http://localhost:1234/v1"
|
|
145
150
|
# LM Studio's /v1/embeddings rejects the OpenAI-specific
|
|
146
151
|
# `dimensions` kwarg (only OpenAI text-embedding-3 supports
|
|
147
152
|
# output-dim reduction). Strip it before each call so the
|
package/localRagIngest.py
CHANGED
|
@@ -136,12 +136,17 @@ async def _ingest(args) -> int:
|
|
|
136
136
|
# LM Studio exposes an OpenAI-compatible /v1; reuse the OpenAI
|
|
137
137
|
# client pointed at its local endpoint. Dim default = 768 (the
|
|
138
138
|
# FE picker should report the real dim per loaded model).
|
|
139
|
+
# base_url MUST be passed at construction (the OpenAI 1.x
|
|
140
|
+
# AsyncClient bakes the URL into its httpx client during
|
|
141
|
+
# __init__; setting `client.base_url = ...` after the fact is a
|
|
142
|
+
# no-op and the next request resolves an empty hostname →
|
|
143
|
+
# `[Errno 8] nodename nor servname provided`).
|
|
139
144
|
embedder = OpenAITextEmbedding(
|
|
140
145
|
api_key="lmstudio",
|
|
141
146
|
model_name=args.embedder_model,
|
|
142
147
|
dimensions=768,
|
|
148
|
+
base_url="http://localhost:1234/v1",
|
|
143
149
|
)
|
|
144
|
-
embedder.client.base_url = "http://localhost:1234/v1"
|
|
145
150
|
# LM Studio's /v1/embeddings rejects the OpenAI-specific
|
|
146
151
|
# `dimensions` kwarg (only OpenAI text-embedding-3 supports
|
|
147
152
|
# output-dim reduction). Strip it before each call so the
|