portkey_client = Portkey( mode="single", api_key=PORTKEY_API_KEY ) portkey_client.add_llms(pk.LLMOptions(provider="openai", model="gpt-4-1106-preview", virtual_key="xyz", cache_status="simple", cache_age=6000)) service_context = ServiceContext.from_defaults(llm=portkey_client, embed_model=OpenAIEmbedding(model="text-embedding-ada-002")) set_global_service_context(service_context)