Spaces:
Sleeping
Sleeping
Deploy FastAPI server with CodeLlama 7B
Browse files12345678910111213---title: Deepseek Coder 6b Apiemoji: 🔥colorFrom: bluecolorTo: pinksdk: gradiosdk_version: 4.19.0 # MUST match the version in requirements.txtpython_version: 3.10 # CRITICAL: Targets the compatible Python for our pre-built wheelapp_file: app.pypinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758---title: CodeLlama API Serveremoji: 🚀colorFrom: bluecolorTo: purplesdk: dockerapp_port: 7860pinned: falselicense: apache-2.0startup_duration_timeout: 1h---# CodeLlama API ServerOpenAI-compatible API server running CodeLlama 7B Instruct for code generation.## Features- OpenAI-compatible `/v1/chat/completions` endpoint- OpenAI-compatible `/v1/completions` endpoint- Simple `/generate` endpoint for quick testing- No rate limiting - designed for unlimited usage- Up to 4096 token context and responses- CORS enabled for MCP server integration## API Endpoints### Chat Completions (Recommended)```bashcurl -X POST https://truegleai-deepseek-coder-6b-api.hf.space/v1/chat/completions \-H "Content-Type: application/json" \-d '{"model": "codellama-7b-instruct","messages": [{"role": "user", "content": "Write a Python function to reverse a string"}],"max_tokens": 512}'```### Simple Generation```bashcurl -X POST https://truegleai-deepseek-coder-6b-api.hf.space/generate \-H "Content-Type: application/json" \-d '{"prompt": "Write a Python function to reverse a string","max_tokens": 512}'```## MCP Server IntegrationUse this Space as a backend for your MCP server by pointing it to:```https://truegleai-deepseek-coder-6b-api.hf.space```The API is OpenAI-compatible, so you can use it anywhere you'd use OpenAI's API.
README.md+53-8