Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge from main #25

Merged
merged 58 commits into from
Nov 16, 2024
Merged
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
689245f
[BE] Add script to dump all file contents into one file so it is ease…
monilpat Nov 13, 2024
38716b8
init
ponderingdemocritus Nov 13, 2024
ad6f439
Dockerized application for local development, testing and deployment
oberlinstands Nov 13, 2024
e9d03e7
[Refactor][1/2] Implement generateObject for typesafe JSON output
monilpat Nov 14, 2024
c1745f2
Remove unneeded file
monilpat Nov 14, 2024
31d3b71
Merge branch 'main' into llmContentGeneration
monilpat Nov 14, 2024
bb13009
Update .gitignore
monilpat Nov 14, 2024
e84c46e
Merge branch 'main' of https://github.com/ai16z/eliza into starknet-p…
ponderingdemocritus Nov 14, 2024
cecff78
updates
ponderingdemocritus Nov 14, 2024
d4394c2
plugin schema
ponderingdemocritus Nov 14, 2024
06d7c74
Merge pull request #1 from ai16z/main
pindaroso Nov 14, 2024
f826253
Merge branch 'main' into llmContentGeneration
monilpat Nov 14, 2024
bf3ed27
utils.ts example tweet splitting
o-on-x Nov 15, 2024
46a913e
Merge branch 'ai16z:main' into o-on-x-wip-tweet-split
o-on-x Nov 15, 2024
629144e
be specific about tag/node version, add helpful links, be specific ab…
odilitime Nov 15, 2024
570f100
add collect's fix per madjin, add better sqlite3 rebuild instructions…
odilitime Nov 15, 2024
a61d63e
Edit the => Create a Character File
odilitime Nov 15, 2024
4fdd584
Merge pull request #325 from odilitime/main
madjin Nov 15, 2024
0d1b1fb
Merge pull request #328 from MarcoMandar/main
lalalune Nov 15, 2024
1824bb9
Merge pull request #323 from o-on-x/o-on-x-wip-tweet-split
lalalune Nov 15, 2024
a3f30dd
Update README_KOR.md
zo-sol Nov 15, 2024
13b8198
Merge pull request #309 from Sifchain/llmContentGeneration
jkbrooks Nov 15, 2024
c9772f5
claude vertex configs added to generation.ts (was missing)
denizekiz Nov 15, 2024
910e9d0
add Heurist API
tsubasakong Nov 15, 2024
ff46598
Merge branch 'ai16z:main' into main
tsubasakong Nov 15, 2024
9dee3dd
Merge pull request #330 from denizekiz/claude_vertex
lalalune Nov 15, 2024
45d8740
Merge pull request #329 from sumin13245/patch-1
lalalune Nov 15, 2024
4e1df2c
tsc before statt
lalalune Nov 15, 2024
12348e6
Merge https://github.com/ai16z/eliza into HEAD
lalalune Nov 15, 2024
a350e62
update Heurist chat models
tsubasakong Nov 15, 2024
3d23f7a
update chat models
tsubasakong Nov 15, 2024
a702d2e
add Heurist API key option
tsubasakong Nov 15, 2024
a40ceb6
Merge branch 'ai16z:main' into main
tsubasakong Nov 15, 2024
abfec48
Merge pull request #293 from pindaroso/main
lalalune Nov 15, 2024
583aad9
fix: Build error for packages requiring @ai16z/eliza
shakkernerd Nov 15, 2024
b6cdbdf
Merge pull request #331 from shakkernerd/main
lalalune Nov 15, 2024
b828be4
Merge branch 'ai16z:main' into main
tsubasakong Nov 15, 2024
3c2bedb
clean
tsubasakong Nov 15, 2024
03cd5cc
clean log
tsubasakong Nov 15, 2024
2e3d507
back to default model provider
tsubasakong Nov 15, 2024
0566c82
clarify testing, add additional docker information
odilitime Nov 15, 2024
cde29a9
formatting, break up copy/paste so easier to run one by one, improve …
odilitime Nov 15, 2024
08a7c1d
added clientConfig to optionally ignore bots and DMs
vivoidos Nov 15, 2024
23907b6
Merge pull request #333 from odilitime/main
lalalune Nov 15, 2024
9013a94
Merge pull request #334 from odilitime/fix_quickstart
lalalune Nov 15, 2024
c4e8601
Merge pull request #336 from vivoidos/client-settings
lalalune Nov 15, 2024
4d1e66c
Merge pull request #335 from tsubasakong/main
lalalune Nov 15, 2024
735025c
merge
ponderingdemocritus Nov 15, 2024
2ae8ec7
add integration docs
tsubasakong Nov 15, 2024
7de37b7
update pepexl model demo settings
tsubasakong Nov 15, 2024
350d544
add HEURIST
tsubasakong Nov 15, 2024
b132597
fix imports, fix builds
ponderingdemocritus Nov 15, 2024
802fbc4
clean up
tsubasakong Nov 15, 2024
3d68fa9
title
ponderingdemocritus Nov 15, 2024
8fe9cb5
Merge pull request #287 from ai16z/starknet-plugin
lalalune Nov 15, 2024
b3773bd
fix dev build
ponderingdemocritus Nov 15, 2024
324760e
Merge pull request #343 from ai16z/fix-dev
lalalune Nov 15, 2024
4782f7c
Merge pull request #339 from tsubasakong/main
lalalune Nov 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -55,6 +55,9 @@ LARGE_OLLAMA_MODEL= #default hermes3:70b
# For asking Claude stuff
ANTHROPIC_API_KEY=

