Search

4,149 results found for openai (1235ms)

Code
4,041

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" },
name: `${hotel_name} Concierge`,
model: {
provider: "openai",
model: "gpt-4.1",
messages: [
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" },
apiKeys: {
groq: '',
openai: '', // Future support
anthropic: '' // Future support
}
- Monospace font for better readability
- Link to Groq console for obtaining API keys
- Placeholder for OpenAI API key (coming soon)
#### 4. Messaging (`frontend/app/messaging.js`)
1. **Additional Providers**
- OpenAI API key support
- Anthropic API key support
- Custom provider configuration
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" },
} from "../providers/model-configs.ts";
import { CustomProvider } from "../providers/custom.ts";
import { OpenAIProvider } from "../providers/openai.ts";
type HonoApp = {
});
// Discover models from a custom OpenAI-compatible endpoint
app.post('/api/providers/discover-models', async (c: Context) => {
try {
let models: Array<{ id: string; name: string; owned_by?: string }> = [];
if (provider === 'openai') {
// Use OpenAI provider's listModels method
const openaiProvider = getProvider('openai') as OpenAIProvider | undefined;
if (openaiProvider && typeof openaiProvider.listModels === 'function') {
models = await openaiProvider.listModels(apiKey);
} else {
// Fallback to custom discovery
}
} else {
// Use custom provider for OpenAI-compatible endpoints
const customProvider = new CustomProvider({ baseUrl, apiKey });
models = await customProvider.listModels(baseUrl, apiKey);
const { baseUrl, apiKey, provider } = body;
if (!baseUrl && provider !== 'groq' && provider !== 'openai' && provider !== 'anthropic') {
return c.json({ error: 'Base URL is required for custom providers' }, 400);
}

Vals

94
View more
Ronsykes
hello-realtime
Sample app for the OpenAI Realtime API
Public
Ronsykes
hello-realtime-rs
Sample app for the OpenAI Realtime API
Public
dcm31
turso_events_estimator
Estimate OpenAI calls from Turso GitHub events
Public
fancylamp
hello-realtime
Sample app for the OpenAI Realtime API
Public
peterqliu
PineconeIndex
Vector db's on Pinecone, with OpenAI embeddings
Public

Docs

11
View more
No docs found