Skip to content

Conversation

@subtleGradient
Copy link
Contributor

Add basic fetch example extracted from wrapper repo

Run biome format

Copy link
Contributor Author

subtleGradient commented Nov 11, 2025

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a basic fetch API example demonstrating how to make direct HTTP requests to OpenRouter's API using native fetch without additional libraries. This provides a simpler, more accessible starting point for developers compared to the existing prompt-caching examples.

Key Changes:

  • Adds a standalone fetch example with OpenAI-compatible chat completions
  • Includes comprehensive inline documentation and error handling
  • Uses TypeScript for type safety with local type definitions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@subtleGradient subtleGradient changed the base branch from 02-prompt-caching-fetch to graphite-base/47 November 12, 2025 22:22
@subtleGradient subtleGradient changed the base branch from graphite-base/47 to pdf-example-effect November 12, 2025 23:18
console.log('Message:', requestBody.messages[0]?.content);
console.log();

try {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

top-level fetch?

Copy link
Contributor Author

subtleGradient commented Nov 19, 2025

Merge activity

@subtleGradient subtleGradient changed the base branch from pdf-example-effect to graphite-base/47 November 19, 2025 17:46
@subtleGradient subtleGradient changed the base branch from graphite-base/47 to main November 19, 2025 17:47
@subtleGradient subtleGradient merged commit ce141a2 into main Nov 19, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants