Skip to content

Commit

Permalink
testing multi-image
Browse files Browse the repository at this point in the history
  • Loading branch information
JAlcocerT committed Jul 24, 2024
1 parent 443bbe2 commit 5e0231c
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/GHA_MultiArch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI/CD Build MultiArch

on:
push:
branches:
- main

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CICD_TOKEN_DataChat }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: ./LLamaIndex/With-Mem0
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/jalcocert/data-chat:properties
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
**/.env
**/.env

*_venv/
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import csv

from openai import OpenAI
from mem0 import Memory
from llama_index.llms.anthropic import Anthropic
Expand All @@ -23,7 +24,7 @@ def __init__(self):
# self.load_flat_examples('flat_examples.csv')

# Set up Llama Index with Anthropic
llm = Anthropic(temperature=0.0, model='claude-3-opus-20240229')
llm = Anthropic(temperature=0.0,model='claude-3-5-sonnet-20240620') #claude-3-opus-20240229 #claude-3-5-sonnet-20240620
embed_model = HuggingFaceEmbedding(model_name="BAAI/bge-base-en-v1.5") #Embedding model will be downloaded during the first use
Settings.llm = llm
Settings.embed_model = embed_model
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

* The **Anthropic model** isn't used directly for generating responses to user questions, it is used indirectly through the `Llama Index` for finding **relevant property documents** based on the user's previous questions.
* [llama_index.llms.anthropic](https://docs.llamaindex.ai/en/stable/examples/llm/anthropic/)
* https://docs.anthropic.com/en/docs/about-claude/models

* The **responses** to the user's questions are generated by the **OpenAI's GPT-4 model**.
* The `ask_question` method, the OpenAI client is used to create a chat completion with the GPT-4 model. The current conversation history (self.messages) is passed to the model, which generates a response. The response is then added to the conversation history.
Expand Down
File renamed without changes.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,25 @@
* PandasAI with
* GroqAPI
* OpenAI ✔️
* SQLite DB
* SQLite DB

```sh
python -m venv properties_venv #create the venv | python3 if you are on linux

properties_venv\Scripts\activate #activate venv (windows)
source properties_venv/bin/activate #(linux)
```

```sh
export GROQ_API_KEY=YOUR_API_KEY
$env:GROQ_API_KEY="YOUR_API_KEY"
set GROQ_API_KEY=YOUR_API_KEY

export OPENAI_API_KEY=YOUR_API_KEY
$env:OPENAI_API_KEY="YOUR_API_KEY"
set OPENAI_API_KEY=YOUR_API_KEY

export ANTHROPIC_API_KEY=YOUR_API_KEY
$env:ANTHROPIC_API_KEY="YOUR_API_KEY"
set ANTHROPIC_API_KEY=YOUR_API_KEY
```

0 comments on commit 5e0231c

Please sign in to comment.