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

Support to pull prompt templates and model configuration from MakerSuiteHub #2733

Merged
merged 20 commits into from
Oct 5, 2023

Conversation

afirstenberg
Copy link
Contributor

Addresses #2564

This creates a MakerSuiteHub class with methods to load (with cache) a text, "data", or chat prompt that has been saved via makersuite.google.com. This prompt has methods to convert to a template, a prompt-free model, or to a chain which combines the two.

There are also some changes in the base connection class and types to allow for more generic calls to other Google REST APIs (in this case, Google Drive).

Examples and other documentation are pending initial review to make sure this looks good, but the tests should be complete.

@vercel
Copy link

vercel bot commented Sep 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Oct 5, 2023 11:05pm

@dosubot dosubot bot added the auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features label Sep 27, 2023
return ret;
}

async load(id: string): Promise<MakerSuitePrompt> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Strong preference between load vs. pull?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing to pull() and forcePull()

return ret;
}

toModel(): LLM | BaseChatModel {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can just be BaseLanguageModel

@jacoblee93
Copy link
Collaborator

So sorry about the delay - this seems reasonable, just missing entrypoints and docs

@@ -0,0 +1,358 @@
import { protos } from "@google-ai/generativelanguage";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use import type

@@ -0,0 +1,358 @@
import { protos } from "@google-ai/generativelanguage";
import { google } from "@google-ai/generativelanguage/build/protos/protos.js";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here as well I think?

@afirstenberg
Copy link
Contributor Author

@jacoblee93 - I think (hope) this is ready for final review and merge.

@jacoblee93
Copy link
Collaborator

Thank you, will look tomorrow!

@jacoblee93 jacoblee93 self-assigned this Oct 5, 2023
@jacoblee93 jacoblee93 added the lgtm PRs that are ready to be merged as-is label Oct 5, 2023
@jacoblee93
Copy link
Collaborator

Should be good to go! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features lgtm PRs that are ready to be merged as-is
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants