Skip to content

Commit

Permalink
Merge pull request #8 from sbslee/0.9.0-dev
Browse files Browse the repository at this point in the history
0.9.0 dev
  • Loading branch information
sbslee committed Jul 5, 2023
2 parents d1ae859 + 44678ce commit 0ca6139
Show file tree
Hide file tree
Showing 14 changed files with 397 additions and 139 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.9.0 (2023-07-05)
* Enhance chatbot handling of content length exceeding maximum limit.
* Add chat functionality using Google's PaLM API.

## 0.8.0 (2023-06-26)
* Enable ChatGPT to answer questions by making calls to external tools, APIs, or databases.

Expand Down
118 changes: 116 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

Welcome to KANU, a minimalistic Python-based GUI for various chatbots.

There are currently two chatbots available in KANU:
There are currently four chatbots available in KANU:

- [ChatGPT](#chatgpt) harnesses the power of ChatGPT, bringing it directly to your local computer
- [ChatGPT](#chatgpt) harnesses the power of OpenAI's ChatGPT, bringing it directly to your local computer
- [DocGPT](#docgpt) allows you to effortlessly interact with your documents and ask questions about them
- [FuncGPT](#funcgpt) can answer your questions by making calls to external tools, APIs, or databases
- [ChatPaLM](#chatpalm) harnesses the power of Google's PaLM API, bringing it directly to your local computer

Other features of KANU inclde:

Expand Down Expand Up @@ -46,6 +47,18 @@ The following packages are required to run ChatGPT:
openai # Required.
```

You can customize the chatbot parameters by directly editing the configuration file or by using the GUI. The configuration file is in the following format:

```
[DEFAULT]
model = gpt-3.5-turbo
temperature = 0.5
prompt = You are a helpful assistant.
[USER]
openai_key =
```

<a id="docgpt"></a>
### DocGPT

Expand All @@ -56,6 +69,7 @@ DocGPT currently supports the following document formats: `.csv`, `.doc`, `.docx
The following packages are required to run DocGPT:

```
openai # Required.
langchain # Required.
chromadb # Required.
tiktoken # Required.
Expand All @@ -64,6 +78,30 @@ unstructured # Optional. Only required for .doc and .docx documents.
tabulate # Optional. Only required for .doc and .docx documents.
```

You can customize the chatbot parameters by directly editing the configuration file or by using the GUI. The configuration file is in the following format:

```
[DEFAULT]
model = gpt-3.5-turbo
temperature = 0.5
prompt = Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer.
{context}
Question: {question}
Helpful Answer:
chunk_size = 1000
chunk_overlap = 50
[USER]
openai_key =
[OPTIONAL]
new_database_directory =
document_directory =
existing_database_directory =
```

<a id="funcgpt"></a>
### FuncGPT

Expand All @@ -75,6 +113,82 @@ The following packages are required to run FuncGPT:
openai # Required.
```

There may be additional dependencies depending on the external tools, APIs, or databases you use. You are responsible for installing these dependencies.

You can customize the chatbot parameters by directly editing the configuration file or by using the GUI. The configuration file is in the following format:

```
[DEFAULT]
model = gpt-3.5-turbo-0613
temperature = 0.5
prompt = You are a helpful assistant.
[USER]
openai_key =
function_script =
```

Note that the script provided by the user must contain a dictionary variable defined as `functions`, which is imported by FuncGPT. Below is an example script:

```
import json
def get_current_weather(location, unit="fahrenheit"):
weather_info = {
"location": location,
"temperature": "72",
"unit": unit,
"forecast": ["sunny", "windy"],
}
return json.dumps(weather_info)
get_current_weather_json = {
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA",
},
"unit": {"type": "string", "enum": ["celsius", "fahrenheit"]},
},
"required": ["location"],
},
}
functions = {
"get_current_weather": {
"function": get_current_weather,
"json": get_current_weather_json,
}
}
```

<a id="chatpalm"></a>
### ChatPaLM

![Alt Text](https://raw.githubusercontent.com/sbslee/kanu/main/images/chatpalm.gif)

The following packages are required to run ChatPaLM:

```
google.generativeai # Required.
```

You can customize the chatbot parameters by directly editing the configuration file or by using the GUI. The configuration file is in the following format:

```
[DEFAULT]
model = chat-bison-001
temperature = 0.5
prompt = You are a helpful assistant.
[USER]
google_key =
```

## Changelog

See the [CHANGELOG.md](https://github.com/sbslee/kanu/blob/main/CHANGELOG.md) file for details.
Binary file modified images/chatgpt.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/chatpalm.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/docgpt.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/funcgpt.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0ca6139

Please sign in to comment.