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

fix(community): AILanguageModel interface #7025

Merged
merged 2 commits into from
Oct 20, 2024

Conversation

hemanth
Copy link
Contributor

@hemanth hemanth commented Oct 18, 2024

Using latest interface definitions from prompt-api spec.

Copy link

vercel bot commented Oct 18, 2024

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

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Oct 20, 2024 7:31am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Oct 20, 2024 7:31am

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 18, 2024
prompt(input: AILanguageModelPromptInput, options?: AILanguageModelPromptOptions): Promise<String>;
promptStreaming(input: AILanguageModelPromptInput, options?: AILanguageModelPromptOptions): ReadableStream;

countPromptTokens(input: AILanguageModelPromptInput, options?: AILanguageModelPromptOptions): Promise<number>;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have updated the interface to the latest definition, we may implement these if it make sense.

Copy link
Collaborator

@jacoblee93 jacoblee93 Oct 19, 2024

Choose a reason for hiding this comment

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

Given this will likely change again, is it worth adding all of this if we're not using it?

Would prefer to keep it minimal, types will likely come from elsewhere eventually

Copy link
Collaborator

Choose a reason for hiding this comment

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

Eh it's experimental I suppose so it's fine

@jacoblee93 jacoblee93 changed the title fix: AILanguageModel interface fix(community): AILanguageModel interface Oct 20, 2024
@jacoblee93
Copy link
Collaborator

Thank you!

@jacoblee93 jacoblee93 merged commit 6ff3e97 into langchain-ai:main Oct 20, 2024
32 checks passed
CarterMorris pushed a commit to CarterMorris/langchainjs that referenced this pull request Nov 10, 2024
Co-authored-by: jacoblee93 <jacoblee93@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants