Skip to content

Commit

Permalink
Merge branch 'develop' into patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
kesar authored Jan 16, 2025
2 parents 787d2a7 + 6cfbd18 commit 05a388b
Show file tree
Hide file tree
Showing 368 changed files with 32,636 additions and 3,274 deletions.
19 changes: 19 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Ignore node_modules from the build context
node_modules

# Ignore logs and temporary files
*.log
*.tmp
.DS_Store

# Ignore Git files and metadata
.gitignore

# Ignore IDE and editor config files
.vscode
.idea
*.swp

# Ignore build artifacts from the host
dist
build
467 changes: 265 additions & 202 deletions .env.example

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion .github/workflows/generate-readme-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ jobs:
{ code: "TH", name: "Thai" },
{ code: "TR", name: "Turkish" },
{ code: "VI", name: "Vietnamese" },
{ code: "AR", name: "Arabic" },
{ code: "RS", name: "Srpski" },
{ code: "TG", name: "Tagalog" },
{ code: "PL", name: "Polski" },
{ code: "HU", name: "Hungarian" },
{ code: "FA", name: "Persian" },
{ code: "RO", name: "Romanian" },
{ code: "GR", name: "Greek" },
{ code: "NL", name: "Dutch" },
]
permissions:
contents: write
Expand Down Expand Up @@ -53,7 +62,7 @@ jobs:
"content_path": "README.md"
}
],
"save_path": "README_${{ matrix.language.code }}.md",
save_path: "i18n/readme/README_${{ matrix.language.code }}.md",
"model": "gpt-4o"
}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Hello @${{ github.actor }}! Welcome to the ai16z community. Thank you for opening your first issue; we appreciate your contribution. You are now a ai16z contributor!"
pr-message: "Hi @${{ github.actor }}! Welcome to the ai16z community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now a ai16z contributor!"
issue-message: "Hello @${{ github.actor }}! Welcome to the elizaOS community. Thank you for opening your first issue; we appreciate your contribution. You are now an elizaOS contributor!"
pr-message: "Hi @${{ github.actor }}! Welcome to the elizaOS community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now an elizaOS contributor!"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ agent/content

