Step #0
Please paste your email addresses in this Teams chat window.
Step #1
You would be invited to your Portkey workspace. Please check your email and accept the invite.
Step #0
Please paste your email addresses in this Teams chat window.
Step #1
You would be invited to your Portkey workspace. Please check your email and accept the invite.
| { | |
| "default": { | |
| "pricing_config": { | |
| "pay_as_you_go": { | |
| "request_token": { | |
| "price": 0 | |
| }, | |
| "response_token": { | |
| "price": 0 | |
| } | 
| openapi: 3.0.2 | |
| info: | |
| version: ml_v1 | |
| title: watsonx.ai | |
| license: | |
| name: IBM | |
| url: https://www.ibm.com | |
| x-alternate-name: watsonx_ai_ml | |
| termsOfService: https://www.ibm.com/software/sla/sladb.nsf/sla/bm-6883-09 | |
| x-codegen-config: | 
| from langchain_openai import ChatOpenAI | |
| from portkey_ai import createHeaders, PORTKEY_GATEWAY_URL | |
| portkey_headers = createHeaders( | |
| api_key="YOUR_PORTKEY_API_KEY", | |
| config={ | |
| "virtual_key":"YOUR_GOOGLE_AI_STUDIO_VIRTUAL_KEY", | |
| "override_params":{ | |
| "model":"gemini-1.5-pro-latest" | |
| } | 
| <?xml version="1.0" encoding="utf-8"?> | |
| <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
| <!-- created with sitemap generator https://octopus.do --> | |
| <url> | |
| <loc>https://portkey.ai/</loc> | |
| <lastmod>2025-03-21</lastmod> | |
| <changefreq>always</changefreq> | |
| <priority>0.5</priority> | |
| </url> | 
| from portkey_ai import Portkey | |
| portkey_tools = [] | |
| portkey_tool = { | |
| "type": "function", | |
| "function": { | |
| "name": "get_weather", | |
| "description": "Get current temperature for a given location.", | |
| "parameters": { | 
| { | |
| "strategy": { | |
| "mode": "conditional", | |
| "conditions": [ | |
| { | |
| "query": { | |
| "metadata.user_provider": { | |
| "$eq": "openai" | |
| } | |
| }, | 
| // dotnet add package RestSharp | |
| using RestSharp; | |
| using System; | |
| using System.Threading.Tasks; | |
| public class Program | |
| { | |
| private static readonly string PortkeyApiKey = Environment.GetEnvironmentVariable("PORTKEY_API_KEY"); | |
| private static readonly string OpenAiVirtualKey = "YOUR_OPENAI_VIRTUAL_KEY"; | 
| import os | |
| from langchain.chat_models import ChatOpenAI | |
| from langchain.schema import HumanMessage, SystemMessage | |
| os.environ["OPENAI_API_BASE"]="https://api.portkey.ai/v1/proxy" | |
| anyscale_key = "..." | |
| headers = { | |
| "x-portkey-api-key": "...", | |
| "x-portkey-mode": "proxy anyscale", |