# Heurist API
HEURIST_API_KEY=

WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY
WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY

@@ -72,3 +75,7 @@ TELEGRAM_BOT_TOKEN=

TOGETHER_API_KEY=
SERVER_PORT=3000

# Starknet
STARKNET_ADDRESS=
STARKNET_PRIVATE_KEY=
28 changes: 28 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PR Title Check

on:
pull_request:
types: [opened, edited, synchronize]

jobs:
check-pr-title:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v2

- name: Validate PR title
id: validate
run: |
PR_TITLE=$(jq -r .pull_request.title "$GITHUB_EVENT_PATH")
echo "PR Title: $PR_TITLE"
if [[ ! "$PR_TITLE" =~ ^(feat|fix|docs|style|refactor|test|chore):\ .+ ]]; then
echo "PR title does not match the required pattern."
exit 1
fi

- name: Set status
if: failure()
run: |
gh pr comment ${{ github.event.pull_request.number }} --body "❌ PR title does not match the required pattern. Please use the format: 'type: description' (e.g., 'feat: add new feature')."
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ node_modules
/out

.env
.env.production
concatenated-output.ts
embedding-cache.json

@@ -38,4 +39,3 @@ characters/
packages/core/src/providers/cache
packages/core/src/providers/cache/*
cache/*
packages/core/cache/*
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM node:23.1.0
# Install pnpm globally
RUN npm install -g pnpm@9.4.0

# Set the working directory
WORKDIR /app

# Add configuration files and install dependencies
ADD pnpm-workspace.yaml /app/pnpm-workspace.yaml
ADD package.json /app/package.json
ADD .npmrc /app/.npmrc
ADD tsconfig.json /app/tsconfig.json
ADD pnpm-lock.yaml /app/pnpm-lock.yaml
RUN pnpm i

# Add the documentation
ADD docs /app/docs
RUN pnpm i

# Add the rest of the application code
ADD packages /app/packages
RUN pnpm i

# Add the environment variables
ADD scripts /app/scripts
ADD characters /app/characters
ADD .env /app/.env

# Command to run the container
CMD ["tail", "-f", "/dev/null"]
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
# Getting Started

**Prerequisites (MUST):**

- [Python 2.7+](https://www.python.org/downloads/)
- [Node.js 23.1+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
- [pnpm](https://pnpm.io/installation)
@@ -160,7 +160,7 @@ For help with setting up your Discord Bot, check out here: https://discordjs.gui

## Testing

To run the test suite:
To run the test suite, you must got into each package:

```bash
pnpm test # Run tests once
@@ -182,3 +182,15 @@ Tests are written using Jest and can be found in `src/**/*.test.ts` files. The t
- Run tests in sequence (--runInBand)

To create new tests, add a `.test.ts` file adjacent to the code you're testing.

## Docker

For development purposes, you can run the docker container with the following command:

```
pnpm docker
```

This will drop you into a shell inside the docker container where you can continue to configure the instance

and then you can start it with `pnpm start`
113 changes: 61 additions & 52 deletions README_KOR.md
Original file line number Diff line number Diff line change
@@ -4,81 +4,85 @@

## 기능

- 🛠 지지 discord 트위터/telegram 연결
- 👥 지지여 모드 agent
- 📚 간단 한 문서를 가져오기와 문서를 번갈아
- 💾 검색 할 수 있는 메모리와 문서 저장
- 🚀 확장 가능 성이 높은, 사용자 정의 클라이언트와 행위를 확장 기능
- ☁ ️여 모형 지지 llama · openai grok anthropic 등
- 📦 간단 하기도 좋습니다.
- 🛠 SNS 지원: 디스코드, 트위터, 텔레그램 모두 지원됩니다.
- 👥 다중 지원: 다중 에이전트 및 채팅방이 지원됩니다.
- 📚 높은 유연성: 개발자가 쉽게 데이터를 추가하고, 이를 활용해 다양한 기능을 만들 수 있습니다.
- 💾 검색 지원: 당신의 데이터와 작업을 쉽게 찾아볼 수 있도록, 검색 기능을 지원합니다.
- 🚀 높은 확장성: 자신의 동작과 클라이언트를 만들어 기능을 확장할 수 있습니다.
- ☁️ 다양한 AI 모델 지원: local Llama, OpenAI, Anthropic, Groq 등 다양한 AI 모델을 지원합니다
- 📦 즐겁게 개발해 봐요!

eliza로 뭘 할있나요?
## eliza로 어떤걸 만들있을까요?

- 🤖 챗 봇
- 🕵 ️ 자주 agents
- 📈 업무 처리 과정을 자동화
- 🎮 게임 npc
- 🤖 챗봇 개발
- 🕵 ️AI가 자율적으로 결과를 만들어줘요!
- 📈 업무처리 자동화
- 🎮 비디오 게임 NPC

# 사용시작

**전제 요구(필수):**
**필수 요구사항:**

- [Node.js 22 +](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
- Nodejs 설치
- [Python 2.7+](https://www.python.org/downloads/)
- [Node.js 23.1+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
- [pnpm](https://pnpm.io/installation)
- pnpm을사용한다

## 편집.env 파일
## .env 파일 편집

- .env.example을.env로 복사하고 적절한 값을 입력한다
- 트위터 환경을 편집하고, 트위터 계정과 비밀번호를 입력한다
- .env.example을 복사해서 필요한 값들을 채워넣어 .env파일을 만드세요.
- 트위터 환경변수 값을 채워, 봇의 트위터 사용자 이름과 비밀번호를 설정하세요.

## 캐릭터 파일 편집
## character file 편집

- 파일 `src/core/defaultcharacter.ts ` - 그것을 수정 할 수 있다
- 사용하셔도됩니다 `node --loader ts-node/esm src/index.ts --characters="path/to/your/character.json"` 여러 로봇을 동시에 실행하여 캐릭터를 불러옵니다.
- 캐릭터 파일 경로: `src/core/defaultCharacter.ts ` - 캐릭터 파일을 필요에 맞게 수정하세요.
- 동시 실행 지원: `pnpm start --characters="path/to/your/character.json"` - 다음의 명령어를 사용하면, 여러 캐릭터 파일을 한번에 불러와, 다양한 봇을 동시에 실행 시킬 수 있습니다.

아이디와 캐릭터 파일 설정이 완료되었다면, 다음 명령줄을 입력하여 로봇을 실행시키십시오:
모두 설정하셨으면, 아래의 커맨드를 입력하여 로봇을 실행시켜주세요:

```
pnpm i
pnpm start
```

# 사용자 정의 Eliza
# Eliza 커스텀하기

### 일반 행동을 추가한다
### 커스텀 기능 추가하기

커널 디렉터리에서 git 충돌을 방지하기 위해 custom_actions 디렉터리에 사용자 정의 동작을 추가하고 elizaconfig.yaml 파일에서 동작을 설정할 것을 제안한다.elizaconfig.example.yaml 파일의 예제는 참조할 수 있다.
메인 디렉토리의 git 충돌을 방지하기 위해 커스텀 동작은 `custom_actions` 디렉토리에 추가하신 후, 추가하신 내용을 `elizaConfig.yaml` 파일에 작성하세요. `elizaConfig.example.yaml` 파일에 예시가 있습니다.

다른 대형 모델들을 배치한다
### AI 모델 실행 방법

### 프로필Llama
### Run with Llama

`XAI_MODEL`환경 변수를`meta-llama/meta-llam-3.1-70b-instruct-turbo`또는`meta-llama/meta-llam-3.1-405b-instruct`로 설정하여 실행할 수 있다라마 70b 405b 모델
`XAI_MODEL`환경 변수를`meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo` 또는 `meta-llama/Meta-Llama-3.1-405B-Instruct`로 설정하여 Llama 70B 혹은 405B 모델을 실행시킬 수 있습니다.

## openai 설정
### Run with Grok

`XAI_MODEL`환경 변수를`gpt-4o-mini`또는`gpt-4o`로 설정하여 OpenAI 모델을 실행할 수 있다
`XAI_MODEL` 환경변수를 `grok-beta`로 설정하여 Grok 모델을 실행시킬 수 있습니다.

### Run with OpenAI

`XAI_MODEL` 환경변수를 `gpt-4o-mini` 혹은 `gpt-4o` 로 설정하여, OpenAI model을 실행시킬 수 있습니다.

## 기타 요구 사항

Sharp를 설치해야 할 수도 있습니다.시작시 오류가 발견되면 다음 명령으로 설치하십시오:
시작시 오류가 발견되면, 아래의 명령어로 Sharp를 설치해보세요:

```
pnpm install-include=optional sharp
pnpm install --include=optional sharp
```

# 환경 설정
# 환경 셋업

다양한 플랫폼에 연결하기 위해서는.env 파일에서 환경 변수를 추가해야 합니다:
다양한 플랫폼에 연결하기 위해 .env 파일에 다음의 환경 변수들을 채워 넣어야 합니다:

```
# Required environment variables
DISCORD_APPLICATION_ID=
DISCORD_API_TOKEN= # Bot token
OPENAI_API_KEY=sk-* # OpenAI API key, starting with sk-
ELEVENLABS_XI_API_KEY= # API key from elevenlabs
GOOGLE_GENERATIVE_AI_API_KEY= # Gemini API key

