mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-06 13:33:37 +00:00
Harrison/predibase (#8046)
Co-authored-by: Abhay Malik <32989166+Abhay-765@users.noreply.github.com>
This commit is contained in:
24
docs/extras/ecosystem/integrations/predibase.md
Normal file
24
docs/extras/ecosystem/integrations/predibase.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Predibase
|
||||
|
||||
Learn how to use LangChain with models on Predibase.
|
||||
|
||||
## Setup
|
||||
- Create a [Predibase](hhttps://predibase.com/) account and [API key](https://docs.predibase.com/sdk-guide/intro).
|
||||
- Install the Predibase Python client with `pip install predibase`
|
||||
- Use your API key to authenticate
|
||||
|
||||
### LLM
|
||||
|
||||
Predibase integrates with LangChain by implementing LLM module. You can see a short example below or a full notebook under LLM > Integrations > Predibase.
|
||||
|
||||
```python
|
||||
import os
|
||||
os.environ["PREDIBASE_API_TOKEN"] = "{PREDIBASE_API_TOKEN}"
|
||||
|
||||
from langchain.llms import Predibase
|
||||
|
||||
model = Predibase(model = 'vicuna-13b', predibase_api_key=os.environ.get('PREDIBASE_API_TOKEN'))
|
||||
|
||||
response = model("Can you recommend me a nice dry wine?")
|
||||
print(response)
|
||||
```
|
Reference in New Issue
Block a user