Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/components/openai/vendor-status-check.tsx
1450 views
1
import {
2
LLMServiceName,
3
getLLMServiceStatusCheckMD,
4
} from "@cocalc/util/db-schema/llm-utils";
5
import { unreachable } from "@cocalc/util/misc";
6
import A from "components/misc/A";
7
8
import type { JSX } from "react";
9
10
export function LLMServiceStatusCheck({
11
service,
12
}: {
13
service: LLMServiceName;
14
}): JSX.Element {
15
switch (service) {
16
case "openai":
17
return (
18
<>
19
OpenAI <A href="https://status.openai.com/">status</A> and{" "}
20
<A href="https://downdetector.com/status/openai/">downdetector</A>.
21
</>
22
);
23
24
case "google":
25
return (
26
<>
27
Google <A href="https://status.cloud.google.com">status</A> and{" "}
28
<A href="https://downdetector.com/status/google-cloud">
29
downdetector
30
</A>
31
.
32
</>
33
);
34
35
case "ollama":
36
return (
37
<>
38
This Ollama based API endpoint does not have a status page. If you are
39
experiencing issues you have to check with the API service directly or
40
try again later.
41
</>
42
);
43
44
case "custom_openai":
45
return (
46
<>
47
This Custom OpenAI API endpoint does not have a status page. If you
48
are experiencing issues you have to check with the API service
49
directly or try again later.
50
</>
51
);
52
53
case "mistralai":
54
return (
55
<>
56
This Mistral based API endpoint does not have a status page. If you
57
are experiencing issues, use another model or try again later.
58
</>
59
);
60
61
case "anthropic":
62
return (
63
<>
64
Anthropic <A href="https://status.anthropic.com/">status</A>.
65
</>
66
);
67
68
case "user":
69
return <>{getLLMServiceStatusCheckMD("user")}</>;
70
71
default:
72
unreachable(service);
73
}
74
return <></>;
75
}
76
77