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

Prem AI langchain integration (migrating PR from org account to personal account) #19113

Merged
merged 39 commits into from
Mar 26, 2024

Conversation

Anindyadeep
Copy link
Contributor

Prem SDK integration in LangChain

This PR adds the integration with PremAI's prem-sdk with langchain. User can now access to deployed models (llms/embeddings) and use it with langchain's ecosystem. This PR adds the following:

This PR adds the following:

  • Add chat support
  • Adding embedding support
  • writing integration tests
    • writing tests for chat
    • writing tests for embedding
  • writing unit tests
    • writing tests for chat
    • writing tests for embedding
  • Adding documentation
    • writing documentation for chat
    • writing documentation for embedding
  • run make test
  • run make lint, make lint_diff
  • Final checks (spell check, lint, format and overall testing)

Copy link

vercel bot commented Mar 15, 2024

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

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2024 1:37am

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. Ɑ: embeddings Related to text embedding models module 🔌: fireworks Primarily related to Fireworks AI model intergrations 🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features labels Mar 15, 2024
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Mar 15, 2024
@Anindyadeep
Copy link
Contributor Author

Hi @baskaryan, thanks for the quick review and approval, I am getting lot of mypy type errors when I was running make lint, so do I have to put type: ignore at every places?

most of the mypy failures seem like valid errors, so we should fix them (the error message should tell you what the issue is)

Hi, yes I just tried to fix it, can you approve to run the workflow, thanks

@Anindyadeep
Copy link
Contributor Author

Anindyadeep commented Mar 19, 2024

Almost there, got some checks failing in the docs, I used make format for this and tried to reproduce the error with make lint_package (the command which was used to run the checks and failing in CI). However I could not reproduce that. Let's see. However other tests are passing.

cc: @baskaryan would be great if you could approve this and quickly re-iterate. Thanks :)

@Anindyadeep
Copy link
Contributor Author

Hi @baskaryan can this PR be merged, since it is now passing all the checks :)

@@ -155,6 +156,7 @@ tiktoken = ">=0.3.2,<0.6.0"
anthropic = "^0.3.11"
langchain-core = { path = "../core", develop = true }
fireworks-ai = "^0.9.0"
premai = "^0.3.25"
Copy link
Collaborator

Choose a reason for hiding this comment

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

My reading of the instructions for the [tool.poetry.group.test_integration.dependencies] group above is that we should not add premai here.

note that CI is failing because the poetry lock file is out of sync with this file:

Error: poetry.lock is not consistent with pyproject.toml. Run `poetry lock [--no-update]` to fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My reading of the instructions for the [tool.poetry.group.test_integration.dependencies] group above is that we should not add premai here.

note that CI is failing because the poetry lock file is out of sync with this file:

Error: poetry.lock is not consistent with pyproject.toml. Run `poetry lock [--no-update]` to fix it.

As far I have see, not adding premai was failing the tests. So I added that. But okay lemme remove it on toml and do a lock update and see, what happens.

@Anindyadeep
Copy link
Contributor Author

Anindyadeep commented Mar 25, 2024

Hi @ccurme, @baskaryan, @efriis can you please check this PR, would be awesome to re-iterate (if any checks failing) as soon as possible and get this merged.

Thanks

@baskaryan baskaryan enabled auto-merge (squash) March 26, 2024 01:22
@baskaryan baskaryan merged commit b2a11ce into langchain-ai:master Mar 26, 2024
61 checks passed
@Anindyadeep
Copy link
Contributor Author

Thank you for the merge.

gkorland pushed a commit to FalkorDB/langchain that referenced this pull request Mar 30, 2024
### Prem SDK integration in LangChain

This PR adds the integration with [PremAI's](https://www.premai.io/)
prem-sdk with langchain. User can now access to deployed models
(llms/embeddings) and use it with langchain's ecosystem. This PR adds
the following:

### This PR adds the following:

- [x]  Add chat support
- [X]  Adding embedding support
- [X]  writing integration tests
    - [X]  writing tests for chat 
    - [X]  writing tests for embedding
- [X]  writing unit tests
    - [X]  writing tests for chat 
    - [X]  writing tests for embedding
- [X]  Adding documentation
    - [X]  writing documentation for chat
    - [X]  writing documentation for embedding
- [X] run `make test`
- [X] run `make lint`, `make lint_diff` 
- [X]  Final checks (spell check, lint, format and overall testing)

---------

Co-authored-by: Anindyadeep Sannigrahi <[email protected]>
Co-authored-by: Bagatur <[email protected]>
Co-authored-by: Erick Friis <[email protected]>
Co-authored-by: Bagatur <[email protected]>
chrispy-snps pushed a commit to chrispy-snps/langchain that referenced this pull request Mar 30, 2024
### Prem SDK integration in LangChain

This PR adds the integration with [PremAI's](https://www.premai.io/)
prem-sdk with langchain. User can now access to deployed models
(llms/embeddings) and use it with langchain's ecosystem. This PR adds
the following:

### This PR adds the following:

- [x]  Add chat support
- [X]  Adding embedding support
- [X]  writing integration tests
    - [X]  writing tests for chat 
    - [X]  writing tests for embedding
- [X]  writing unit tests
    - [X]  writing tests for chat 
    - [X]  writing tests for embedding
- [X]  Adding documentation
    - [X]  writing documentation for chat
    - [X]  writing documentation for embedding
- [X] run `make test`
- [X] run `make lint`, `make lint_diff` 
- [X]  Final checks (spell check, lint, format and overall testing)

---------

Co-authored-by: Anindyadeep Sannigrahi <[email protected]>
Co-authored-by: Bagatur <[email protected]>
Co-authored-by: Erick Friis <[email protected]>
Co-authored-by: Bagatur <[email protected]>
hinthornw pushed a commit that referenced this pull request Apr 26, 2024
### Prem SDK integration in LangChain

This PR adds the integration with [PremAI's](https://www.premai.io/)
prem-sdk with langchain. User can now access to deployed models
(llms/embeddings) and use it with langchain's ecosystem. This PR adds
the following:

### This PR adds the following:

- [x]  Add chat support
- [X]  Adding embedding support
- [X]  writing integration tests
    - [X]  writing tests for chat 
    - [X]  writing tests for embedding
- [X]  writing unit tests
    - [X]  writing tests for chat 
    - [X]  writing tests for embedding
- [X]  Adding documentation
    - [X]  writing documentation for chat
    - [X]  writing documentation for embedding
- [X] run `make test`
- [X] run `make lint`, `make lint_diff` 
- [X]  Final checks (spell check, lint, format and overall testing)

---------

Co-authored-by: Anindyadeep Sannigrahi <[email protected]>
Co-authored-by: Bagatur <[email protected]>
Co-authored-by: Erick Friis <[email protected]>
Co-authored-by: Bagatur <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ɑ: embeddings Related to text embedding models module 🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features 🔌: fireworks Primarily related to Fireworks AI model intergrations lgtm PR looks good. Use to confirm that a PR is ready for merging. size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants