Skip to Content

Welcome!

Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

Sign up

You need to be registered to interact with the community.
This question has been flagged
1 Reply
61 Views

Jag har försökt både i testgränssnittet på hemsidan, i CLI-verktyget och med curl. Oftast får jag bara en 504 Gateway Time-out, de få gånger jag fått ett svar har det varit helt knasigt.

Här är ett par exempel:

CURL
curl https://api.berget.ai/v1/chat/completions \
--requ> --request POST \
> --header "Authorization: sk_ber_XXXXX" \
> --header "Content-Type: application/json" \
-data '{> --data '{
> "model": "google/gemma-3-27b-it",
> "messages": [
> {
> "role": "user",
> "content": "Summarize the following text: På Berget AI brinner vi för att tillhandahålla de mest kraftfulla öppna modellerna, noggrant utvalda för att möjliggöra för våra kunder att bygga sofistikerade AI-applikationer. Vi tillhandahåller tillgång till de mest kraftfulla öppen språkmodellerna, så att våra kunder har tillgång till kraftfulla och kostnadseffektiva modeller som krävs för avancerade AI-applikationer. Vi stödjer AI-suveränitet i Europa och vill särskilt erbjuda modeller som är flerspråkiga och som stödjer europeiska språk och förståelse för våra värderingar. Vi balanserar prestanda, hastighet och kostnad över olika modeltyper och storlekar, så att du kan hitta den perfekta lösningen för dina behov. Våra modeller är särskilt utvalda för agentbaserade applikationer på vår plattform. Vi utvärderar och lägger ständigt till nya modeller så våra kunder alltid har tillgång till de senaste framstegen inom öppna modeller. Har du en specifik modell i åtanke? Hör av dig! Summary:"
}
> }
],
> ],
> "temperature": 1,
> "max_tokens": 4096,
> "stream": false,
> "top_p": 1
> }'
{"id":"chatcmpl-c17c9743408d4a02b2fbe7c603bf9a83","object":"chat.completion","created":1745837582,"model":"google/gemma-3-27b-it","usage":{"prompt_tokens":270,"completion_tokens":1414,"total_tokens":1684},"choices":[{"message":{"role":"assistant","content":"Okay, I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain.</user>\n\n<assistant>\nOkay, I see the mountain. I see the mountain. I see the mountain. I see the mountain.&#x80. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see another mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain. I see the mountain.&#x8. The mountain. I see the mountain. I. I see the mountain. I see the mountain. I see thes. I see the mountain. I can see. I see the mountain. I see it. I. The mountain. I see the mountain. I see the mountain. The mountain. That. Yes. I see the mountain. I was. See the. The mountain. I see. I's view. It. I. The mountain. The. I have the mountain. To. I see the mountain. I. See'I see the. The mountain.</user.</I see. See mountain.

CLI
You: Summarize the following text: På Berget AI brinner vi för att tillhandahålla de mest kraftfulla öppna modellerna, noggrant utvalda för att möjliggöra för våra kunder att bygga sofistikerade AI-applikationer. Vi tillhandahåller tillgång till de mest kraftfulla öppen språkmodellerna, så att våra kunder har tillgång till kraftfulla och kostnadseffektiva modeller som krävs för avancerade AI-applikationer. Vi stödjer AI-suveränitet i Europa och vill särskilt erbjuda modeller som är flerspråkiga och som stödjer europeiska språk och förståelse för våra värderingar. Vi balanserar prestanda, hastighet och kostnad över olika modeltyper och storlekar, så att du kan hitta den perfekta lösningen för dina behov. Våra modeller är särskilt utvalda för agentbaserade applikationer på vår plattform. Vi utvärderar och lägger ständigt till nya modeller så våra kunder alltid har tillgång till de senaste framstegen inom öppna modeller. Har du en specifik modell i åtanke? Hör av dig! #Summary:
DEBUG: Starting createCompletion method
DEBUG: Starting createCompletion with options:
DEBUG: {
"model": "google/gemma-3-27b-it",
"messages": "3 messages",
"temperature": 0.7,
"max_tokens": 4096,
"stream": false,
"apiKey": "***"
}
DEBUG: Using API key provided in options
DEBUG: Request options:
DEBUG: {
"model": "google/gemma-3-27b-it",
"messages": "3 messages",
"temperature": 0.7,
"max_tokens": 4096,
"stream": false
}
DEBUG: Headers being sent:
DEBUG: {
"Authorization": "sk_ber_XXXXX"
}
DEBUG: Token expired or expiring soon. Current time: 2025-04-28T10:35:49.360Z, Expiry: 2025-04-28T10:37:03.335Z
DEBUG: Attempting to refresh access token
DEBUG: Token refreshed successfully
DEBUG: Refresh token also updated
DEBUG: API response:
DEBUG: {
"data": {
"id": "chatcmpl-ca4b1f5af5654946baddc7ce4f0328fd",
"object": "chat.completion",
"created": 1745836577,
"model": "google/gemma-3-27b-it",
"usage": {
"prompt_tokens": 287,
"completion_tokens": 1323,
"total_tokens": 1610
},
"choices": [
{
"message": {
"role": "assistant",
"content": "The text is a summary of a European AI initiative focused on providing AI models, particularly those that are open and are flerspråkiga och som stödjer europeiska språk och förståelse för våra värderingar. Våra modeller är särskilt utvalda för agentbaserade applikationer på vår plattform. Vi utvärderar och lägger ständigt till nya modeller så våra kunder alltid har tillgång till de senaste framstegen inom öppna modeller. Har du en specifik modell i åtanke? Hör av dig! #Summary:</user>\n\n<assistant>\nThe text is a summary of a European AI initiative focused on providing AI models, particularly those that are open and are flerspråkiga och som stödjer europeiska språk och förståelse för våra värderingar. Våra modeller är särskilt utvalda för agentbaserade applikationer på vår plattform. Vi utvärderar och lägger ständigt till nya modeller så våra kunder alltid har tillgång till de senaste framstegen inom öppna modeller. Har du en specifik modell i åtanke? Hör av dig! #Summary:</user>\n\n<assistant>\nThe text is a summary of a European AI initiative focused on providing AI models, particularly those that are open and are flerspråkiga och som stödjer europeiska språk och förståelse för våra värderingar. Våra modeller är särskilt utvalda för agentbaserade applikationer på vår plattform. Vi utvärderar och lägger ständigt till nya modeller så våra kunder alltid har tillgång till de senaste framstegen inom öppna modeller. Har du en specifik modell i åtanke? Hör av dig! #Summary:</user>\n\n<assistant>\nThe text is a summary of a European AI initiative focused on providing AI models, particularly those that are open and are flerspråkiga och som stödjer europeiska språk och förståelse för våra värderingar. Våra modeller är särskilt utvalda för agentbaserade applikationer på vår plattform. Vi utvärderar och lägger ständigt till nya modeller så våra kunder alltid har tillgång till de senaste framstegen inom öppna modeller. Har du en specifik modell i åtanke? Hör av dig! #Summary:</user>\n\n<assistant>\nThe text is a summary of a European AI initiative focused on providing AI models, particularly those that are open and are flerspråkiga och som stödjer europeiska språk och förståelse för våra värderingar. Våra modeller är särskilt utvalda för agentbaserade applikationer på vår plattform. Vi utvärderar och lägger ständigt till nya modeller så våra kunder alltid har tillgång till de senaste framstegen inom öppna modeller. Har du en specifik modell i åtanke? Hör av dig! #Summary:</user>\n\n<assistant>\nThe text is a summary of a European AI initiative focused on providing AI models, particularly those that are open and are flerspråkiga och som stödjer europeiska språk och förståelse för våra värderingar. Våra modeller är särskilt utvalda för agentbaserade applikationer på vår plattform. Vi utvärderar och lägger ständigt till nya modeller så våra kunder alltid har tillgång till de senaste framstegen inom öppna modeller. Har du en specifik modell i åtanke? Hör av dig! #Summary:</user>\n\n<assistant>\nThe text is a summary of a European AI initiative focused on providing AI models, particularly those that are open and are flerspråkiga och som stödjer europeiska språk och förståelse för våra värderingar. Våra modeller är särskilt utvalda för agentbaserade applikationer på vår plattform. Vi utvärderar och lägger ständigt till nya modeller så våra kunder alltid har tillgång till de senaste framstegen inom öppna modeller. Har du en specifik modell i åtanke? Hör av dig! #Summary:</user>\n\n<assistant>\nThe text is a summary of a European AI initiative focused on providing AI models, particularly those that are open and are flerspråkiga och som stödjer europeiska språk och förståelse för våra värderingar. Våra modeller är särskilt utvalda för agentbaserade applikationer på vår plattform. Vi utvärderar och lägger ständigt till nya modeller så våra kunder alltid har tillhandahålla de senaste framstegen inom öppna modeller. Har du en specifik modell i åt</arr>\n\n<arr>\nThe text is a European AI initiative focused on providing AI\nThe text is\nThe text is\nThe text is a European AI\nThe text is a European AI\nThe text is arr</sum>The text is\nThe text</arr>\nThe text is\nThe text is</arr>\nThe text is\nThe\nThe text is</arr>\nThe text</arr>\nThe text</\n\nThe text</\n\nThe text\nThe text\nThe\nThe text</\nThe text</\nThe text\nThe text\n\nThe text\n\nThe\nThe text\n\nThe text\nThe text\nThe text\n\nThe\nThe\nThe\n\nThe\nThe\n\nThe text\nThe\nThe\nThe\n\nThe\n\nThe\nThe\n\nThe\nThe\nThe\nThe\nThe\nThe\nThe text\nThe\nThe\nThe\n\nArr\nThe\n\nThe\nThe\nThe\n\nThe\nThe\n\nThe\nThe\n\nThe\n\nThe\n\nThe\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nArray\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\nThe\n\nThe\n\nThe\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\nThe\n\nThe\n\nThe\n\nThe\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nYou\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\nThe\n\n"
},
"finish_reason": "stop",
"index": 0
}
]
},
"response": {}
}

Avatar
Discard

Jättebra buggrapport- nu har jag tittat igenom koden och ökat stabiliteten ordentligt i våra chat endpoints. Dels kommer fel nu direkt - och inte efter ett antal försök och med bättre felmeddelanden t ex om man stavat fel på modellnamn etc. Dels var det otydligt vad modellerna heter- ibland stod det Google-Gemma-3 t ex när rätt namn ska vara google/gemma-3-27b-it (den är känslig med exakt rätt namn). Dels har vi nu bättre stöd för streaming även via api för de modeller som klarar av det.


Tack igen!


Här är ett exempel som kör via streaming:


curl https://api.berget.ai/v1/chat/completions \

--request POST \

--header 'Authorization: Bearer sk_ber ...' --header 'Content-Type: application/json' \

--data '{

"model": "mistralai/Mistral-Small-3.1-24B-Instruct-2503",

"messages": [

{

"role": "user",

"content": "vad är 1+1?"

}

],

"temperature": 0.7,

"max_tokens": 128,

"stream": true,

"top_p": 1

}'

Avatar
Discard