Skip to content

Commit

Permalink
Finalizing patch
Browse files Browse the repository at this point in the history
	renamed:    HuggingFace/integrated_captioner.py/__init__.py -> HuggingFace/image_captioner/__init__.py
	renamed:    HuggingFace/integrated_captioner.py/integrable_captioner.py -> HuggingFace/image_captioner/integrable_image_captioner.py
	renamed:    HuggingFace/integrated_captioner.py/template-config.json -> HuggingFace/image_captioner/template-config.json
	renamed:    HuggingFace/integrated_captioner.py/template.env -> HuggingFace/image_captioner/template.env
	renamed:    LangChain/Retrieval-Agents/query_local_docs.py -> LangChain/Retrieval-Agents/qa_local_docs.py
	renamed:    LangChain/Retrieval-Agents/langchain_conv_agent.py -> LangChain/Retrieval-Agents/stateful_chatbot.py
	modified:   README.md
  • Loading branch information
Daethyra committed Oct 8, 2023
1 parent bd909df commit a676a45
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 32 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import os
import glob
from dotenv import load_dotenv
Expand Down
66 changes: 35 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,78 +8,82 @@

#### 1. **[OpenAI: Utilikit](./OpenAI/)**

Contains `Auto-Embedder` and `GPT-Prompt-Examples`.
---

A. **[Auto-Embedder](./Auto-Embedder)**

A. **[Auto-Embedder](./Auto-Embedder)**
Provides an automated pipeline for retrieving embeddings from[OpenAI's `text-embedding-ada-002`](https://platform.openai.com/docs/guides/embeddings) and upserting them to a [Pinecone index](https://docs.pinecone.io/docs/indexes).

Provides an automated pipeline for retrieving embeddings from[OpenAI's `text-embedding-ada-002`](https://platform.openai.com/docs/guides/embeddings) and upserting them to a [Pinecone index](https://docs.pinecone.io/docs/indexes).
- **[`pinembed.py`](./Auto-Embedder/pinembed.py)**: A Python module to easily automate the retrieval of embeddings from OpenAI and storage in Pinecone.
- **[.env.template](./Auto-Embedder/.env.template)**: Template for environment variables.

-**[pinembed.py](./Auto-Embedder/pinembed.py)**: A Python module to easily automate the retrieval of embeddings from OpenAI and storage in Pinecone.
- **[.env.template](./Auto-Embedder/.env.template)**: Template for environment variables.
---

B. **[GPT-Prompt-Examples](./GPT-Prompt-Examples)**
B. **[GPT-Prompt-Examples](./GPT-Prompt-Examples)**

There are three main prompt types,[multi-shot](GPT-Prompt-Examples/multi-shot), [system-role](GPT-Prompt-Examples/system-role), [user-role](GPT-Prompt-Examples/user-role).
There are three main prompt types,[multi-shot](GPT-Prompt-Examples/multi-shot), [system-role](GPT-Prompt-Examples/system-role), [user-role](GPT-Prompt-Examples/user-role).

Please also see the[OUT-prompt-cheatsheet](GPT-Prompt-Examples/OUT-prompt-cheatsheet.md).
Please also see the[OUT-prompt-cheatsheet](GPT-Prompt-Examples/OUT-prompt-cheatsheet.md).

-**[Cheatsheet for quick power-prompts](./GPT-Prompt-Examples/OUT-prompt-cheatsheet.md)**: A cheatsheet for GPT prompts.
- **[multi-shot](./GPT-Prompt-Examples/multi-shot)**: Various markdown and text files for multi-shot prompts.
- **[system-role](./GPT-Prompt-Examples/system-role)**: Various markdown files for system-role prompts.
- **[user-role](./GPT-Prompt-Examples/user-role)**: Markdown files for user-role prompts.
- **[Reference Chatlogs with GPT4](./GPT-Prompt-Examples/ChatGPT_reference_chatlogs)**: Contains chat logs and shorthand prompts.
- **[Cheatsheet for quick power-prompts](./GPT-Prompt-Examples/OUT-prompt-cheatsheet.md)**: A cheatsheet for GPT prompts.
- **[multi-shot](./GPT-Prompt-Examples/multi-shot)**: Various markdown and text files for multi-shot prompts.
- **[system-role](./GPT-Prompt-Examples/system-role)**: Various markdown files for system-role prompts.
- **[user-role](./GPT-Prompt-Examples/user-role)**: Markdown files for user-role prompts.
- **[Reference Chatlogs with GPT4](./GPT-Prompt-Examples/ChatGPT_reference_chatlogs)**: Contains chat logs and shorthand prompts.

---

#### 2. **[LangChain: Pluggable Components](./LangChain/)**

This directory contains pre-built `LangChain` modules that can be side-loaded for various functionalities.
---

A. **`langchain_conv_agent.py`**
A. **[`stateful_chatbot.py`](./LangChain/Retrieval-Agents/stateful_chatbot.py)**

This module offers a set of functionalities for conversational agents in LangChain. Specifically, it provides:
This module offers a set of functionalities for conversational agents in LangChain. Specifically, it provides:

- Argument parsing for configuring the agent
- Document loading via `PyPDFDirectoryLoader`
- Text splitting using `RecursiveCharacterTextSplitter`
- Various embeddings options like `OpenAIEmbeddings`, `CacheBackedEmbeddings`, and `HuggingFaceEmbeddings`

**Usage:**
To use this module, simply import the functionalities you need and configure them accordingly.
**Usage:**
To use this module, simply import the functionalities you need and configure them accordingly.

---

B. **`query_local_docs.py`**
B. **[`qa_local_docs.py`](./LangChain/Retrieval-Agents/qa_local_docs.py)**

This module focuses on querying local documents and employs the following features:
This module focuses on querying local documents and employs the following features:

- Environment variable loading via `dotenv`
- Document loading via `PyPDFLoader`
- Text splitting through `RecursiveCharacterTextSplitter`
- Vector storage options like `Chroma`
- Embedding options via `OpenAIEmbeddings`

**Usage:**
Similar to `langchain_conv_agent.py`, you can import the functionalities you require.
**Usage:**
Similar to `langchain_conv_agent.py`, you can import the functionalities you require.

---

These modules are designed to be extensible and can be easily integrated into your LangChain projects.

---

#### 3. **[HuggingFace: Pluggable Components](./HuggingFace/)**

A. **`integrable_captioner.py`**
A. **[`integrable_captioner.py`](./HuggingFace\image_captioner\integrable_image_captioner.py)**

This module focuses on generating captions for images using Hugging Face's transformer models. Specifically, it offers:
This module focuses on generating captions for images using Hugging Face's transformer models. Specifically, it offers:

- Model and processor initialization via the`ImageCaptioner` class
- Image loading through the `load_image` method
- Asynchronous caption generation using the `generate_caption` method
- Caption caching for improved efficiency
- Device selection (CPU or GPU) based on availability
- Model and processor initialization via the`ImageCaptioner` class
- Image loading through the `load_image` method
- Asynchronous caption generation using the `generate_caption` method
- Caption caching for improved efficiency
- Device selection (CPU or GPU) based on availability

**Usage:**
To utilize this module, import the `ImageCaptioner` class and initialize it with a model of your choice. You can then use its methods to load images and generate captions.
**Usage:**
To utilize this module, import the `ImageCaptioner` class and initialize it with a model of your choice. You can then use its methods to load images and generate captions.

---

Expand Down

0 comments on commit a676a45

Please sign in to comment.