Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Go] proposal: AI types have methods #402

Merged
merged 1 commit into from
Jun 23, 2024
Merged

[Go] proposal: AI types have methods #402

merged 1 commit into from
Jun 23, 2024

Conversation

jba
Copy link
Contributor

@jba jba commented Jun 13, 2024

Calling Retriever on a retriever as a method is more natural
in Go than calling a top-level function, as we currently have.

This PR changes Indexer and Retriever from being aliases of Actions
to being their own types, allowing methods.

If we like this, then a followup PR would do the same for
Model, Embedder and possibly Tool.

Base automatically changed from jba-new-api to main June 21, 2024 21:04
Calling Retrieve on a retriever as a method is more natural
in Go than calling a top-level function, as we currently have.

This PR changes Indexer and Retriever from being aliases of Actions
to being their own types, allowing methods.

Subsequent PRs will do the same for Model, Embedder and possibly Tool.
@jba jba force-pushed the jba-retriever-nonalias branch from e587197 to a50d98b Compare June 23, 2024 23:25
@jba jba merged commit 07ea151 into main Jun 23, 2024
5 checks passed
@jba jba deleted the jba-retriever-nonalias branch June 23, 2024 23:33
jba added a commit that referenced this pull request Jun 24, 2024
This continues the work begun in #402 of making the main ai types
distinct from their underlying actions, instead of aliases.

This allows the types to have methods, unstead of using top-level
functions.

It also clarifies documentation and other output, like panic stack
traces.
jba added a commit that referenced this pull request Jun 24, 2024
jba added a commit that referenced this pull request Jun 24, 2024
This continues the work begun in #402 of making the main ai types
distinct from their underlying actions, instead of aliases.

This allows the types to have methods, unstead of using top-level
functions.

It also clarifies documentation and other output, like panic stack
traces.
jba added a commit that referenced this pull request Jun 24, 2024
This continues the work begun in #402 of making the main ai types
distinct from their underlying actions, instead of aliases.

This allows the types to have methods, unstead of using top-level
functions.

It also clarifies documentation and other output, like panic stack
traces.
jba added a commit that referenced this pull request Jun 24, 2024
jba added a commit that referenced this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants