Search

3,380 results found for openai (1853ms)

Code
3,285

- **Hono** API framework
- **Supabase** with PGVector for vector search
- **OpenAI/Mistral** for AI responses
- **Hugging Face** for embeddings
### Prerequisites
- Supabase project with PGVector extension
- OpenAI or Mistral API key
- Hugging Face API key (optional for server-side embeddings)
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
OPENAI_API_KEY=your_openai_key
HUGGING_FACE_API_KEY=your_hf_key (optional)
```
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" },
# Person Enrichment API
An HTTP endpoint that enriches person data using OpenAI's web search capabilities. Provide basic
## Setup
1. Set your OpenAI API key as an environment variable: `OPENAI_API_KEY`
2. The API uses the `gpt-4o-search-preview` model with web search capabilities
- `405 Method Not Allowed`: Only POST requests are accepted
- `400 Bad Request`: No identifiers provided (at least one field required)
- `500 Internal Server Error`: OpenAI API error or processing failure
## Example Usage
## Features
- **Web Search Integration**: Uses OpenAI's `gpt-4o-search-preview` model with web search capabi
- **Form Data Support**: Accepts standard HTML form submissions and FormData objects
- **Comprehensive Research**: Provides structured information across multiple categories
## Rate Limits
The API is subject to OpenAI's rate limits for the `gpt-4o-search-preview` model. Consider imple
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" },