Skip to content

Commit

Permalink
chg: test_gen_ai_utilities.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bossjones committed Aug 30, 2024
1 parent a3f3f14 commit 0ad716a
Show file tree
Hide file tree
Showing 11 changed files with 857 additions and 322 deletions.
13 changes: 8 additions & 5 deletions REFERENCES.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ example prompt:

source: <https://www.youtube.com/watch?v=AeASAsPp9LE>


# july 2024

- <https://medium.com/langchain-0-2-insights/langchain-0-2-insights-building-a-versatile-cli-assistant-with-langchain-and-langgraph-bc81a4570ba2>
Expand All @@ -162,10 +161,10 @@ source: <https://www.youtube.com/watch?v=AeASAsPp9LE>
- https://github.com/codingjoe/relint - `Write your own linting rules using regular expressions.`
- https://github.com/ionelmc/python-manhole/ - `Debugging manhole for python applications.`
- https://github.com/langchain-ai/langchain/blob/master/cookbook/Multi_modal_RAG.ipynb
- https://github.com/SAMAD101/Chino/blob/e38f3d9d38702beaed37229f66d79e86a7acab26/src/chino/query.py (write a query module maybe)

- https://github.com/SAMAD101/Chino/blob/e38f3d9d38702beaed37229f66d79e86a7acab26/src/chino/query.py (write a query
module maybe)

--------------------------
______________________________________________________________________

# Advanced rag suggestions

Expand All @@ -174,5 +173,9 @@ source: <https://www.youtube.com/watch?v=AeASAsPp9LE>
### Quotes

- If I had to do it over again, I'd just put everything in Postgres with pgvector turned on.
- 100%. It's extremely powerful and it's nice when you have it mixed in with conventional database tables. You can do joins across relational and vector data. The performance of the vector indexing database engine will never be a significant performance bottleneck. Performance is mostly affected by the embedding model, LLM, and how many tokens the agent library (e.g. langchain) uses. Besides, Postgres is no slouch when it comes to performance and is easy to scale.
- 100%. It's extremely powerful and it's nice when you have it mixed in with conventional database tables. You can do
joins across relational and vector data. The performance of the vector indexing database engine will never be a
significant performance bottleneck. Performance is mostly affected by the embedding model, LLM, and how many tokens
the agent library (e.g. langchain) uses. Besides, Postgres is no slouch when it comes to performance and is easy to
scale.
-
7 changes: 3 additions & 4 deletions docker/kafka/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Kafka

This is used as a message queue service to connect the checkout service with
the accounting and fraud detection services.
This is used as a message queue service to connect the checkout service with the accounting and fraud detection
services.

Kafka is run in KRaft mode. Environment variables are substituted at
deploy-time.
Kafka is run in KRaft mode. Environment variables are substituted at deploy-time.
112 changes: 72 additions & 40 deletions docs/prompt_engineering.md

Large diffs are not rendered by default.

31 changes: 15 additions & 16 deletions docs/pyenv.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
## pyenv - :coffee: Getting Started

> https://raw.githubusercontent.com/Unstructured-IO/community/main/README.md
>
Goob_ai's open-source packages currently target Python 3.10. If you are using or contributing
to Goob_ai code, we encourage you to work with Python 3.10 in a virtual environment. You can
use the following instructions to get up and running with a Python 3.10 virtual environment
with `pyenv-virtualenv`:
Goob_ai's open-source packages currently target Python 3.10. If you are using or contributing to Goob_ai code, we
encourage you to work with Python 3.10 in a virtual environment. You can use the following instructions to get up and
running with a Python 3.10 virtual environment with `pyenv-virtualenv`:

#### Mac / Homebrew

1. Install `pyenv` with `brew install pyenv`.
2. Install `pyenv-virtualenv` with `brew install pyenv-virtualenv`
3. Follow the instructions [here](https://github.com/pyenv/pyenv#user-content-set-up-your-shell-environment-for-pyenv)
to add the `pyenv-virtualenv` startup code to your terminal profile.
4. Install Python 3.10 by running `pyenv install 3.10.15`.
5. Create and activate a virtual environment by running:
1. Install `pyenv-virtualenv` with `brew install pyenv-virtualenv`
1. Follow the instructions [here](https://github.com/pyenv/pyenv#user-content-set-up-your-shell-environment-for-pyenv)
to add the `pyenv-virtualenv` startup code to your terminal profile.
1. Install Python 3.10 by running `pyenv install 3.10.15`.
1. Create and activate a virtual environment by running:

```
pyenv virtualenv 3.10.15 unstructured
pyenv activate unstructured
```

You can changed the name of the virtual environment from `unstructured` to another name if you're
creating a virtual environment for a pipeline. For example, if you're a creating a virtual
environment for the SEC preprocessing, you can run `pyenv virtualenv 3.10.15 sec`.
You can changed the name of the virtual environment from `unstructured` to another name if you're creating a virtual
environment for a pipeline. For example, if you're a creating a virtual environment for the SEC preprocessing, you can
run `pyenv virtualenv 3.10.15 sec`.

#### Linux

1. Run `git clone https://github.com/pyenv/pyenv.git ~/.pyenv` to install `pyenv`
2. Run `git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv`
to install `pyenv-virtualenv` as a `pyenv` plugin.
4. Follow steps 3-5 from the Mac/Homebrew instructions.
1. Run `git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv` to install
`pyenv-virtualenv` as a `pyenv` plugin.
1. Follow steps 3-5 from the Mac/Homebrew instructions.
14 changes: 9 additions & 5 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,27 @@ VCR supports 4 record modes (with the same behavior as Ruby's VCR):
- Record new interactions if there is no cassette file.
- Cause an error to be raised for new requests if there is a cassette file.

It is similar to the new_episodes record mode, but will prevent new, unexpected requests from being made (e.g. because the request URI changed).
It is similar to the new_episodes record mode, but will prevent new, unexpected requests from being made (e.g. because
the request URI changed).

once is the default record mode, used when you do not set one.

### new_episodes

- Record new interactions.
- Replay previously recorded interactions. It is similar to the once record mode, but will always record new interactions, even if you have an existing recorded one that is similar, but not identical.
- Replay previously recorded interactions. It is similar to the once record mode, but will always record new
interactions, even if you have an existing recorded one that is similar, but not identical.

This was the default behavior in versions < 0.3.0
This was the default behavior in versions \< 0.3.0

### none

- Replay previously recorded interactions.
- Cause an error to be raised for any new requests. This is useful when your code makes potentially dangerous HTTP requests. The none record mode guarantees that no new HTTP requests will be made.
- Cause an error to be raised for any new requests. This is useful when your code makes potentially dangerous HTTP
requests. The none record mode guarantees that no new HTTP requests will be made.

### all

- Record new interactions.
- Never replay previously recorded interactions. This can be temporarily used to force VCR to re-record a cassette (i.e. to ensure the responses are not out of date) or can be used when you simply want to log all HTTP requests.
- Never replay previously recorded interactions. This can be temporarily used to force VCR to re-record a cassette (i.e.
to ensure the responses are not out of date) or can be used when you simply want to log all HTTP requests.
Loading

0 comments on commit 0ad716a

Please sign in to comment.