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 llm #187

Merged
merged 8 commits into from
Sep 5, 2023
Merged

Add llm #187

merged 8 commits into from
Sep 5, 2023

Conversation

karthik2804
Copy link
Collaborator

This add support in the JS SDK for the Llm interface in reference to the Spin PR fermyon/spin#1731

Copy link
Member

@radu-matei radu-matei left a comment

Choose a reason for hiding this comment

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

Tests are failing here.
Otherwise, the PR looks good to me; feel free to merge once CI is fixed.

top_p: f32,
}

fn llm_inference_with_options(context: &Context, _this: &Value, args: &[Value]) -> Result<Value> {
Copy link

Choose a reason for hiding this comment

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

Are we sure we want this? We do this in Rust because Rust doesn't have optional args, but in JS it feels much more idiomatic to just have one function.

Copy link

Choose a reason for hiding this comment

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

Seeing now that the JS code differentiates these two functions. We should clean this up in a follow-up PR.

@karthik2804 karthik2804 merged commit e5cc78c into fermyon:main Sep 5, 2023
2 checks passed
@karthik2804 karthik2804 deleted the add_llm branch September 5, 2023 08:15
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