Hey, I cannot seem to get portkey to work with langchain for google's models.
This is a sample of what I am using
from langchain_openai import ChatOpenAI
from portkey_ai import createHeaders, PORTKEY_GATEWAY_URL
PORTKEY_API_KEY = "..."
VIRUTAL_KEY = "..." # Virtual Key I created
portkey_headers = createHeaders(api_key=PORTKEY_API_KEY,virtual_key= VIRUTAL_KEY)
llm = ChatOpenAI(api_key="x", base_url=PORTKEY_GATEWAY_URL, default_headers=portkey_headers, model="gemini-1.5-pro")
llm.invoke("What is the meaning of life, universe and everything?")
I have attached the trace back.
I am on the latest version of all the packages as I ran
pip install -U langchain-core portkey_ai langchain-openai
before starting