{"id":19148966,"url":"https://github.com/be12ma-png/solid-tribble-translator","last_synced_at":"2025-04-19T15:32:15.875Z","repository":{"id":261885056,"uuid":"868508182","full_name":"be12ma-png/solid-tribble-translator","owner":"be12ma-png","description":"Cohere Restful API in Go","archived":false,"fork":false,"pushed_at":"2024-10-06T15:31:34.000Z","size":383,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-09T02:27:06.603Z","etag":null,"topics":["cohere","golang","postman","restful-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/be12ma-png.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-10-06T15:07:52.000Z","updated_at":"2024-10-06T15:31:37.000Z","dependencies_parsed_at":"2024-11-09T02:37:09.719Z","dependency_job_id":null,"html_url":"https://github.com/be12ma-png/solid-tribble-translator","commit_stats":null,"previous_names":["be12ma-png/solid-tribble-translator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be12ma-png%2Fsolid-tribble-translator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be12ma-png%2Fsolid-tribble-translator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be12ma-png%2Fsolid-tribble-translator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be12ma-png%2Fsolid-tribble-translator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/be12ma-png","download_url":"https://codeload.github.com/be12ma-png/solid-tribble-translator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223801024,"owners_count":17205009,"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","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":["cohere","golang","postman","restful-api"],"created_at":"2024-11-09T08:05:48.069Z","updated_at":"2024-11-09T08:05:48.632Z","avatar_url":"https://github.com/be12ma-png.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# effective-octo-computing-machine - My Cohere API Project\n\nThis project provides a simple RESTful API interface for interacting with the Cohere AI model using go.\n\n\u003cimg width=\"1070\" alt=\"api_demo\" src=\"https://github.com/user-attachments/assets/b28b738f-2406-4367-bd47-f15cc4f4eb19\"\u003e\n\n\n## Getting Started\n\n### Prerequisites\n\n- Go 1.23.2 or later\n- An API key from Cohere\n\n### Setup\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/yourusername/my-cohere-api.git\n   cd THIS-RESPOS-NAME\n   ```\n\n2. Create a `.env` file in the root of the project directory. This file should contain your Cohere API key. \n\n   Example `.env` file:\n   ```plaintext\n   # This is an example .env file. Below is the way you should place your COHERE_API_KEY\n   # Assume your COHERE_API_KEY is \"123456\"\n   COHERE_API_KEY=123456\n   ```\n\n### Default Model\n\n- The project defaults to the **Command R+ 08-2024** model from Cohere, which cannot be changed in the provided code.\n\n### Running the Application\n\nTo start the server, use:\n\n```bash\nmake start\n```\n\n### API Endpoint\n\n- **POST** `/chat`\n  - Sends a message to the AI model and receives a response.\n\n\n### Testing with Postman\n\nTo test the API using Postman, follow these steps:\n\n1. Open Postman and create a new request.\n2. Set the request type to **POST**.\n3. Enter the URL: `http://localhost:8080/chat`.\n4. Go to the **Headers** tab and set the **Content-Type** to `application/json`.\n5. In the **Body** tab, select the **raw** option and choose **JSON** from the dropdown menu.\n6. Enter the JSON payload, for example:\n\n   ```json\n   {\n     \"message\": \"Hello, AI!\"\n   }\n\n   ```\n\n7. Send the request and observe the response.\n\n\u003cimg width=\"1050\" alt=\"api_post\" src=\"https://github.com/user-attachments/assets/1563cc76-326e-47ad-8c88-28f234a1bfd1\"\u003e\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbe12ma-png%2Fsolid-tribble-translator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbe12ma-png%2Fsolid-tribble-translator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbe12ma-png%2Fsolid-tribble-translator/lists"}