# ELEVENLABS SETTINGS
ELEVENLABS_MODEL_ID=eleven_multilingual_v2
@@ -121,51 +125,56 @@ TELEGRAM_BOT_TOKEN=
TOGETHER_API_KEY=
```

# 로컬 설정
# 로컬 인터페이스 설정

### cuda 설정
### CUDA 셋업

고성능 엔비디아 그래픽을 가지고 있다면 다음 명령줄에서 cuda를 사용하여 로컬 가속을 할 수 있다
고성능 NVIDIA GPU를 가지고 있는 분들은, CUDA 를 설치하시면 당신의 로컬 인터페이스를 놀랍도록 가속 시킬 수 있습니다.

```
pnpm install
npx --no node-llama-cpp source download --gpu cuda
```

cuDNN과 cuBLAS를 포함한 완전한 cuda 키트를 설치했는지 확인하세요
설치 후에는 당신의 CUDA Toolkit에 cuDNN and cuBLAS 이 포함되었는지 다시 한번 확인하세요.

### 로컬 실행

위의 [Llama로 실행](#run-with-llama) 옵션 중 하나로 XAI_MODEL을 추가한다
X_SERVER_URL과 xai_api_key를 공백으로 두면 huggingface에서 모델을 다운로드하고 현지에서 쿼리한다
다음 중 한가지 옵션을 선택하여 XAI_MODEL 을 추가하세요. [Run with
Llama](#run-with-llama) - X_SERVER_URL 와 XAI_API_KEY 는 비워둬도 됩니다.
이 파일을 통해 huggingface 에서 모델이 다운로드 되며, 로컬로 쿼리 됩니다.

# 클라이언트

discord bot을 설정하는 방법에 대해 discord의 공식 문서를 볼 수 있습니까
## Discord Bot

디스코드 봇을 세팅하는 방법을 알고싶으면 아래의 링크를 통해 확인하세요:
https://discordjs.guide/preparations/setting-up-a-bot-application.html

# 개발
# 개발하기

## 테스트
## 테스트 방법

여러 테스트 방법을 위한 명령줄:
일반 테스트에 적합한 커맨드:

```bash
pnpm test # Run tests once
pnpm test:watch # Run tests in watch mode
```

데이터베이스에 특화된 테스트:
데이터베이스에 특화된 테스트 커맨드:

```bash
pnpm test:sqlite # Run tests with SQLite
pnpm test:sqljs # Run tests with SQL.js
```

테스트는 src/\*_/_.test.ts 파일에 있는 Jest로 작성된다.테스트 환경 설정은 다음과 같습니다:
테스트 결과는 Jest를 통해 작성되며, `src/**/*.test.ts` 파일에서 확인할 수 있습니다.
테스트 환경 구성단계:

- .env.test에서 환경 변수를 불러온다
- 장기 실행 테스트를 실행하기 위해 2분 제한 시간을 사용합니다
- esm 모듈을 지원한다
- 테스트 실행 순서 (--runInBand)
- `.env.test` 에서 환경변수가 불러와집니다.
- 테스트 타임아웃 시간은 2분으로 설정되어있습니다.
- ESM 모듈이 지원됩니다.
- 순차적으로 테스트가 실행됩니다. (--runInBand)

새 테스트를 만들려면, 테스트할 코드 옆에.test.ts 파일을 추가하세요.
새 테스트를 만들려면, 테스트 중인 코드 옆에 `.test.ts` 파일을 추가하세요.
8 changes: 8 additions & 0 deletions docs/api/enumerations/ModelProviderName.md
Original file line number Diff line number Diff line change
@@ -111,3 +111,11 @@
#### Defined in

[packages/core/src/types.ts:130](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L130)

### HEURIST

> **HEURIST**: `"heurist"`

#### Defined in

[packages/core/src/types.ts:132](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L132)
28 changes: 27 additions & 1 deletion docs/docs/advanced/fine-tuning.md
Original file line number Diff line number Diff line change
@@ -23,7 +23,8 @@ enum ModelProviderName {
LLAMALOCAL,
GOOGLE,
REDPILL,
OPENROUTER
OPENROUTER,
HEURIST
}
```

