tailcall icon indicating copy to clipboard operation
tailcall copied to clipboard

Use LLMs to infer arg names of generated configurations

Open tusharmath opened this issue 1 year ago • 11 comments

Tailcall uses the power of AI to auto-generate configurations. This feature is primarily used to identify the name of the type currently and works reliably well.

Before

type Query {
  f1(p1: Int): [T1] @http(path: "/users/{{args.p1}}")
}

After infer_type_names: true

type Query {
  f1(p1: Int): [User] @http(path: "/users{{args.p1}}")
}

After infer_arg_names: true

type Query {
  f1(id: Int): [User] @http(path: "/users{{args.id}}")
}

Technical Requirements

  • NOTE: Ensure the mustache templates are also updated.
  • NOTE: the fieldName that is a required field should be made optional and used only if provided.
  • Try to produce minimal diff and abstract out common parts out of infer_type_name.rs and the new infer_arg_name.rs.
  • Add snapshot tests for the generated configurations

Additional Links

  • Refer to the implementation here — https://github.com/tailcallhq/tailcall/blob/main/src/cli/llm/infer_type_name.rs

tusharmath avatar Aug 11 '24 08:08 tusharmath

/bounty 65$

tusharmath avatar Aug 11 '24 08:08 tusharmath

~~## 💎 $65 bounty • Tailcall Inc.~~

~~### Steps to solve:~~ ~~1. Start working: Comment /attempt #2652 with your implementation plan~~ ~~2. Submit work: Create a pull request including /claim #2652 in the PR body to claim the bounty~~ ~~3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts~~

~~🙏 Thank you for contributing to tailcallhq/tailcall!~~ ~~🧐 Checkout our guidelines before you get started.~~ ~~💵 More about our bounty program.~~

Attempt Started (GMT+0) Solution
🔴 @ssddOnTop Aug 11, 2024, 8:18:18 AM WIP
🔴 @mobley-trent Aug 13, 2024, 6:37:31 AM WIP
🟢 @beelchester Aug 14, 2024, 5:41:29 AM #2687
🟢 @laststylebender14 #2787

algora-pbc[bot] avatar Aug 11 '24 08:08 algora-pbc[bot]

/attempt 2652

Algora profile Completed bounties Tech Active attempts Options
@ssddOnTop 71 tailcallhq bounties
Rust, Java,
C & more
Cancel attempt

ssddOnTop avatar Aug 11 '24 08:08 ssddOnTop

@ssddOnTop: Reminder that in 1 days the bounty will become up for grabs, so please submit a pull request before then 🙏

algora-pbc[bot] avatar Aug 12 '24 08:08 algora-pbc[bot]

/attempt #2652

Algora profile Completed bounties Tech Active attempts Options
@mobley-trent    2 tailcallhq bounties
+ 7 bounties from 4 projects
Python, Rust,
Jupyter Notebook
Cancel attempt

mobley-trent avatar Aug 13 '24 06:08 mobley-trent

[!NOTE] The user @ssddOnTop is already attempting to complete issue #2652 and claim the bounty. We recommend checking in on @ssddOnTop's progress, and potentially collaborating, before starting a new solution.

algora-pbc[bot] avatar Aug 13 '24 06:08 algora-pbc[bot]

/attempt #2652

Algora profile Completed bounties Tech Active attempts Options
@beelchester 8 tailcallhq bounties
Rust, TypeScript,
CSS & more
Cancel attempt

beelchester avatar Aug 14 '24 05:08 beelchester

[!NOTE] The user @mobley-trent is already attempting to complete issue #2652 and claim the bounty. We recommend checking in on @mobley-trent's progress, and potentially collaborating, before starting a new solution.

algora-pbc[bot] avatar Aug 14 '24 05:08 algora-pbc[bot]

@mobley-trent: Reminder that in 1 days the bounty will become up for grabs, so please submit a pull request before then 🙏

algora-pbc[bot] avatar Aug 14 '24 06:08 algora-pbc[bot]

Action required: Issue inactive for 30 days. Status update or closure in 7 days.

github-actions[bot] avatar Oct 09 '24 02:10 github-actions[bot]

Issue closed after 7 days of inactivity.

github-actions[bot] avatar Oct 16 '24 02:10 github-actions[bot]