Sr Izan
Sr Izan
Explore posts from servers
CDCloudflare Developers
Created by Sr Izan on 4/3/2024 in #general-help
only "t" on response - AI Rest API
hey! I'm currently getting the following response on the second message to the AI: REST API response: { result: { response: 't' }, success: true, errors: [], messages: [] } API query:
const response = await fetch(`https://api.cloudflare.com/client/v4/accounts/${process.env.CF_AI_ACC}/ai/run/@cf/meta/llama-2-7b-chat-int8`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.CF_AI_TOKEN}`
},
body: JSON.stringify({
messages: messages
})
}).then(async res => await res.json())
const response = await fetch(`https://api.cloudflare.com/client/v4/accounts/${process.env.CF_AI_ACC}/ai/run/@cf/meta/llama-2-7b-chat-int8`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.CF_AI_TOKEN}`
},
body: JSON.stringify({
messages: messages
})
}).then(async res => await res.json())
2 replies
RRailway
Created by Sr Izan on 3/24/2024 in #✋|help
Move from docker to nixfiles
Hey! I removed the dockerfile to switch to nixpacks but that doesn't work, it just says that the dockerfile wasn't found
8 replies
RRailway
Created by Sr Izan on 1/31/2024 in #✋|help
running a coturn server
hey, might it be possible to run a coturn server? that way we could have a full-fledged matrix server! it needs a few port ranges and 2 single ports. https://github.com/coturn/coturn
7 replies
RRailway
Created by Sr Izan on 1/24/2024 in #✋|help
How to run single-replica database on MongoDB
Hey, prisma with mongodb requires a replica set to work, and this doesn't look to be already set up.
10 replies
DTDrizzle Team
Created by Sr Izan on 1/19/2024 in #help
Stuck loading
Hey, I'm having this issue where the website is stuck loading. using next.js initialized the schema like this: export default drizzle(new Client(process.env.DATABASE_URL!), { schema }) and just queried it from server side:
import { auth, useUser } from "@clerk/nextjs";
import db, { schema } from "@/db/index";
import { arrayContains, eq } from "drizzle-orm";

export default async function Page() {
const { userId } = auth();
const getTeams = await db
.select()
.from(schema.team)
.where(arrayContains(schema.team.members, [userId!]))
.execute()
...
import { auth, useUser } from "@clerk/nextjs";
import db, { schema } from "@/db/index";
import { arrayContains, eq } from "drizzle-orm";

export default async function Page() {
const { userId } = auth();
const getTeams = await db
.select()
.from(schema.team)
.where(arrayContains(schema.team.members, [userId!]))
.execute()
...
1 replies
TTCTheo's Typesafe Cult
Created by Sr Izan on 1/13/2024 in #questions
how do I rate limit on nextjs api routes on app router?
hey, currently using Route Handlers and I'm stuck on adding a rate limiter to my routes. How can I do so?
7 replies