feat(gql): introduce LLM-based generator for queries#665
Conversation
🦋 Changeset detectedLatest commit: 8446b68 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
0836a84 to
3494864
Compare
3494864 to
8a4770a
Compare
89ec0dd to
55561e9
Compare
|
|
||
| try { | ||
| // ensure the client is connected | ||
| await client.connect(); |
There was a problem hiding this comment.
Interesting. This seems to suggest to me that this package assumes it is always used by a stateful backend and not in a stateless / serverless backend like we are in ENSAdmin.
|
|
||
| You will generate a GraphQL query and variables that will be used to test the GQL API. | ||
|
|
||
| Always respond with the GraphQL query and variables in JSON format. |
There was a problem hiding this comment.
Seems we should give an example below this of the expected JSON format?
There was a problem hiding this comment.
The example is in the lib prompt:
Provide your response in the following JSON format:
{
"query": "The generated GraphQL query",
"variables": { "key": "value" }
}
Example:
{
"query": "query($id: ID!) { user(id: $id) { id name email } }",
"variables": { "id": "123" }
}
Do not include any additional text or formatting outside of this JSON object.
There was a problem hiding this comment.
The lib prompts most of this, but extra can't hurt 🫡
Co-authored-by: lightwalker.eth <126201998+lightwalker-eth@users.noreply.github.com>
| "class-variance-authority": "^0.7.1", | ||
| "clsx": "^2.1.1", | ||
| "date-fns": "^4.1.0", | ||
| "gqlpt": "0.0.0-alpha.31", |
There was a problem hiding this comment.
hey @tk-o
Thanks for the integration, it looks like the lib fit in nicely. We do have the alpha tag, your feedback and usage can really help us get to a stable position for the community. Feel free to open issues on gqlpt and or reach out directly ✌️
| * | ||
| * Based on https://github.com/rocket-connect/gqlpt/blob/18af9c9/packages/adapter-anthropic/src/index.ts | ||
| */ | ||
| class AdapterAnthropic extends Adapter { |
There was a problem hiding this comment.
Our anthropic Adapter is not passing through the options and hardcoded on a specific model - sorry about that, I made something on our end to track that:
In order to test this new feature:
ANTHROPIC_API_KEYinapps/ensadmin/.env.localfile if you have it (but it's optional)pnpm -F ensadmin dev)