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

Add Workers Ai types #2033

Merged
merged 2 commits into from
Apr 25, 2024
Merged

Add Workers Ai types #2033

merged 2 commits into from
Apr 25, 2024

Conversation

G4brym
Copy link
Member

@G4brym G4brym commented Apr 18, 2024

No description provided.

@G4brym G4brym marked this pull request as ready for review April 18, 2024 10:46
@G4brym G4brym requested review from a team as code owners April 18, 2024 10:46
types/defines/ai.d.ts Outdated Show resolved Hide resolved
@G4brym G4brym force-pushed the add-ai-binding-types branch 3 times, most recently from 67c9f6e to 047dee7 Compare April 19, 2024 16:53
types/defines/ai.d.ts Outdated Show resolved Hide resolved
types/defines/ai.d.ts Outdated Show resolved Hide resolved
@G4brym G4brym force-pushed the add-ai-binding-types branch 5 times, most recently from 3435b7e to 445d72e Compare April 23, 2024 09:05
declare abstract class Ai {
private readonly fetcher;
private options;
lastRequestId: string | null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this property intentionally public? I can't find it in the docs

Copy link
Collaborator

@penalosa penalosa left a comment

Choose a reason for hiding this comment

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

Couple comments, and it still looks like there are some none abstract classes—are those intended to be user constructable?

Comment on lines 279 to 280
private readonly fetcher;
private options;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This are internal implementation details that shouldn't be included

private readonly fetcher;
private options;
lastRequestId: string | null;
constructor(fetcher: Fetcher);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This isn't user constructable, so the constructor shouldn't be included

@G4brym G4brym force-pushed the add-ai-binding-types branch from 445d72e to d7e56df Compare April 24, 2024 11:02
@G4brym G4brym force-pushed the add-ai-binding-types branch from d7e56df to 7f3789c Compare April 24, 2024 16:13
@penalosa penalosa merged commit 925a1cb into cloudflare:main Apr 25, 2024
10 checks passed
garrettgu10 pushed a commit that referenced this pull request May 13, 2024
* Add Workers Ai types

* Improve ai types
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.

3 participants