Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add Local API Server Setup Instructions #4433

Closed
imtuyethan opened this issue Jan 11, 2025 · 0 comments · Fixed by #4460
Closed

docs: Add Local API Server Setup Instructions #4433

imtuyethan opened this issue Jan 11, 2025 · 0 comments · Fixed by #4460
Assignees
Labels
type: docs Improvements or additions to documentation
Milestone

Comments

@imtuyethan
Copy link
Contributor

imtuyethan commented Jan 11, 2025

Problem Statement

Users are experiencing difficulties connecting to Jan's local API server from other machines on the network. Common issues include:

  • Confusion about proper endpoint URL format (HTTP vs HTTPS)
  • Unclear instructions about required headers and authentication
  • Cross-platform connectivity issues (Windows server to Mac client)
  • HPE_INVALID_HEADER_TOKEN errors when attempting connections

Documentation Updates Needed

1. Local API Server Setup Section

Add clear instructions for:

  • How to properly start the local API server
  • Default port settings (1337)
  • How to configure server to accept external connections (0.0.0.0)
  • Required headers and authentication setup
  • Common connectivity issues and troubleshooting

2. Example Usage Section

Add examples showing:

# Basic endpoint format
http://{ip-address}:1337/v1/chat/completions

# Required headers
Authorization: Bearer [token]
Content-Type: application/json

# Example cURL request
curl -X POST \
  http://192.168.1.100:1337/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer [token]" \
  -d '{
    "messages": [{"role": "user", "content": "Hello!"}],
    "model": "YOUR_MODEL_ID"
  }'

3. Cross-Platform Considerations

  • Instructions for Windows server setup
  • Instructions for Mac/Linux client setup
  • Network configuration requirements
  • Common platform-specific issues and solutions

4. Troubleshooting Guide

Common issues and solutions:

  • HPE_INVALID_HEADER_TOKEN error resolution
  • Connection refused errors
  • Authentication failures
  • Missing header errors
  • Cross-origin (CORS) issues

Additional Notes

  • Include warning about security considerations when exposing the API server
  • Add note about HTTP vs HTTPS usage in local network
  • Consider adding diagrams for network setup

Related Issues

  • #issue_number (original user report about connectivity problems)
@github-project-automation github-project-automation bot moved this to Investigating in Menlo Jan 11, 2025
@imtuyethan imtuyethan self-assigned this Jan 11, 2025
@imtuyethan imtuyethan added the type: docs Improvements or additions to documentation label Jan 11, 2025
@imtuyethan imtuyethan added this to the v0.5.14 milestone Jan 13, 2025
@imtuyethan imtuyethan moved this from Investigating to Scheduled in Menlo Jan 13, 2025
@imtuyethan imtuyethan removed this from the v0.5.14 milestone Jan 14, 2025
@imtuyethan imtuyethan moved this from Scheduled to Eng Review in Menlo Jan 15, 2025
@github-project-automation github-project-automation bot moved this from Eng Review to QA in Menlo Jan 16, 2025
@imtuyethan imtuyethan moved this from QA to Completed in Menlo Jan 16, 2025
@imtuyethan imtuyethan modified the milestones: v0.5.14, v0.5.15 Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Improvements or additions to documentation
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

1 participant