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

feat: add avalanche plugin #842

Merged
merged 20 commits into from
Dec 28, 2024
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
merge
snow-farmer committed Dec 4, 2024
commit cb2137084d9d93d0919720e3bb4c2da08dda03b4
27 changes: 18 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -2,11 +2,6 @@ name: Release

on:
workflow_dispatch:
inputs:
release_type:
description: "Type of release (prerelease, prepatch, patch, minor, preminor, major)"
required: true
default: "patch"

jobs:
release:
@@ -43,11 +38,25 @@ jobs:
- name: Build packages
run: pnpm run build

- name: Tag and Publish Packages
id: tag_publish
- name: Publish Packages
id: publish
run: |
npx lerna version ${{ github.event.inputs.release_type }} --conventional-commits --yes --no-private --force-publish
npx lerna publish from-git --yes --dist-tag ${{ github.event.inputs.release_type == 'preminor' && 'next' || 'latest' }}
# Get the latest release tag
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)

# Force clean the working directory and reset any changes
echo "Cleaning working directory and resetting any changes"
git clean -fd
git reset --hard HEAD

# Force checkout the latest tag
echo "Checking out latest tag: $LATEST_TAG"
git checkout -b temp-publish-branch $LATEST_TAG

echo "Publishing version: $LATEST_TAG"
npx lerna publish from-package --yes --dist-tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Get Version Tag
id: get_tag
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,66 @@
# Changelog

## [v0.1.5-alpha.3](https://github.com/ai16z/eliza/tree/v0.1.5-alpha.3) (2024-12-04)

