Baboluo
Baboluo
Explore posts from servers
RRunPod
Created by Baboluo on 3/2/2024 in #⛅|pods
Managing multiple pod discovery
Hi, if I want to put a load balancer/queue system for multiple pods, is there some premade app I can use for that? I was thinking of something like Kubernetes but its not compatible with Podrun. Or is this not the use case of podrun?
8 replies
RRunPod
Created by Baboluo on 2/6/2024 in #⛅|pods
How do I run custom code on a Runpod instance?
No description
5 replies
TtRPC
Created by Baboluo on 6/10/2023 in #❓-help
Does trpc (t3 stack) disable ssr from Nextjs?
Or is the ssr just not applied to the api
3 replies
TtRPC
Created by Baboluo on 4/27/2023 in #❓-help
How to do an async API call in useEffect (T3 stack)
Hey, I have the router below and want to call the tutorasync in an useCallback function, but the only method that is available is api.chat.queryTutor.useQuery() which is a hook where you add the input in advance. But I have it available only in the useCallbackfunction. is there a way to access the function directly without a hook?
export const chatRouter = createTRPCRouter({
tutor: publicProcedure
.input(
z.object({
messages: z.array(
z.object({
id: z.string(),
text: z.string(),
role: z.enum(["user", "system", "assistant"]),
addToPrompt: z.boolean(),
})
),
})
)
.query(async ({ input }): Promise<ChatMessage> => {
// ...
return {
// ...
}
}),
})
export const chatRouter = createTRPCRouter({
tutor: publicProcedure
.input(
z.object({
messages: z.array(
z.object({
id: z.string(),
text: z.string(),
role: z.enum(["user", "system", "assistant"]),
addToPrompt: z.boolean(),
})
),
})
)
.query(async ({ input }): Promise<ChatMessage> => {
// ...
return {
// ...
}
}),
})
16 replies