Skip to content

Commit

Permalink
Merge pull request #5 from FireHead90544/add-providers
Browse files Browse the repository at this point in the history
build: v0.2.0 out
  • Loading branch information
FireHead90544 authored Jul 28, 2024
2 parents 052719d + da01b32 commit 7761f3e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 15 deletions.
31 changes: 20 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@ An AI-based CLI assistant to help you with command line & shell.


## Demo
Would be adding install instructions and better demo soon, until then check this out.
### Setup
![image](https://github.com/user-attachments/assets/87d3ba64-ecb7-43c6-9863-a62c39396ac5)

### Inferences
![image](https://github.com/user-attachments/assets/7af58310-183a-429b-aa66-e6abe36713fb)
![image](https://github.com/user-attachments/assets/20062ac2-1057-4139-9f60-990bd41605da)
https://github.com/user-attachments/assets/effefe1a-c0ed-4b60-838c-98f992f6c25f


## Installation
Expand Down Expand Up @@ -80,8 +74,23 @@ $ how to [OPTIONS] TASK
## Providers
`how-cli` uses ChatModels as they support chat messages as opposed to TextModels and below model providers and their corresponding models are available to use.
`how-cli` uses ChatModels as they support chat messages as opposed to TextModels and below model providers and their corresponding models are available to use. If you could test the models that are marked as ❌, please create an issue or pull request along with the test results.
| Provider | Model | Package | Tested |
|:--------:|:-----:|:-------:|:------:|
| GoogleGenAI | `gemini-1.5-flash` | `langchain-google-genai` | ✅ |
| GoogleVertexAI | `gemini-1.5-flash` | `langchain-google-vertexai` | ❌ |
| GroqMistralAI | `mixtral-8x7b-32768` | `langchain-groq` | ✅ |
| GroqLLaMa | `llama3-70b-8192` | `langchain-groq` | ✅ |
| OpenAI | `gpt-4o` | `langchain-openai` | ❌ |
| Anthropic | `claude-3-5-sonnet-20240620` | `langchain-anthropic` | ❌ |
# License
`how-cil` is licensed under the MIT License, it can be found [here](https://github.com/FireHead90544/how-cli/blob/main/LICENSE).
# Honourable Mentions
This project is greatly inspired by [kynnyhsap's](https://github.com/kynnyhsap) [how](https://github.com/kynnyhsap/how). Though my implementation is completely different (refer to the below image for architectural details), but at the core both the projects aims to do the same thing. Also, check out LangChain & Typer using which this project was built.

| Provider | Model | Package |
|:--------:|:-----:|:-------:|
| Google | `gemini-1.5-flash` | `langchain-google-genai` |
![arch](https://github.com/user-attachments/assets/5335fb1d-7899-4ebf-9ff3-dfa139a9c5f8)
2 changes: 1 addition & 1 deletion how/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
Package containing the core modules of the project.
"""

__version__ = "0.1.0"
__version__ = "0.2.0"
__author__ = "Rudransh Joshi (FireHead90544)"
11 changes: 10 additions & 1 deletion how/core/providers.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import os
from langchain_google_genai import ChatGoogleGenerativeAI
from langchain_google_vertexai import ChatVertexAI
from langchain_openai import ChatOpenAI
from langchain_anthropic import ChatAnthropic
from langchain_groq import ChatGroq

os.environ["GRPC_VERBOSITY"] = "NONE"

LLM_PROVIDERS = {
"Gemini": { "provider": ChatGoogleGenerativeAI, "model": "gemini-1.5-flash" },
"GoogleGenAI": { "provider": ChatGoogleGenerativeAI, "model": "gemini-1.5-flash" },
"GoogleVertexAI": { "provider": ChatVertexAI, "model": "gemini-1.5-flash" },
"GroqMistralAI": { "provider": ChatGroq, "model": "mixtral-8x7b-32768" },
"GroqLLaMa": { "provider": ChatGroq, "model": "llama3-70b-8192" },
"OpenAI": { "provider": ChatOpenAI, "model": "gpt-4o" },
"Anthropic": { "provider": ChatAnthropic, "model": "claude-3-5-sonnet-20240620" }
}
6 changes: 5 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
typer
langchain
langchain-google-genai
langchain-google-genai
langchain-google-vertexai
langchain-groq
langchain-openai
langchain-anthropic
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from how import __version__, __author__
from setuptools import setup, find_packages

with open("README.md", "r") as f:
with open("README.md", "r", encoding="utf-8") as f:
readme = f.read()

with open("requirements.txt", "r") as f:
Expand Down

0 comments on commit 7761f3e

Please sign in to comment.