Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

feat: add JQ input field that accepts any type #201

Conversation

jvallesm
Copy link
Collaborator

@jvallesm jvallesm commented Jul 8, 2024

Because

  • The jq task took only strings, which can be leveraged for reference but forced users to pre-process objects with another JSON operator that marshalled the input.

This commit

  • Introduces a new input field for the task, which can be any object
    • The old value is hidden under the "More" settings section. If the new field is empty, task will fall back to the old field (for backwards compatibility).
  • Removes object type assumption in unmarshal task: now it can unmarshal any valid JSON value.

@jvallesm jvallesm self-assigned this Jul 8, 2024
Copy link

linear bot commented Jul 8, 2024

The task took only strings, which forced users to pre-process objects
with another JSON operator that marshalled the input.
@jvallesm jvallesm force-pushed the jvalles/ins-5232-component-accept-any-type-not-a-json-string-in-jq-operator branch from c346ea3 to 19ed60c Compare July 11, 2024 15:14
@jvallesm jvallesm changed the title feat(wip): add JQ input field that accepts any type feat: add JQ input field that accepts any type Jul 11, 2024
@jvallesm
Copy link
Collaborator Author

jvallesm commented Jul 11, 2024

QA

Before

CleanShot 2024-07-11 at 17 22 40

After

No pre-processing required

CleanShot 2024-07-11 at 17 25 00

Reference can be achieved by marshalling

CleanShot 2024-07-11 at 17 27 49

@jvallesm jvallesm marked this pull request as ready for review July 11, 2024 15:28
@donch1989 donch1989 merged commit cba4aac into main Jul 15, 2024
10 checks passed
@donch1989 donch1989 deleted the jvalles/ins-5232-component-accept-any-type-not-a-json-string-in-jq-operator branch July 15, 2024 01:36
@GeorgeWilliamStrong
Copy link
Contributor

Looks great - thanks @jvallesm. Sorry, I didn't have time to review this until just now 🫠

Copy link
Contributor

@GeorgeWilliamStrong GeorgeWilliamStrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

donch1989 pushed a commit that referenced this pull request Jul 16, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.22.0-beta](v0.21.0-beta...v0.22.0-beta)
(2024-07-16)


### Features

* add GitHub component
([#177](#177))
([46e5a8e](46e5a8e))
* add JQ input field that accepts any type
([#201](#201))
([cba4aac](cba4aac))
* **cohere:** add Cohere component
([#187](#187))
([63fd578](63fd578))
* **cohere:** add cohere to be able to use instill credit
([#213](#213))
([80415b1](80415b1))
* GitHub component pagination
([#212](#212))
([4b8bbc7](4b8bbc7))
* **instill:** send requester UID, if present, on model trigger
([#202](#202))
([31422cd](31422cd))
* **mistral:** add Mistral AI component
([#204](#204))
([12aaf4f](12aaf4f))
* **openai:** add dimensions in openai component
([#200](#200))
([0d08912](0d08912))
* **text:** add input and output and fix bugs
([#209](#209))
([56ab3eb](56ab3eb))
* unify pipeline and component usage handlers
([#197](#197))
([e27e46c](e27e46c))


### Bug Fixes

* fix instillUpstreamTypes not correctly render the JSON schema
([#216](#216))
([bb603bd](bb603bd))
* **mistralai:** svg naming is wrong
([#218](#218))
([108817a](108817a))
* **text:** hotfix the bug from langchaingo without importing the
function o… ([#217](#217))
([4cfc263](4cfc263))
* typo ([#195](#195))
([d6b2a42](d6b2a42))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: 👋 Done
Development

Successfully merging this pull request may close these issues.

4 participants