Search

3,380 results found for openai (6337ms)

Code
3,285

1. When a new message is posted in a configured Slack channel (ie. #bugs, or #support), Slack se
2. The val makes an OpenAI call to determine if the message is a bug
tHub for semantically related open issues with a separate OpenAI call
4. It posts a comment in the Slack thread with links to related GitHub issues, with a "Relevance
*/
import { OpenAI } from "https://esm.town/v/std/openai";
import { Octokit } from "https://esm.sh/@octokit/rest@20.0.2";
import { WebClient } from "https://esm.sh/@slack/web-api@7.0.2";
async function isBugReportLLM(text: string): Promise<boolean> {
try {
// Check if OpenAI API key is available
if (!Deno.env.get("OPENAI_API_KEY")) {
console.warn("OpenAI API key not found - bug detection disabled");
return false;
}
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{
async function findRelatedIssues(slackMessage: string, issues: any[]): Promise<any[]> {
try {
// Check if OpenAI API key is available
if (!Deno.env.get("OPENAI_API_KEY")) {
return [];
}
}).join("\n\n");
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{
1. When a new message is posted in a configured Slack channel (ie. #bugs, or #support), Slack se
2. The val makes an OpenAI call to determine if the message is a bug
tHub for semantically related open issues with a separate OpenAI call
4. It posts a comment in the Slack thread with links to related GitHub issues, with a "Relevance
export default async function(req: Request) {
const { OpenAI } = await import("https://esm.town/v/std/openai");
const { PDFExtract } = await import("npm:pdf.js-extract");
const action = url.searchParams.get("action");
const sourceUrl = import.meta.url.replace("esm.town", "val.town");
const openai = new OpenAI();
const MAX_TEXT_SUGGEST = 20000;
const MAX_TEXT_ANALYZE = 30000;
agentName: string,
): Promise<object> {
log.push({ agent: agentName, type: "step", message: `Calling OpenAI gpt-4o...` });
try {
const response = await openai.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "system", content: systemPrompt }, { role: "user", content: userMessa
Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },
Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },
Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },
Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },
Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },
Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },