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

feat: add dataset operations to sdkserver #869

Merged
merged 9 commits into from
Oct 11, 2024

Conversation

g-linville
Copy link
Member

@g-linville g-linville commented Oct 10, 2024

This adds five new operations to the SDKServer to run the tools that we are using as the API for datasets. The SDKServer is basically just acting as a middleman between the client using the SDK, and the dataset API (the five tools in gptscript-ai/datasets#1).

Signed-off-by: Grant Linville <[email protected]>
Signed-off-by: Grant Linville <[email protected]>
Signed-off-by: Grant Linville <[email protected]>
Comment on lines 87 to 89
if result.DatasetToolRepo == "" {
result.DatasetToolRepo = defaultDatasetToolRepo
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is needed given that you have a default set.

I do believe it is needed here, though, when running the SDK server in embedded mode:

func complete(opts ...Options) Options {

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks. This is fixed

Signed-off-by: Grant Linville <[email protected]>
thedadams
thedadams previously approved these changes Oct 10, 2024
Comment on lines 84 to 85
Name string `json:"dataset_name"`
Description string `json:"dataset_description"`
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: you have camelCase and snake_case in your json tags. Can this be standardized?

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

This went the opposite way I expected. Is there reason why you are doing snake_case? I think most of our stuff uses camelCase.

Copy link
Member Author

Choose a reason for hiding this comment

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

Lol. I honestly have no idea. I'll go change it all to camelCase.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed. Sorry for the delay. Got stuck working on a test for another repo

Signed-off-by: Grant Linville <[email protected]>
Signed-off-by: Grant Linville <[email protected]>
Signed-off-by: Grant Linville <[email protected]>
@g-linville g-linville merged commit 6ec5178 into gptscript-ai:main Oct 11, 2024
10 checks passed
@g-linville g-linville deleted the dataset-sdkserver branch October 11, 2024 01:49
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