Welcome to Portkey Forum

v
visarg
Offline, last seen 3 weeks ago
Joined November 4, 2024
In such cases, instead of passing configID, you can pass raw config in the x-portkey-config header. Example curl header:
Plain Text
--header 'x-portkey-config: {"cache": {"mode": "semantic"}}'
8 comments
S
v
It should be on the far right in the list item. I think your UI might not be on latest version. Can you please click on update available popup that shows up in bottom left of the screen. Or if thats not visible, you can also do a hard refresh and try again.
7 comments
v
V
W
Hey @susa . Have you tried adding the messages array in override_params in the config object? So your fallback config should look something like this:

Plain Text
{
  "strategy": {
    "mode": "fallback"
  },
  "targets": [
    {
      "virtual_key": "oai-vk",
      "override_params": {
        "model": "gpt-4"
      }
    },
    {
      "virtual_key": "oai-vk",
      "override_params": {
        "model": "gpt-3.5-turbo",
        "messages": [...override_prompt_for_gpt-3.5]
      }
    }
  ]
}


When you do this, Portkey will first try the gpt-4 model with the messages sent in the request body. And if that fails, then it will try gpt-3.5-turbo but with the new messages array that you add in the override_params object for that target. Please let me know if this works for you.
3 comments
V
s
Hey @kaushikbokka - This timeout is not happening on our end. Its happening on the LLM provider's end. If we were timing out, then we would not have got the response and logged it. I will check if others are facing this issue. One thing that you can do is add a request_timeout setting in your config along with fallback so that your requests are not stuck.
2 comments
V
k
You can pass a map where key will be the tokenized word and value will be the bias which controls the likelihood of that token appearing in your generated response. Example:
Plain Text
{
    19045: -10,
    58234: 10
}


For example, here 19045 is the tokenized id for good and 58234 is tokenized id for better. The above logit_bias will reduce the chances of the model generating the word good in the completion as its value is negative 10 and vice versa for the word better as its value is positive 10.

Reference to a simple article that explains it well: https://help.openai.com/en/articles/5247780-using-logit-bias-to-define-token-probability

You can use this to generate tokenized ids for words (for openai models): https://platform.openai.com/tokenizer
18 comments
r
d
Looking into this asap.
6 comments
V
D
r
v