@alpic80/rivet-core 1.24.2-aidon.3 → 1.24.2-aidon.6
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/cjs/bundle.cjs +24 -18
- package/dist/cjs/bundle.cjs.map +2 -2
- package/dist/esm/api/streaming.js +6 -3
- package/dist/esm/plugins/aidon/nodes/ChatAidonNode.js +7 -5
- package/dist/esm/plugins/huggingface/nodes/ChatHuggingFace.js +4 -2
- package/dist/esm/plugins/huggingface/nodes/TextToImageHuggingFace.js +5 -3
- package/package.json +6 -6
package/dist/cjs/bundle.cjs
CHANGED
|
@@ -16609,7 +16609,7 @@ var ChatAidonNodeImpl = class extends ChatNodeImpl {
|
|
|
16609
16609
|
}
|
|
16610
16610
|
return path;
|
|
16611
16611
|
}
|
|
16612
|
-
async callToolGet(
|
|
16612
|
+
async callToolGet(schemaDetail, path, parsedArgs, data) {
|
|
16613
16613
|
const queryParams = new URLSearchParams(
|
|
16614
16614
|
parsedArgs.parameters
|
|
16615
16615
|
).toString();
|
|
@@ -16687,7 +16687,7 @@ var ChatAidonNodeImpl = class extends ChatNodeImpl {
|
|
|
16687
16687
|
if (schemaDetail.requestInBody) {
|
|
16688
16688
|
data = await this.callToolPost(schemaDetail, path, functionCall.arguments, data);
|
|
16689
16689
|
} else {
|
|
16690
|
-
data = await this.callToolGet(
|
|
16690
|
+
data = await this.callToolGet(schemaDetail, path, functionCall.arguments, data);
|
|
16691
16691
|
}
|
|
16692
16692
|
messages["value"].push({
|
|
16693
16693
|
type: "function",
|
|
@@ -18928,7 +18928,7 @@ var ChatHuggingFaceNodeImpl = {
|
|
|
18928
18928
|
const repetitionPenalty = getInputOrData(data, inputData, "repetitionPenalty", "number");
|
|
18929
18929
|
const topP = getInputOrData(data, inputData, "topP", "number");
|
|
18930
18930
|
const topK = getInputOrData(data, inputData, "topK", "number");
|
|
18931
|
-
const hf = endpoint ? new import_inference.
|
|
18931
|
+
const hf = endpoint ? new import_inference.InferenceClient(accessToken, { endpointUrl: endpoint }) : new import_inference.InferenceClient(accessToken);
|
|
18932
18932
|
const generationStream = hf.textGenerationStream({
|
|
18933
18933
|
inputs: prompt,
|
|
18934
18934
|
model,
|
|
@@ -19126,18 +19126,21 @@ var TextToImageHuggingFaceNodeImpl = {
|
|
|
19126
19126
|
const negativePrompt = getInputOrData(data, inputData, "negativePrompt") || void 0;
|
|
19127
19127
|
const guidanceScale = getInputOrData(data, inputData, "guidanceScale", "number");
|
|
19128
19128
|
const numInferenceSteps = getInputOrData(data, inputData, "numInferenceSteps", "number");
|
|
19129
|
-
const hf = endpoint ? new import_inference2.
|
|
19130
|
-
const image = await hf.textToImage(
|
|
19131
|
-
|
|
19132
|
-
|
|
19133
|
-
|
|
19134
|
-
|
|
19135
|
-
|
|
19136
|
-
|
|
19137
|
-
|
|
19138
|
-
|
|
19139
|
-
|
|
19140
|
-
|
|
19129
|
+
const hf = endpoint ? new import_inference2.InferenceClient(accessToken, { endpointUrl: endpoint }) : new import_inference2.InferenceClient(accessToken);
|
|
19130
|
+
const image = await hf.textToImage(
|
|
19131
|
+
{
|
|
19132
|
+
inputs: prompt,
|
|
19133
|
+
model,
|
|
19134
|
+
parameters: {
|
|
19135
|
+
width,
|
|
19136
|
+
height,
|
|
19137
|
+
negative_prompt: negativePrompt,
|
|
19138
|
+
guidance_scale: guidanceScale,
|
|
19139
|
+
num_inference_steps: numInferenceSteps
|
|
19140
|
+
}
|
|
19141
|
+
},
|
|
19142
|
+
{ outputType: "blob" }
|
|
19143
|
+
);
|
|
19141
19144
|
return {
|
|
19142
19145
|
["output"]: {
|
|
19143
19146
|
type: "image",
|
|
@@ -23074,10 +23077,13 @@ data: ${JSON.stringify(data)}
|
|
|
23074
23077
|
async start(controller) {
|
|
23075
23078
|
const userEventHandler = async (eventName, data) => {
|
|
23076
23079
|
const graphEvent = {
|
|
23077
|
-
|
|
23078
|
-
|
|
23080
|
+
type: "event",
|
|
23081
|
+
graphEvent: {
|
|
23082
|
+
name: eventName,
|
|
23083
|
+
message: coerceType(data, "string")
|
|
23084
|
+
}
|
|
23079
23085
|
};
|
|
23080
|
-
sendEvent(controller, "event",
|
|
23086
|
+
sendEvent(controller, "event", graphEvent);
|
|
23081
23087
|
};
|
|
23082
23088
|
const streamEvents = createOnStreamUserEvents(spec.userStreamEvents, userEventHandler);
|
|
23083
23089
|
if (streamEvents) {
|