Metadata-Version: 2.1
Name: talk-codebase
Version: 0.1.41
Summary: talk-codebase is a powerful tool for querying and analyzing codebases.
Keywords: chatgpt,openai,cli
Author: Saryev Rustam
Author-email: rustam1997@gmail.com
Requires-Python: >=3.8.1,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: faiss-cpu (>=1.7.4,<2.0.0)
Requires-Dist: fire (>=0.5.0,<0.6.0)
Requires-Dist: gitpython (>=3.1.31,<4.0.0)
Requires-Dist: gpt4all (>=1.0.1,<2.0.0)
Requires-Dist: halo (>=0.0.31,<0.0.32)
Requires-Dist: langchain (>=0.0.223,<0.0.224)
Requires-Dist: llama-cpp-python (>=0.1.67,<0.2.0)
Requires-Dist: openai (>=0.27.7,<0.28.0)
Requires-Dist: questionary (>=1.10.0,<2.0.0)
Requires-Dist: sentence-transformers (>=2.2.2,<3.0.0)
Requires-Dist: tiktoken (>=0.4.0,<0.5.0)
Requires-Dist: unstructured (>=0.6.10,<0.7.0)
Requires-Dist: urllib3 (==1.26.6)
Description-Content-Type: text/markdown

## talk-codebase 
[![Node.js Package](https://github.com/rsaryev/talk-codebase/actions/workflows/python-publish.yml/badge.svg)](https://github.com/rsaryev/talk-codebase/actions/workflows/python-publish.yml)

* Simple configuration in just a couple of clicks
* Talk-codebase is a tool that allows you to converse with your codebase using LLMs (Large Language Models) to answer your queries.
* It supports offline code processing using LlamaCpp and [GPT4All](https://github.com/nomic-ai/gpt4all) without sharing your code with third parties, or you can use OpenAI if privacy is not a concern for you.
* Talk-codebase is still under development, but it is a tool that can help you to improve your code. It is only recommended for educational purposes and not for production use.

<p align="center">
  <img src="https://github.com/rsaryev/talk-codebase/assets/70219513/b5d338f9-14a5-417b-9690-83f5cd66facf" width="800" alt="chat">
</p>

## Installation

To install talk-codebase, you need to have:

* Python 3.9
* An OpenAI API [api-keys](https://platform.openai.com/account/api-keys)

```bash
# Install talk-codebase
pip install talk-codebase

# If you want some files to be ignored, add them to .gitignore.
# Once `talk-codebase` is installed, you can use it to chat with your codebase in the current directory by running the following command:
talk-codebase chat .
```

## Reset configuration
```bash
# If you want to reset the configuration, you can run the following command:
talk-codebase configure
```

## Advanced configuration

You can also edit the configuration manually by editing the `~/.config.yaml` file.
If for some reason you cannot find the configuration file, just run the tool and at the very beginning it will output
the path to the configuration file.

```yaml
# The OpenAI API key. You can get it from https://beta.openai.com/account/api-keys
api_key: sk-xxx

# Configuration for chunking
chunk_overlap: 50
chunk_size: 500

# Configuration for sampling
k: 4
max_tokens: 1048

# Configuration for the LLM model
openai_model_name: gpt-3.5-turbo
# Type of model to use. You can choose between `openai` and `local`.
model_type: openai
local_model_name: orca-mini-7b.ggmlv3.q4_0.bin
# Path to local model. If you want to use a local model, you need to specify the path to it.
model_path: 'absolute path to local model'
```

## Supports the following extensions:

- [x] `.csv`
- [x] `.doc`
- [x] `.docx`
- [x] `.epub`
- [x] `.md`
- [x] `.pdf`
- [x] `.txt`
- [x] `popular programming languages`

## Contributing

* If you find a bug in talk-codebase, please report it on the project's issue tracker. When reporting a bug, please include as much information as possible, such as the steps to reproduce the bug, the expected behavior, and the actual behavior.
* If you have an idea for a new feature for Talk-codebase, please open an issue on the project's issue tracker. When suggesting a feature, please include a brief description of the feature, as well as any rationale for why the feature would be useful.
* You can contribute to talk-codebase by writing code. The project is always looking for help with improving the codebase, adding new features, and fixing bugs.