@@ -266,6 +267,31 @@ const llamaLocalSettings = {
};
```

### Heurist Provider

```typescript
const heuristSettings = {
settings: {
stop: [],
maxInputTokens: 128000,
maxOutputTokens: 8192,
repetition_penalty: 0.0,
temperature: 0.7,
},
imageSettings: {
steps: 20,
},
endpoint: "https://llm-gateway.heurist.xyz",
model: {
[ModelClass.SMALL]: "meta-llama/llama-3-70b-instruct",
[ModelClass.MEDIUM]: "meta-llama/llama-3-70b-instruct",
[ModelClass.LARGE]: "meta-llama/llama-3.1-405b-instruct",
[ModelClass.EMBEDDING]: "", // Add later
[ModelClass.IMAGE]: "PepeXL",
}
}
```

## Testing and Validation

### Embedding Tests
11 changes: 11 additions & 0 deletions docs/docs/api/enumerations/ModelProviderName.md
Original file line number Diff line number Diff line change
@@ -109,3 +109,14 @@
#### Defined in

[packages/core/src/types.ts:128](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L128)


***

### HEURIST

> **HEURIST**: `"heurist"`

#### Defined in

[packages/core/src/types.ts:132](https://github.com/ai16z/eliza/blob/4d1e66cbf7deea87a8a67525670a963cd00108bc/packages/core/src/types.ts#L132)
Loading