Skip to content

Commit

Permalink
Merge branch 'develop' into fix/slack-1384-media-type-attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
shakkernerd authored Jan 4, 2025
2 parents d5f9ef2 + aec371f commit 7bbfa92
Show file tree
Hide file tree
Showing 100 changed files with 4,349 additions and 1,086 deletions.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ IMAGE_OPENAI_MODEL= # Default: dall-e-3
ETERNALAI_URL=
ETERNALAI_MODEL= # Default: "neuralmagic/Meta-Llama-3.1-405B-Instruct-quantized.w4a16"
ETERNALAI_API_KEY=
ETERNAL_AI_LOG_REQUEST=false #Default: false

GROK_API_KEY= # GROK API Key
GROQ_API_KEY= # Starts with gsk_
Expand Down Expand Up @@ -368,3 +369,7 @@ CRONOSZKEVM_PRIVATE_KEY=

# Fuel Ecosystem (FuelVM)
FUEL_WALLET_PRIVATE_KEY=

# Tokenizer Settings
TOKENIZER_MODEL= # Specify the tokenizer model to be used.
TOKENIZER_TYPE= # Options: tiktoken (for OpenAI models) or auto (AutoTokenizer from Hugging Face for non-OpenAI models). Default: tiktoken.
39 changes: 28 additions & 11 deletions .github/workflows/jsdoc-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,32 @@ name: JSDoc Automation
on:
workflow_dispatch:
inputs:
jsdoc:
description: 'Generate JSDoc comments (T/F)'
required: true
default: 'T'
type: string
readme:
description: 'Generate README documentation (T/F)'
required: true
default: 'T'
type: string
pull_number:
description: 'Pull Request Number (if not provided, scans root_directory) - PR must be merged to develop branch'
description: 'Pull Request Number (if not provided, scans root_directory) - PR must be merged to develop branch. DONT provide if `README documentation` is T from above'
required: false
type: string
root_directory:
description: 'Only scans files in this directory (relative to repository root, e.g., packages/core/src)'
required: true
default: 'packages/core/src/test_resources'
default: 'packages/plugin-near/'
type: string
excluded_directories:
description: 'Directories to exclude from scanning (comma-separated, relative to root_directory)'
required: true
default: 'node_modules,dist,test'
type: string
reviewers:
description: 'Pull Request Reviewers (comma-separated GitHub usernames)'
description: 'Pull Request Reviewers (Must be collaborator on the repository) comma-separated GitHub usernames'
required: true
default: ''
type: string
Expand All @@ -27,6 +37,11 @@ on:
required: false
default: 'develop'
type: string
language:
description: 'Documentation language (e.g., English, Spanish, French)'
required: true
default: 'English'
type: string

jobs:
generate-docs:
Expand All @@ -45,7 +60,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '23'
node-version: '20'

- name: Install pnpm
uses: pnpm/action-setup@v2
Expand All @@ -71,17 +86,19 @@ jobs:
working-directory: scripts/jsdoc-automation
run: pnpm install --no-frozen-lockfile

- name: Build TypeScript
working-directory: scripts/jsdoc-automation
run: pnpm build

- name: Run documentation generator
working-directory: scripts/jsdoc-automation
run: |
echo "Node version: $(node --version)"
echo "NPM version: $(npm --version)"
echo "Directory contents:"
ls -la
NODE_OPTIONS='--experimental-vm-modules --no-warnings' pnpm start
run: pnpm start
env:
INPUT_ROOT_DIRECTORY: ${{ inputs.root_directory }}
INPUT_PULL_NUMBER: ${{ inputs.pull_number }}
INPUT_EXCLUDED_DIRECTORIES: ${{ inputs.excluded_directories }}
INPUT_REVIEWERS: ${{ inputs.reviewers }}
INPUT_BRANCH: ${{ inputs.branch }}
INPUT_BRANCH: ${{ inputs.branch }}
INPUT_LANGUAGE: ${{ inputs.language }}
INPUT_JSDOC: ${{ inputs.jsdoc }}
INPUT_README: ${{ inputs.readme }}
58 changes: 58 additions & 0 deletions Dockerfile.docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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

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

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

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

