LangMate is a command-line application developed in Go, designed to provide users with a seamless interaction with different language models. It supports various models, allowing users to choose between models like Ollama and OpenAI for processing and generating text.
Screen.Recording.2024-07-20.at.20.28.19.mov
- Multiple Language Models: Choose between OpenAI and Ollama
- Easy Text Processing: Simply perform a double
Command+C
on any text to translate or rephrase it.
- Go 1.16 or higher
To install LangMate from source, follow these steps:
-
Clone the repository:
git clone https://github.com/niuguy/langmate.git cd langmate
-
Build the application:
go build -o langmate
-
Optionally, install the application globally:
go install
If you prefer not to clone the repository, you can install directly using Go:
go install github.com/niuguy/langmate@latest
Ensure your GOPATH/bin
is in your system's PATH to run the application from any terminal.
To use LangMate, run the executable with the desired options:
langmate [-m model] [--lang language]
-m, --model
: Specify the model to use (default: "gpt"). Available models include "gpt", "llama" , gpt represents OpenAI's GPT-4 Turbo model, and llama represents Ollama's llama3-8b.-l, --lang
: Specify the target language (default: "en"). Available languages include "en", "fr", etc.
-
Using the default model (GPT-4 Turbo) and language (English):
langmate
-
Using a different model and language:
langmate -m gpt --lang fr
Set environment variables as needed:
export OPENAI_API_KEY="your-openai-api-key"
Contributions are welcome! Please feel free to submit a pull request or open an issue if you have feedback or proposals for new features.
Distributed under the MIT License. See LICENSE
for more information.