[Full Changelog](https://github.com/ai16z/eliza/compare/v0.1.5-alpha.2...v0.1.5-alpha.3)

**Merged pull requests:**

- chore: bump version to 0.1.5-alpha.3 [\#838](https://github.com/ai16z/eliza/pull/838) ([cygaar](https://github.com/cygaar))
- chore: Revert/viem version and bump @goat-sdk/plugin-erc20 [\#836](https://github.com/ai16z/eliza/pull/836) ([shakkernerd](https://github.com/shakkernerd))
- chore: revert viem package version [\#834](https://github.com/ai16z/eliza/pull/834) ([shakkernerd](https://github.com/shakkernerd))

## [v0.1.5-alpha.2](https://github.com/ai16z/eliza/tree/v0.1.5-alpha.2) (2024-12-04)

[Full Changelog](https://github.com/ai16z/eliza/compare/v0.1.5-alpha.0...v0.1.5-alpha.2)

**Implemented enhancements:**

- feat: Add circuit breaker pattern for database operations [\#712](https://github.com/ai16z/eliza/issues/712)

**Fixed bugs:**

- 404 Localhost port 3000 [\#804](https://github.com/ai16z/eliza/issues/804)
- actions examples selection does not select things properly [\#798](https://github.com/ai16z/eliza/issues/798)
- recentPosts always empty [\#679](https://github.com/ai16z/eliza/issues/679)

**Merged pull requests:**

- chore: bump version to 0.1.5-alpha.1 [\#833](https://github.com/ai16z/eliza/pull/833) ([cygaar](https://github.com/cygaar))
- fix: pin all node dependencies + update @solana/web3.js to safe version [\#832](https://github.com/ai16z/eliza/pull/832) ([cygaar](https://github.com/cygaar))
- fix: docker-setup.md [\#826](https://github.com/ai16z/eliza/pull/826) ([Freytes](https://github.com/Freytes))
- fix: twitter cache expires [\#824](https://github.com/ai16z/eliza/pull/824) ([palsp](https://github.com/palsp))
- feat: \(core\) Add circuit breaker pattern for database operations -… [\#812](https://github.com/ai16z/eliza/pull/812) ([augchan42](https://github.com/augchan42))
- fix: lerna publish command [\#811](https://github.com/ai16z/eliza/pull/811) ([cygaar](https://github.com/cygaar))

## [v0.1.5-alpha.0](https://github.com/ai16z/eliza/tree/v0.1.5-alpha.0) (2024-12-03)

[Full Changelog](https://github.com/ai16z/eliza/compare/v0.1.5...v0.1.5-alpha.0)

**Fixed bugs:**

- Plugin system in character.plugins is not working [\#795](https://github.com/ai16z/eliza/issues/795)

**Closed issues:**

- State should use a cosine similarity of messages in the DB [\#471](https://github.com/ai16z/eliza/issues/471)

**Merged pull requests:**

- fix: update package version to v0.1.5-alpha.0 [\#808](https://github.com/ai16z/eliza/pull/808) ([cygaar](https://github.com/cygaar))
- fix: release workflow part 3 [\#807](https://github.com/ai16z/eliza/pull/807) ([cygaar](https://github.com/cygaar))
- fix: part 2 of updating the npm publish workflow [\#806](https://github.com/ai16z/eliza/pull/806) ([cygaar](https://github.com/cygaar))
- fix: update npm publication workflow [\#805](https://github.com/ai16z/eliza/pull/805) ([cygaar](https://github.com/cygaar))
- fix: swap type error, create user trust on first message in telegram [\#800](https://github.com/ai16z/eliza/pull/800) ([MarcoMandar](https://github.com/MarcoMandar))
- refactor: Improve actions samples random selection [\#799](https://github.com/ai16z/eliza/pull/799) ([dievardump](https://github.com/dievardump))
- fix: Docker default non-interactive mode for Cloud instances [\#796](https://github.com/ai16z/eliza/pull/796) ([rarepepi](https://github.com/rarepepi))
- fix: dev command [\#793](https://github.com/ai16z/eliza/pull/793) ([shakkernerd](https://github.com/shakkernerd))
- chore: update README\_KOR.md to match latest README.md [\#789](https://github.com/ai16z/eliza/pull/789) ([mike0295](https://github.com/mike0295))
- fix: enviroment -\> environment [\#787](https://github.com/ai16z/eliza/pull/787) ([tomguluson92](https://github.com/tomguluson92))
- Update generation.ts to fix TOGETHER/LLAMACLOUD image generation [\#786](https://github.com/ai16z/eliza/pull/786) ([ProphetX10](https://github.com/ProphetX10))
- fixs: uuid compatible for number [\#785](https://github.com/ai16z/eliza/pull/785) ([tomguluson92](https://github.com/tomguluson92))
- fix: When the plugins field in the .character.json file is configured with plugin name. [\#784](https://github.com/ai16z/eliza/pull/784) ([xwxtwd](https://github.com/xwxtwd))

## [v0.1.5](https://github.com/ai16z/eliza/tree/v0.1.5) (2024-12-02)

[Full Changelog](https://github.com/ai16z/eliza/compare/v0.1.4-alpha.3...v0.1.5)
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -52,4 +52,4 @@ COPY --from=builder /app/scripts ./scripts
COPY --from=builder /app/characters ./characters

# Set the command to run the application
CMD ["pnpm", "start"]
CMD ["pnpm", "start", "--non-interactive"]
194 changes: 67 additions & 127 deletions README_KOR.md
Original file line number Diff line number Diff line change
@@ -1,188 +1,128 @@
# Eliza
# Eliza 🤖

<img src="./docs/static/img/eliza_banner.jpg" alt="eliza banner" width="100%"/>
<div align="center">
<img src="./docs/static/img/eliza_banner.jpg" alt="Eliza Banner" width="100%" />
</div>

## 기능
<div align="center">

📖 [문서](https://ai16z.github.io/eliza/) | 🎯 [예시](https://github.com/thejoven/awesome-eliza)

</div>

## ✨ 기능

- 🛠 SNS 지원: 디스코드, 트위터, 텔레그램 모두 지원됩니다.
- 🔗 다양한 모델 지원 (Llama, Grok, OpenAI, Anthropic 등)
- 👥 다중 지원: 다중 에이전트 및 채팅방이 지원됩니다.
- 📚 높은 유연성: 개발자가 쉽게 데이터를 추가하고, 이를 활용해 다양한 기능을 만들 수 있습니다.
- 💾 검색 지원: 당신의 데이터와 작업을 쉽게 찾아볼 수 있도록, 검색 기능을 지원합니다.
- 🚀 높은 확장성: 자신의 동작과 클라이언트를 만들어 기능을 확장할 수 있습니다.
- ☁️ 다양한 AI 모델 지원: local Llama, OpenAI, Anthropic, Groq 등 다양한 AI 모델을 지원합니다
- 📦 즐겁게 개발해 봐요!

## eliza로 어떤걸 만들 수 있을까요?
## 🎯 eliza로 어떤걸 만들 수 있을까요?

- 🤖 챗봇 개발
- 🕵 ️AI가 자율적으로 결과를 만들어줘요!
- 📈 업무처리 자동화
- 🎮 비디오 게임 NPC
- 🧠 트레이딩

# 사용시작
## 🚀 빠른 시작

**필수 요구사항:**
### 필수 요구사항:

- [Python 2.7+](https://www.python.org/downloads/)
- [Node.js 23.3+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
- [pnpm](https://pnpm.io/installation)

## .env 파일 편집
> **Windows 사용자 참고:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) 필요.

- .env.example을 복사해서 필요한 값들을 채워넣어 .env파일을 만드세요.
- 트위터 환경변수 값을 채워, 봇의 트위터 사용자 이름과 비밀번호를 설정하세요.
### Starter 사용 (권장)

## character file 편집

- 캐릭터 파일 경로: `src/core/defaultCharacter.ts ` - 캐릭터 파일을 필요에 맞게 수정하세요.
- 동시 실행 지원: `pnpm start --characters="path/to/your/character.json"` - 다음의 명령어를 사용하면, 여러 캐릭터 파일을 한번에 불러와, 다양한 봇을 동시에 실행 시킬 수 있습니다.
```bash
git clone https://github.com/ai16z/eliza-starter.git

모두 설정하셨으면, 아래의 커맨드를 입력하여 로봇을 실행시켜주세요:
cp .env.example .env

pnpm i && pnpm start
```
pnpm i
pnpm start
```

# Eliza 커스텀하기

### 커스텀 기능 추가하기

메인 디렉토리의 git 충돌을 방지하기 위해 커스텀 동작은 `custom_actions` 디렉토리에 추가하신 후, 추가하신 내용을 `elizaConfig.yaml` 파일에 작성하세요. `elizaConfig.example.yaml` 파일에 예시가 있습니다.

### AI 모델 실행 방법
[문서](https://ai16z.github.io/eliza/)를 참고하여 Eliza를 커스마이징 방법을 확인하세요.

### Run with Llama
### 직접 실행하기 (경험자만 권장)

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

### Run with Grok
```bash
# 리포지토리 클론
git clone https://github.com/ai16z/eliza.git

`XAI_MODEL` 환경변수를 `grok-beta`로 설정하여 Grok 모델을 실행시킬 수 있습니다.
# 최신 릴리스로 체크아웃
# 프로젝트가 빠르게 수정되므로 최신 릴리스를 체크아웃하는 것을 권장합니다.
git checkout $(git describe --tags --abbrev=0)
```

### Run with OpenAI
### Gitpod로 Eliza 시작

`XAI_MODEL` 환경변수를 `gpt-4o-mini` 혹은 `gpt-4o` 로 설정하여, OpenAI model을 실행시킬 수 있습니다.
[![Gitpod로 열기](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ai16z/eliza/tree/main)

## 기타 요구 사항
### .env 파일 편집

시작시 오류가 발견되면, 아래의 명령어로 Sharp를 설치해보세요:
.env.example을 복사해서 필요한 값들을 채워넣어 .env파일을 만드세요.

```
pnpm install --include=optional sharp
cp .env.example .env
```

# 환경 셋업
참고: .env는 선택 사항입니다. 여러 개의 에이전트를 실행하려는 경우, 캐릭터 JSON 파일을 통해 비밀 변수를 전달할 수 있습니다.

다양한 플랫폼에 연결하기 위해 .env 파일에 다음의 환경 변수들을 채워 넣어야 합니다:
### Eliza 자동 시작

아래 명령은 프로젝트를 설정하고 기본 캐릭터와 함께 봇을 시작합니다.
```bash
sh scripts/start.sh
```
# 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
ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM
ELEVENLABS_VOICE_STABILITY=0.5
ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9
ELEVENLABS_VOICE_STYLE=0.66
ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false
ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4
ELEVENLABS_OUTPUT_FORMAT=pcm_16000

TWITTER_DRY_RUN=false
TWITTER_USERNAME= # Account username
TWITTER_PASSWORD= # Account password
TWITTER_EMAIL= # Account email
TWITTER_COOKIES= # Account cookies

X_SERVER_URL=
XAI_API_KEY=
XAI_MODEL=


# For asking Claude stuff
ANTHROPIC_API_KEY=

# EVM
EVM_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY
### character file 편집

# Solana
SOLANA_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY
SOLANA_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY
1. `agent/src/character.ts`를 열어 기본 캐릭터를 수정하세요. 주석을 해제하고 수정하시면 됩니다.

# Fallback Wallet Configuration (deprecated)
WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY
WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY
2. 커스텀 캐릭터 로드하기:
- `pnpm start --characters="path/to/your/character.json"`을 사용합니다.
- 여러 캐릭터 파일을 동시에 로드할 수 있습니다.
3. X (Twitter) 연결:
- 캐릭터 파일에서 `"clients": []`를 `"clients": ["twitter"]`로 변경합니다.

BIRDEYE_API_KEY=
### Eliza 수동 시작

SOL_ADDRESS=So11111111111111111111111111111111111111112
SLIPPAGE=1
RPC_URL=https://api.mainnet-beta.solana.com
HELIUS_API_KEY=


## Telegram
TELEGRAM_BOT_TOKEN=
```bash
pnpm i
pnpm build
pnpm start

TOGETHER_API_KEY=
# 프로젝트가 빠르게 수정되므로 프로젝트를 clean해야 할 수도 있습니다.
pnpm clean
```

# 로컬 인터페이스 설정
#### 추가 요구 사항

### CUDA 셋업

고성능 NVIDIA GPU를 가지고 있는 분들은, CUDA 를 설치하시면 당신의 로컬 인터페이스를 놀랍도록 가속 시킬 수 있습니다.
시작 시 에러가 발생하면 Sharp를 설치해야 할 수 있습니다. 아래 명령어를 사용하여 설치하세요:

```
pnpm install
npx --no node-llama-cpp source download --gpu cuda
pnpm install --include=optional sharp
```

설치 후에는 당신의 CUDA Toolkit에 cuDNN and cuBLAS 이 포함되었는지 다시 한번 확인하세요.

### 로컬 실행

다음 중 한가지 옵션을 선택하여 XAI_MODEL 을 추가하세요. [Run with
Llama](#run-with-llama) - X_SERVER_URL 와 XAI_API_KEY 는 비워둬도 됩니다.
이 파일을 통해 huggingface 에서 모델이 다운로드 되며, 로컬로 쿼리 됩니다.

# 클라이언트
### Community & contact

## Discord Bot
- [깃헙 이슈](https://github.com/ai16z/eliza/issues). 용도: Eliza 사용 중 발견된 버그 리포트, 기능 제안.
- [Discord](https://discord.gg/ai16z). 용도: 애플리케이션 공유 및 커뮤니티 활동.

디스코드 봇을 세팅하는 방법을 알고싶으면 아래의 링크를 통해 확인하세요:
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
```
## 컨트리뷰터

테스트 결과는 Jest를 통해 작성되며, `src/**/*.test.ts` 파일에서 확인할 수 있습니다.
테스트 환경 구성단계:
<a href="https://github.com/ai16z/eliza/graphs/contributors">
<img src="https://contrib.rocks/image?repo=ai16z/eliza" />
</a>

- `.env.test` 에서 환경변수가 불러와집니다.
- 테스트 타임아웃 시간은 2분으로 설정되어있습니다.
- ESM 모듈이 지원됩니다.
- 순차적으로 테스트가 실행됩니다. (--runInBand)
## 스타 기록

새 테스트를 만들려면, 테스트 중인 코드 옆에 `.test.ts` 파일을 추가하세요.
[![Star History Chart](https://api.star-history.com/svg?repos=ai16z/eliza&type=Date)](https://star-history.com/#ai16z/eliza&Date)
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.