eliza.manifest
eliza.manifest.sgx
eliza.sig
eliza.sig
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@
- Add OLLAMA as Model Provider [\#221](https://github.com/elizaOS/eliza/pull/221) ([o-on-x](https://github.com/o-on-x))
- lazy load llama [\#220](https://github.com/elizaOS/eliza/pull/220) ([lalalune](https://github.com/lalalune))
- Implement grok beta [\#216](https://github.com/elizaOS/eliza/pull/216) ([MeDott29](https://github.com/MeDott29))
- Abstracts Eliza into a Package to enble publishing onto NPM along with plugin system [\#214](https://github.com/elizaOS/eliza/pull/214) ([ponderingdemocritus](https://github.com/ponderingdemocritus))
- Abstracts Eliza into a Package to enable publishing onto NPM along with plugin system [\#214](https://github.com/elizaOS/eliza/pull/214) ([ponderingdemocritus](https://github.com/ponderingdemocritus))
- add the template overrides [\#207](https://github.com/elizaOS/eliza/pull/207) ([lalalune](https://github.com/lalalune))
- Shaw fix characters paths, .ts requirement and missings args [\#204](https://github.com/elizaOS/eliza/pull/204) ([lalalune](https://github.com/lalalune))
- Fix Discord Voice and DMs [\#203](https://github.com/elizaOS/eliza/pull/203) ([lalalune](https://github.com/lalalune))
Expand Down
62 changes: 43 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,43 +1,62 @@
# Use a specific Node.js version for better reproducibility
FROM node:23.3.0-slim AS builder

# Install pnpm globally and install necessary build tools
# Install pnpm globally and necessary build tools
RUN npm install -g pnpm@9.4.0 && \
apt-get update && \
apt-get install -y git python3 make g++ && \
apt-get upgrade -y && \
apt-get install -y \
git \
python3 \
python3-pip \
curl \
node-gyp \
ffmpeg \
libtool-bin \
autoconf \
automake \
libopus-dev \
make \
g++ \
build-essential \
libcairo2-dev \
libjpeg-dev \
libpango1.0-dev \
libgif-dev \
openssl \
libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set Python 3 as the default python
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN ln -sf /usr/bin/python3 /usr/bin/python

# Set the working directory
WORKDIR /app

# Copy package.json and other configuration files
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc turbo.json ./
# Copy application code
COPY . .

# Copy the rest of the application code
COPY agent ./agent
COPY packages ./packages
COPY scripts ./scripts
COPY characters ./characters
# Install dependencies
RUN pnpm install --no-frozen-lockfile

# Install dependencies and build the project
RUN pnpm install \
&& pnpm build-docker \
&& pnpm prune --prod
# Build the project
RUN pnpm run build && pnpm prune --prod

# Create a new stage for the final image
# Final runtime image
FROM node:23.3.0-slim

# Install runtime dependencies if needed
# Install runtime dependencies
RUN npm install -g pnpm@9.4.0 && \
apt-get update && \
apt-get install -y git python3 && \
apt-get install -y \
git \
python3 \
ffmpeg && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set the working directory
WORKDIR /app

# Copy built artifacts and production dependencies from the builder stage
Expand All @@ -47,9 +66,14 @@ COPY --from=builder /app/.npmrc ./
COPY --from=builder /app/turbo.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/agent ./agent
COPY --from=builder /app/client ./client
COPY --from=builder /app/lerna.json ./
COPY --from=builder /app/packages ./packages
COPY --from=builder /app/scripts ./scripts
COPY --from=builder /app/characters ./characters

# Set the command to run the application
CMD ["pnpm", "start"]
# Expose necessary ports
EXPOSE 3000 5173

# Command to start the application
CMD ["sh", "-c", "pnpm start & pnpm start:client"]
36 changes: 8 additions & 28 deletions Dockerfile.docs
Original file line number Diff line number Diff line change
@@ -1,63 +1,43 @@
# syntax=docker/dockerfile:1

## Modified version of https://docusaurus.community/knowledge/deployment/docker/

# Stage 1: Base image.
## Start with a base image containing NodeJS so we can build Docusaurus.
FROM node:23.3.0-slim AS base
## Disable colour output from yarn to make logs easier to read.

## https://pnpm.io/docker
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"

ENV FORCE_COLOR=0
## Enable corepack.
RUN corepack enable
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus

## Required by docusaurus: [ERROR] Loading of version failed for version current
RUN apt-get update && apt-get install -y git

# Stage 2a: Development mode.
FROM base AS dev
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus
## Expose the port that Docusaurus will run on.
EXPOSE 3000
## Run the development server.
CMD [ -d "node_modules" ] && npm run start -- --host 0.0.0.0 --poll 1000 || pnpm install && pnpm run start -- --host 0.0.0.0 --poll 1000
CMD [ -d "node_modules" ] && pnpm start -- --host 0.0.0.0 --poll 1000 || pnpm install && pnpm start -- --host 0.0.0.0 --poll 1000

# Stage 2b: Production build mode.
FROM base AS preprod
FROM base AS prod
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus

## This is in case someone needs to build the lock file
#RUN apt install python-is-python3 g++ make -y

COPY docs/package.json /opt/docusaurus/package.json
COPY docs/package-lock.json /opt/docusaurus/package-lock.json

FROM preprod AS prod

## Install dependencies with `--immutable` to ensure reproducibility.
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install

## Copy over the source code.
COPY docs/ /opt/docusaurus/
COPY packages/ /opt/packages/

## Required buy docusaurus [ERROR] Loading of version failed for version current
COPY .git/ /opt/.git/

# Build from sources
RUN pnpm run build
## Install dependencies with `--frozen-lockfile` to ensure reproducibility.
RUN pnpm install --no-frozen-lockfile
## Build the static site.
RUN pnpm build

# Stage 3a: Serve with `docusaurus serve`.
FROM prod AS serve
## Expose the port that Docusaurus will run on.
EXPOSE 3000
## Run the production server.
CMD ["npm", "run", "serve", "--", "--host", "0.0.0.0", "--no-open"]

CMD ["pnpm", "run", "serve", "--host", "0.0.0.0", "--no-open"]
77 changes: 47 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## 🌍 README Translations

[中文说明](./README_CN.md) | [日本語の説明](./README_JA.md) | [한국어 설명](./README_KOR.md) | [Persian](./README_FA.md) | [Français](./README_FR.md) | [Português](./README_PTBR.md) | [Türkçe](./README_TR.md) | [Русский](./README_RU.md) | [Español](./README_ES.md) | [Italiano](./README_IT.md) | [ไทย](./README_TH.md) | [Deutsch](./README_DE.md) | [Tiếng Việt](./README_VI.md) | [עִברִית](https://github.com/elizaos/Elisa/blob/main/README_HE.md) | [Tagalog](./README_TG.md) | [Polski](./README_PL.md) | [Arabic](./README_AR.md) | [Hungarian](./README_HU.md) | [Srpski](./README_RS.md) | [Română](./README_RO.md) | [Nederlands](./README_NL.md)
[中文说明](i18n/readme/README_CN.md) | [日本語の説明](i18n/readme/README_JA.md) | [한국어 설명](i18n/readme/README_KOR.md) | [Persian](i18n/readme/README_FA.md) | [Français](i18n/readme/README_FR.md) | [Português](i18n/readme/README_PTBR.md) | [Türkçe](i18n/readme/README_TR.md) | [Русский](i18n/readme/README_RU.md) | [Español](i18n/readme/README_ES.md) | [Italiano](i18n/readme/README_IT.md) | [ไทย](i18n/readme/README_TH.md) | [Deutsch](i18n/readme/README_DE.md) | [Tiếng Việt](i18n/readme/README_VI.md) | [עִברִית](i18n/readme/README_HE.md) | [Tagalog](i18n/readme/README_TG.md) | [Polski](i18n/readme/README_PL.md) | [Arabic](i18n/readme/README_AR.md) | [Hungarian](i18n/readme/README_HU.md) | [Srpski](i18n/readme/README_RS.md) | [Română](i18n/readme/README_RO.md) | [Nederlands](i18n/readme/README_NL.md) | [Ελληνικά](i18n/readme/README_GR.md)

## 🚩 Overview

Expand All @@ -23,12 +23,11 @@
## ✨ Features

- 🛠️ Full-featured Discord, Twitter and Telegram connectors
- 🔗 Support for every model (Llama, Grok, OpenAI, Anthropic, etc.)
- 🔗 Support for every model (Llama, Grok, OpenAI, Anthropic, Gemini, etc.)
- 👥 Multi-agent and room support
- 📚 Easily ingest and interact with your documents
- 💾 Retrievable memory and document store
- 🚀 Highly extensible - create your own actions and clients
- ☁️ Supports many models (local Llama, OpenAI, Anthropic, Groq, etc.)
- 📦 Just works!

## Video Tutorials
Expand Down Expand Up @@ -62,33 +61,21 @@ cp .env.example .env
pnpm i && pnpm build && pnpm start
```

Once the agent is running, you should see the message to run "pnpm start:client" at the end.
Open another terminal and move to same directory and then run below command and follow the URL to chat to your agent.

```bash
pnpm start:client
```

Then read the [Documentation](https://elizaos.github.io/eliza/) to learn how to customize your Eliza.

### Manually Start Eliza (Only recommended if you know what you are doing)

#### Checkout the latest release

```bash
# Clone the repository
git clone https://github.com/elizaos/eliza.git

# Checkout the latest release
# This project iterates fast, so we recommend checking out the latest release
git checkout $(git describe --tags --abbrev=0)
# If the above doesn't checkout the latest release, this should work:
# git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
```

### Start Eliza with Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main)

### Edit the .env file
#### Edit the .env file

Copy .env.example to .env and fill in the appropriate values.

Expand All @@ -98,15 +85,46 @@ cp .env.example .env

Note: .env is optional. If you're planning to run multiple distinct agents, you can pass secrets through the character JSON

#### Start Eliza

```bash
pnpm i
pnpm build
pnpm start

# The project iterates fast, sometimes you need to clean the project if you are coming back to the project
pnpm clean
```

### Interact via Browser

Once the agent is running, you should see the message to run "pnpm start:client" at the end.

Open another terminal, move to same directory, run the command below, then follow the URL to chat with your agent.

```bash
pnpm start:client
```

Then read the [Documentation](https://elizaos.github.io/eliza/) to learn how to customize your Eliza.

---

### Automatically Start Eliza

This will run everything to set up the project and start the bot with the default character.
The start script provides an automated way to set up and run Eliza:

```bash
sh scripts/start.sh
```

### Edit the character file
For detailed instructions on using the start script, including character management and troubleshooting, see our [Start Script Guide](./docs/docs/guides/start-script.md).

> **Note**: The start script handles all dependencies, environment setup, and character management automatically.
---

### Modify Character

1. Open `packages/core/src/defaultCharacter.ts` to modify the default character. Uncomment and edit.

Expand All @@ -116,16 +134,7 @@ sh scripts/start.sh
3. Connect with X (Twitter)
- change `"clients": []` to `"clients": ["twitter"]` in the character file to connect with X

### Manually Start Eliza

```bash
pnpm i
pnpm build
pnpm start

# The project iterates fast, sometimes you need to clean the project if you are coming back to the project
pnpm clean
```
---

#### Additional Requirements

Expand All @@ -135,6 +144,14 @@ You may need to install Sharp. If you see an error when starting up, try install
pnpm install --include=optional sharp
```

---

### Start Eliza with Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main)

---

### Community & contact

- [GitHub Issues](https://github.com/elizaos/eliza/issues). Best for: bugs you encounter using Eliza, and feature proposals.
Expand Down
Loading

0 comments on commit 05a388b

Please sign in to comment.