Spaces:
Sleeping
Sleeping
anmolsahai
commited on
Commit
•
322dc90
1
Parent(s):
a009d1d
vertex
Browse files- langchain_pipeline.py +3 -3
langchain_pipeline.py
CHANGED
@@ -6,11 +6,11 @@ from langchain_openai import OpenAIEmbeddings
|
|
6 |
from langchain_anthropic import ChatAnthropic
|
7 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
8 |
import base64
|
9 |
-
from
|
10 |
-
|
11 |
|
12 |
def generate(document_parts, prompt_text):
|
13 |
-
|
14 |
model = GenerativeModel("gemini-1.5-pro-001")
|
15 |
responses = model.generate_content(
|
16 |
document_parts,
|
|
|
6 |
from langchain_anthropic import ChatAnthropic
|
7 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
8 |
import base64
|
9 |
+
from google.cloud.aiplatform.generative_models import GenerativeModel, Part, FinishReason
|
10 |
+
from google.cloud import aiplatform as generative_models
|
11 |
|
12 |
def generate(document_parts, prompt_text):
|
13 |
+
aiplatform.init(project="akroda", location="us-central1")
|
14 |
model = GenerativeModel("gemini-1.5-pro-001")
|
15 |
responses = model.generate_content(
|
16 |
document_parts,
|