Skip to content

Commit

Permalink
Remove Google Bard (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
kharvd authored May 29, 2024
1 parent 1112511 commit e57eb2a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 82 deletions.
31 changes: 8 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# gpt-cli

Command-line interface for ChatGPT Claude and Bard.
Command-line interface for chat LLMs.

## Supported providers

- OpenAI
- Anthropic
- Cohere
- Other APIs compatible with OpenAI

![screenshot](https://github.com/kharvd/gpt-cli/assets/466920/ecbcccc4-7cfa-4c04-83c3-a822b6596f01)

## Features

### **Coming soon** - Code Interpreter support https://github.com/kharvd/gpt-cli/pull/37

- **Command-Line Interface**: Interact with ChatGPT or Claude directly from your terminal.
- **Model Customization**: Override the default model, temperature, and top_p values for each assistant, giving you fine-grained control over the AI's behavior.
- **Usage tracking**: Track your API usage with token count and price information.
Expand Down Expand Up @@ -214,23 +219,3 @@ Now you should be able to run `gpt` with `--model claude-v1` or `--model claude-
```bash
gpt --model claude-v1
```

### Google Bard (PaLM 2)

Similar to Claude, set the Google API key

```bash
export GOOGLE_API_KEY=<your_key_here>
```

or a config line:

```yaml
google_api_key: <your_key_here>
```

Run `gpt` with the correct model:

```bash
gpt --model chat-bison-001
```
3 changes: 0 additions & 3 deletions gptcli/assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
ModelOverrides,
Message,
)
from gptcli.google import GoogleCompletionProvider
from gptcli.llama import LLaMACompletionProvider
from gptcli.openai import OpenAICompletionProvider
from gptcli.anthropic import AnthropicCompletionProvider
Expand Down Expand Up @@ -77,8 +76,6 @@ def get_completion_provider(model: str) -> CompletionProvider:
return AnthropicCompletionProvider()
elif model.startswith("llama"):
return LLaMACompletionProvider()
elif model.startswith("chat-bison"):
return GoogleCompletionProvider()
elif model.startswith("command") or model.startswith("c4ai"):
return CohereCompletionProvider()
else:
Expand Down
2 changes: 1 addition & 1 deletion gptcli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class GptCliConfig:
openai_api_key: Optional[str] = os.environ.get("OPENAI_API_KEY")
openai_base_url: Optional[str] = os.environ.get("OPENAI_BASE_URL")
anthropic_api_key: Optional[str] = os.environ.get("ANTHROPIC_API_KEY")
google_api_key: Optional[str] = os.environ.get("GOOGLE_API_KEY")
google_api_key: Optional[str] = os.environ.get("GOOGLE_API_KEY") # deprecated
cohere_api_key: Optional[str] = os.environ.get("COHERE_API_KEY")
log_file: Optional[str] = None
log_level: str = "INFO"
Expand Down
48 changes: 0 additions & 48 deletions gptcli/google.py

This file was deleted.

4 changes: 0 additions & 4 deletions gptcli/gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import sys
import logging
import datetime
import google.generativeai as genai
import gptcli.anthropic
import gptcli.cohere
from gptcli.assistant import (
Expand Down Expand Up @@ -187,9 +186,6 @@ def main():
if config.anthropic_api_key:
gptcli.anthropic.api_key = config.anthropic_api_key

if config.google_api_key:
genai.configure(api_key=config.google_api_key)

if config.cohere_api_key:
gptcli.cohere.api_key = config.cohere_api_key

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[project]
name = "gpt-command-line"
version = "0.1.7"
description = "Command-line interface for ChatGPT, Claude and Bard"
description = "Command-line interface for ChatGPT and Claude"
authors = [{name = "Val Kharitonov", email = "[email protected]"}]
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.9"
keywords = ["cli", "command-line", "assistant", "openai", "claude", "bard", "gpt-3", "gpt-4", "llm", "chatgpt", "gpt-cli", "google-bard", "anthropic", "gpt-client", "anthropic-claude", "palm2"]
keywords = ["cli", "command-line", "assistant", "openai", "claude", "cohere", "gpt-3", "gpt-4", "llm", "chatgpt", "gpt-cli", "anthropic", "gpt-client", "anthropic-claude"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
Expand All @@ -22,7 +22,6 @@ dependencies = [
"black==24.4.2",
"cohere==5.5.3",
"mistralai==0.1.8",
"google-generativeai==0.1.0",
"openai==1.30.1",
"prompt-toolkit==3.0.43",
"pytest==7.3.1",
Expand Down

0 comments on commit e57eb2a

Please sign in to comment.