## 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

# 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"]

6 changes: 3 additions & 3 deletions client/src/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ export default function Chat() {
: "justify-start"
}`}
>
<div
className={`max-w-[80%] rounded-lg px-4 py-2 ${
<pre
className={`max-w-[80%] rounded-lg px-4 py-2 whitespace-pre-wrap ${
message.user === "user"
? "bg-primary text-primary-foreground"
: "bg-muted"
Expand All @@ -115,7 +115,7 @@ export default function Chat() {
/>
)
))}
</div>
</pre>
</div>
))
) : (
Expand Down
3 changes: 2 additions & 1 deletion client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ export default defineConfig({
},
},
server: {
host: true,
proxy: {
"/api": {
target: `http://localhost:${process.env.SERVER_PORT || 3000}`,
target: `http://127.0.0.1:${process.env.SERVER_PORT || 3000}`,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
Expand Down
9 changes: 9 additions & 0 deletions docker-compose-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
docs:
build:
dockerfile: Dockerfile.docs
context: .
target: serve
ports:
- 3000:3000

10 changes: 10 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,13 @@ 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.

## Docs Updates

Please make sure to vetify if the documentation provided is correct. In order to do so, please run the docs service.

```console
docker compose -f docker-compose-docs.yaml up --build
```

The docusaurus server will get started and you can verify it locally at https://localhost:3000/eliza.
8 changes: 4 additions & 4 deletions docs/docs/packages/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -610,12 +610,12 @@ The Fuel plugin provides an interface to the Fuel Ignition blockchain.
**Actions:**

1. `TRANSFER_FUEL_ETH` - Transfer ETH to a given Fuel address. - **Inputs**: - `toAddress` (string): The Fuel address to transfer ETH to. - `amount` (string): The amount of ETH to transfer. - **Outputs**: Confirmation message with transaction details. - **Example**:
`json
{
```json
{
"toAddress": "0x8F8afB12402C9a4bD9678Bec363E51360142f8443FB171655eEd55dB298828D1",
"amount": "0.00001"
}
`
}
```
**Setup and Configuration:**

1. **Configure the Plugin**
Expand Down
3 changes: 3 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "eliza-docs",
"version": "0.1.7-alpha.2",
"private": true,
"packageManager": "[email protected]",
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start --no-open",
Expand All @@ -21,9 +22,11 @@
"@docusaurus/plugin-ideal-image": "3.6.3",
"@docusaurus/preset-classic": "3.6.3",
"@docusaurus/theme-mermaid": "3.6.3",
"@docusaurus/theme-common": "3.6.3",
"@mdx-js/react": "3.0.1",
"clsx": "2.1.1",
"docusaurus-lunr-search": "3.5.0",
"lunr": "2.3.9",
"dotenv": "^16.4.7",
"prism-react-renderer": "2.3.1",
"react": "18.3.1",
Expand Down
16 changes: 15 additions & 1 deletion packages/adapter-postgres/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/adapter-postgres",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@types/pg": "8.11.10",
Expand Down
16 changes: 15 additions & 1 deletion packages/adapter-redis/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/adapter-redis",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"ioredis": "5.4.2"
Expand Down
16 changes: 15 additions & 1 deletion packages/adapter-sqlite/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/adapter-sqlite",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@types/better-sqlite3": "7.6.12",
Expand Down
16 changes: 15 additions & 1 deletion packages/adapter-sqljs/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/adapter-sqljs",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@types/sql.js": "1.4.9",
Expand Down
16 changes: 15 additions & 1 deletion packages/adapter-supabase/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/adapter-supabase",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@supabase/supabase-js": "2.46.2"
Expand Down
Loading

0 comments on commit 7bbfa92

Please sign in to comment.