@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.
@@ -16609,7 +16609,7 @@ var ChatAidonNodeImpl = class extends ChatNodeImpl {
16609
16609
  }
16610
16610
  return path;
16611
16611
  }
16612
- async callToolGet(parsedArgs, schemaDetail, path, data) {
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(functionCall.arguments, schemaDetail, path, data);
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.HfInferenceEndpoint(endpoint, accessToken) : new import_inference.HfInference(accessToken);
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.HfInferenceEndpoint(endpoint, accessToken) : new import_inference2.HfInference(accessToken);
19130
- const image = await hf.textToImage({
19131
- inputs: prompt,
19132
- model,
19133
- parameters: {
19134
- width,
19135
- height,
19136
- negative_prompt: negativePrompt,
19137
- guidance_scale: guidanceScale,
19138
- num_inference_steps: numInferenceSteps
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
- name: eventName,
23078
- message: coerceType(data, "string")
23080
+ type: "event",
23081
+ graphEvent: {
23082
+ name: eventName,
23083
+ message: coerceType(data, "string")
23084
+ }
23079
23085
  };
23080
- sendEvent(controller, "event", { graphEvent });
23086
+ sendEvent(controller, "event", graphEvent);
23081
23087
  };
23082
23088
  const streamEvents = createOnStreamUserEvents(spec.userStreamEvents, userEventHandler);
23083
23089
  if (streamEvents) {