Search

3,269 results found for openai (1762ms)

Code
3,174

- `message`, `explanation_short`, and `evidence[]`
The prompt prefers identity‑first summaries and concrete evidence (role/title, org, city) and
- Browser Search (model: `openai/gpt-oss-20b` + `browser_search` tool): performs targeted querie
3) Final judge (model: `openai/gpt-oss-120b`)
Consolidates assessor outputs + heuristics (academic, role, domain). Policy:
- Severity order: `spam > person_none > person_low > person_high`.
const curl = [
"curl --request POST \\\n",
" --url https://api.groq.com/openai/v1/chat/completions \\\n",
" --header 'authorization: Bearer " + apiKey + "' \\\n",
" --header 'content-type: application/json' \\\n",
export async function finalJudgeAssess(apiKey, email, systemPrompt, evidence) {
console.log('>> [final judge] evidence:', email, JSON.stringify(evidence));
const model = 'openai/gpt-oss-120b';
const schema = '{ "status": "person_high|person_low|person_none|spam", "message": string, "exp
const sys = [
async function convertAnalysisToJson(apiKey, email, analysisText) {
try {
const convModel = 'openai/gpt-oss-20b';
const convSys = [
'You convert analysis text into a strict JSON object. Do not browse or call tools.',
{ role: 'user', content: 'Email: ' + email + '\nTask: web search legitimacy check.' }
];
const model = 'openai/gpt-oss-20b';
const payload = { model, messages, stream: false, temperature: 0.2, tools: [{ type: 'browser_s
const r1 = await groqChatCompletion(apiKey, payload);
const VOICE = "cedar";
const OPENAI_API_KEY = Deno.env.get("OPENAI_API_KEY");
if (!OPENAI_API_KEY) {
throw new Error("🔴 OpenAI API key not configured");
}
export function makeHeaders(contentType?: string) {
const obj: Record<string, string> = {
Authorization: `Bearer ${OPENAI_API_KEY}`,
};
if (contentType) obj["Content-Type"] = contentType;
sip.post("/", async (c) => {
// Verify the webhook.
const OPENAI_SIGNING_SECRET = Deno.env.get("OPENAI_SIGNING_SECRET");
if (!OPENAI_SIGNING_SECRET) {
console.error("🔴 webhook secret not configured");
return c.text("Internal error", 500);
}
const webhook = new Webhook(OPENAI_SIGNING_SECRET);
const bodyStr = await c.req.text();
let callId: string | undefined;
// Accept the call.
const url = `https://api.openai.com/v1/realtime/calls/${callId}/accept`;
const headers = makeHeaders("application/json");
const body = JSON.stringify(makeSession());
rtc.post("/", async (c) => {
// Create the call.
const url = "https://api.openai.com/v1/realtime/calls";
const headers = makeHeaders();
const fd = new FormData();
# hello-realtime
Hello Realtime is a complete OpenAI Realtime application that supports both WebRTC and SIP users
You can access the app via WebRTC at https://hello-realtime.val.run, or via SIP by calling 425-8
This demo shows off the new SIP API, the new all-in-one WebRTC API, and the new server-side webs
If you remix the app, you'll just need to pop in your own OPENAI_API_KEY (from platform.openai.c
observer.post("/:callId", async (c) => {
const callId = c.req.param("callId");
const url = `wss://api.openai.com/v1/realtime?call_id=${callId}`;
const ws = new WebSocket(url, { headers: makeHeaders() });
ws.on("open", () => {
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>OpenAI Realtime API Voice Agent</title>
<style>
:root {