Download src/hooks/query/use-llm-subscription-models.ts from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 565 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/hooks/query/use-llm-subscription-models.ts
- Command line
-
hf download hf://SaylorTwift/openhands/src/hooks/query/use-llm-subscription-models.ts
-
curl -L -o use-llm-subscription-models.ts https://huggingface.co/SaylorTwift/openhands/resolve/main/src/hooks/query/use-llm-subscription-models.ts
565 Bytes
| import { useQuery } from "@tanstack/react-query"; | |
| import LLMSubscriptionService from "#/api/llm-subscription-service"; | |
| import { LLM_SUBSCRIPTION_QUERY_KEYS } from "#/hooks/query/query-keys"; | |
| export function useOpenAISubscriptionModels({ | |
| enabled = true, | |
| }: { enabled?: boolean } = {}) { | |
| return useQuery({ | |
| queryKey: LLM_SUBSCRIPTION_QUERY_KEYS.openaiModels, | |
| queryFn: LLMSubscriptionService.getOpenAIModels, | |
| enabled, | |
| retry: false, | |
| refetchOnWindowFocus: false, | |
| staleTime: 1000 * 60 * 5, | |
| meta: { | |
| disableToast: true, | |
| }, | |
| }); | |
| } | |