Skip to content

Commit

Permalink
updating for 0.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
wehale committed May 9, 2024
1 parent 28e906b commit fef8f02
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 18 deletions.
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
# doc-gen

Doc-gen is an open source utility for testing the use of Artificial Intelligence (AI) in the Software Development Life Cycle (SDLC). The current version 0.1 allows the user to generate documentation from a set of source code using three different Inference Providers and their associated Large Language Models (LLMs). The Inference Providers that are supported are: OpenAI, Google AI and Hugging Face. The LLMs used can be configured in the root `config.yaml` file.
Doc-gen is an open source utility for testing the use of Artificial Intelligence (AI) in the Software Development Life Cycle (SDLC). The current version 0.1 allows the user to generate documentation from a set of source code using three different Inference Providers and their associated Large Language Models (LLMs). The Inference Providers that are supported are: [OpenAI](https://openai.com/), [Google AI](https://ai.google/) and [Hugging Face](https://huggingface.co/). The LLMs used can be configured in the root `config.yaml` file.

- [doc-gen](#doc-gen)
- [Usage](#usage)
- [Platforms supported](#platforms-supported)
- [Install Python](#install-python)
- [Clone the Repo](#clone-the-repo)
- [Configure Your API Keys](#configure-your-api-keys)
- [OpenAI API Key](#openai-api-key)
- [Google AI API Key](#google-ai-api-key)
- [Hugging Face API Key](#hugging-face-api-key)
- [Running doc-gen](#running-doc-gen)
- [Output](#output)

## Usage

### Platforms supported

Doc-gen 0.1 is a command line utility. It has been created and tested on Linux, however it should also run on MacOS and Windows under Windows Subsystem for Linux (WSL) with Ubuntu 22.
Doc-gen is a command line utility. It has been created and tested on Linux, however it should also run on MacOS and Windows under Windows Subsystem for Linux (WSL) with Ubuntu 22.

### Install Python

Expand All @@ -27,7 +39,7 @@ In order to do this you will need both `git` and an `SSH key` in your GitHub acc

Doc-gen supports three different Inference Providers, OpenAI, GoogleAI and Hugging Face. The cost of using these providers varies from free to pay as you go, to a monthly fee. Doc-gen is not paying for access to these providers so you will have to set up your own accounts and set the associated `API Keys` in your system's environment variables. For more information on doing this see below:

#### OpenAI
#### OpenAI API Key

In order to use OpenAI as an Inference Provider you will need to set up an OpenAI account. Comprehensive information on OpenAI account setup is available here: https://platform.openai.com/docs/quickstart/account-setup. OpenAI has a free tier which is rate limited, or you can choose a pay as you go plan. More information on pricing options at OpenAI are available here: https://openai.com/api/pricing/. The pricing is not too terribly expensive (I spent $30 getting Doc-gen to the 0.1 release). But having said that, it is not free either. If free is what you are looking for you may wish to opt for one of the other Inference Providers listed below.

Expand All @@ -43,7 +55,7 @@ Once you have added the API key to your `~/.profile` file you'll need to `source

In OpenAI, API Keys are attached to projects. You will want to create a new project and API Key for any testing you do with Doc-gen so that you have a clean sandbox in which to do your work.

#### Google AI
#### Google AI API Key

In order to use Google AI as an Inference Provider you will need a Google AI (for Developers) account, which you can get through your regular Google Login if you have one for GMail. More information on Google AI for Developers is located here: https://ai.google.dev/gemini-api/docs. Use of Google AI Gemini is free ... to a point based on rate and requests per day (RPD) limits. More information on pricing is available here: https://ai.google.dev/pricing

Expand All @@ -59,7 +71,7 @@ Once you have added the API key to your `~/.profile` file you'll need to `source

Google AI API Keys are tied to Google Cloud projects. Pricing is also tied to the pricing model chosen for that project. As with OpenAI, if you do a lot of work with this or any other key you'll be gently pushed into pay-as-you-go pricing.

#### Hugging Face
#### Hugging Face API Key

In order to use Hugging Face as an Inference Provider you will need to create a Hugging Face account. Information on creating an account is available here: https://huggingface.co/welcome. Use of Hugging Face has a (severely rate limited) free tier or you can sign up with a `PRO` account for what is currently $9/month. Information on pricing is available here: https://huggingface.co/pricing

Expand Down
27 changes: 14 additions & 13 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@ title: Generated by doc-gen
version: 1.0
author: doc-gen

#Input Settings
#Input Settings, change these paths if you would like doc-gen to run on files in a different directory
input:
doc_path: ./samples
ut_path: ./samples

#Output Settings
#Output Settings, where the generated output goes
output:
doc_path: ./build/doc
ut_path: ./build/ut
code_path: ./build/code

#Doc Pub directory
#Doc Pub directory, the directory where the generated HTML documentation is generated
docpub:
path: ./build/doc/pub

# Original Gen Settings
# Original Gen Settings, settings for generating reference files for the original input files
# So that they can be viewed alongside the generated output
orig:
use: True
name: Original
Expand All @@ -32,28 +33,28 @@ orig:
oaillm:
use: True # Set to False to disable all of the Open AI Runs
name: OpenAI
model: gpt-4-turbo
gen_file_prefix: _oaillm_
model: gpt-4-turbo # The model to use for the OpenAI runs
gen_file_prefix: _oaillm_ # prefix attached to the generated files so that they can be identified
description_prefix: OpenAI
doc_run: True # Set to False to disable the Open AI Doc Generation
doc_prompts: ./prompt/doc_prompts_oai.jsonl
doc_prompts: ./prompt/doc_prompts_oai.jsonl # Open AI prompts used for doc generation

# Configuration settings for Google AI
gllm:
use: True # Set to False to disable all of the Google AI Runs
name: Google AI
model: gemini-pro
gen_file_prefix: _gllm_
model: gemini-pro # The model to use for the Google AI runs
gen_file_prefix: _gllm_ # prefix attached to the generated files so that they can be identified
description_prefix: GoogleAI
doc_run: True # Set to False to disable the Google AI Doc Generation
doc_prompts: ./prompt/doc_prompts_gai.jsonl
doc_prompts: ./prompt/doc_prompts_gai.jsonl # Google AI prompts used for doc generation

# Configuration settings for Hugging Face
hfllm:
use: True # Set to False to disable all of the Hugging Face Runs
name: Hugging Face
model: openai-community/gpt2
gen_file_prefix: _hfllm_
model: openai-community/gpt2 # The model to use for the Hugging Face runs
gen_file_prefix: _hfllm_ # prefix attached to the generated files so that they can be identified
description_prefix: HuggingFace
doc_run: True # Set to False to disable the Hugging Face Doc Generation
doc_prompts: ./prompt/doc_prompts_hf.jsonl
doc_prompts: ./prompt/doc_prompts_hf.jsonl # Hugging Face prompts used for doc generation

0 comments on commit fef8f02

Please sign in to comment.