{"id":21715246,"url":"https://github.com/davidwrossiter/unsalad","last_synced_at":"2025-07-25T11:33:29.313Z","repository":{"id":245118956,"uuid":"817317473","full_name":"davidwrossiter/unsalad","owner":"davidwrossiter","description":"Worker to manage the chunking and embedding of a codebase.","archived":false,"fork":false,"pushed_at":"2024-06-20T09:46:54.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-25T09:03:14.013Z","etag":null,"topics":["ai","cloudflare","cloudflare-workers","ml","serverless"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidwrossiter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-19T13:04:09.000Z","updated_at":"2024-06-19T13:20:25.000Z","dependencies_parsed_at":"2024-06-23T00:15:26.913Z","dependency_job_id":null,"html_url":"https://github.com/davidwrossiter/unsalad","commit_stats":null,"previous_names":["davidwrossiter/unsalad"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidwrossiter/unsalad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidwrossiter%2Funsalad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidwrossiter%2Funsalad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidwrossiter%2Funsalad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidwrossiter%2Funsalad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidwrossiter","download_url":"https://codeload.github.com/davidwrossiter/unsalad/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidwrossiter%2Funsalad/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266997947,"owners_count":24018949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cloudflare","cloudflare-workers","ml","serverless"],"created_at":"2024-11-26T00:41:51.226Z","updated_at":"2025-07-25T11:33:29.266Z","avatar_url":"https://github.com/davidwrossiter.png","language":"TypeScript","readme":"# Unsalad Documentation\n\n## Overview\n\nThis document provides details about our API. The base domain is https://unsalad.rossiter.dev\n\n## Endpoint\n\n### POST /\n\n#### Description\n\nThis endpoint accepts a JSON body containing a context and a query. It returns a JSON response with the requested code snippet formatted in markdown.\n\n#### Request Format\n\n- **Method:** POST\n- **Content-Type:** application/json\n- **Body:**\n  ```json\n  {\n      \"context\": \"CONTEXT: You are a helpful assistant and must return code only do not respond with anything but the code everything must be in markdown format only. Your task is to\",\n      \"query\": \"write a bubble sort algorithm in javascript\"\n  }\n  ```\n\n#### Response Format\n\n- **Content-Type:** application/json\n- **Body:**\n  ```json\n  {\n      \"response\": \"```javascript\\nfunction bubbleSort(arr) {\\n  let swapped;\\n  do {\\n    swapped = false;\\n    for (let i = 0; i \u003c arr.length - 1; i++) {\\n      if (arr[i] \u003e arr[i + 1]) {\\n        [arr[i], arr[i + 1]] = [arr[i + 1], arr[i]];\\n        swapped = true;\\n      }\\n    }\\n  } while (swapped);\\n  return arr;\\n}\\n```\"\n  }\n  ```\n\n## Example Usage\n\n### Request\n\n```bash\ncurl -X POST https://api.example.com/generate-code \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"context\": \"CONTEXT: You are a helpful assistant and must return code only do not respond with anything but the code everything must be in markdown format only. Your task is to\",\n  \"query\": \"write a bubble sort algorithm in javascript\"\n}'\n```\n\n### Response\n\n```json\n{\n    \"response\": \"```javascript\\nfunction bubbleSort(arr) {\\n  let swapped;\\n  do {\\n    swapped = false;\\n    for (let i = 0; i \u003c arr.length - 1; i++) {\\n      if (arr[i] \u003e arr[i + 1]) {\\n        [arr[i], arr[i + 1]] = [arr[i + 1], arr[i]];\\n        swapped = true;\\n      }\\n    }\\n  } while (swapped);\\n  return arr;\\n}\\n```\"\n}\n```\n\n## Error Handling\n\nIn case of an error, the API will return a JSON response with the appropriate HTTP status code and a message describing the error.\n\n### Example Error Response\n\n- **Status Code:** 400 Bad Request\n- **Content-Type:** application/json\n- **Body:**\n  ```json\n  {\n      \"error\": \"Invalid request format. Please ensure your request matches the expected JSON structure.\"\n  }\n  ```\n\n## Contact\n\nFor further assistance, please contact me on [𝕏](https://x.com/davidwrossiter).\n---\n\nEnd of Documentation.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidwrossiter%2Funsalad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidwrossiter%2Funsalad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidwrossiter%2Funsalad/lists"}