mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
a775aa6389
Co-authored-by: Leonid Kuligin <kuligin@google.com> Co-authored-by: Leonid Kuligin <lkuligin@yandex.ru> Co-authored-by: sasha-gitg <44654632+sasha-gitg@users.noreply.github.com> Co-authored-by: Justin Flick <Justinjayflick@gmail.com> Co-authored-by: Justin Flick <jflick@homesite.com>
19 lines
638 B
Python
19 lines
638 B
Python
"""Test Vertex AI API wrapper.
|
|
In order to run this test, you need to install VertexAI SDK (that is is the private
|
|
preview) and be whitelisted to list the models themselves:
|
|
In order to run this test, you need to install VertexAI SDK
|
|
pip install google-cloud-aiplatform>=1.25.0
|
|
|
|
Your end-user credentials would be used to make the calls (make sure you've run
|
|
`gcloud auth login` first).
|
|
"""
|
|
from langchain.llms import VertexAI
|
|
|
|
|
|
def test_vertex_call() -> None:
|
|
llm = VertexAI()
|
|
output = llm("Say foo:")
|
|
assert isinstance(output, str)
|
|
assert llm._llm_type == "vertexai"
|
|
assert llm.model_name == llm.client._model_id
|