Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a89ef1c51 | ||
|
|
7aea5223b7 | ||
|
|
9e94811d81 | ||
|
|
ecaf5c701b | ||
|
|
3c956d269e |
No files matched your search
+2
-2
@@ -1,10 +1,10 @@
|
||||
FROM python:3.11.6-alpine
|
||||
FROM python:3.11.9-alpine
|
||||
|
||||
RUN apk add --no-cache build-base libffi-dev
|
||||
RUN pip install poetry
|
||||
|
||||
WORKDIR /mnt
|
||||
COPY pyproject.toml poetry.lock .
|
||||
COPY pyproject.toml poetry.lock ./
|
||||
RUN poetry install --no-root --only main
|
||||
|
||||
COPY . .
|
||||
|
||||
+5
-4
@@ -39,8 +39,8 @@ class Response:
|
||||
await self.r.edit(content=value + end)
|
||||
return
|
||||
|
||||
if self.channel.type == discord.ChannelType.text:
|
||||
self.channel = await self.channel.create_thread(name='Discollama Says', message=self.message, auto_archive_duration=60)
|
||||
#if self.channel.type == discord.ChannelType.text:
|
||||
# self.channel = await self.channel.create_thread(name='Ollama Says', message=self.message, auto_archive_duration=60)
|
||||
|
||||
self.r = await self.channel.send(value)
|
||||
|
||||
@@ -67,7 +67,7 @@ class Discollama:
|
||||
permissions=discord.Permissions(
|
||||
read_messages=True,
|
||||
send_messages=True,
|
||||
create_public_threads=True,
|
||||
create_public_threads=False,
|
||||
),
|
||||
scopes=['bot'],
|
||||
),
|
||||
@@ -166,6 +166,7 @@ def main():
|
||||
|
||||
parser.add_argument('--redis-host', default=os.getenv('REDIS_HOST', '127.0.0.1'), type=str)
|
||||
parser.add_argument('--redis-port', default=os.getenv('REDIS_PORT', 6379), type=int)
|
||||
parser.add_argument('--redis-password', default=os.getenv('REDIS_PASSWORD', ''), type=str)
|
||||
|
||||
parser.add_argument('--buffer-size', default=32, type=int)
|
||||
|
||||
@@ -177,7 +178,7 @@ def main():
|
||||
Discollama(
|
||||
ollama.AsyncClient(host=f'{args.ollama_scheme}://{args.ollama_host}:{args.ollama_port}'),
|
||||
discord.Client(intents=intents),
|
||||
redis.Redis(host=args.redis_host, port=args.redis_port, db=0, decode_responses=True),
|
||||
redis.Redis(host=args.redis_host, port=args.redis_port, password=args.redis_password, db=0, decode_responses=True),
|
||||
model=args.ollama_model,
|
||||
).run(os.environ['DISCORD_TOKEN'])
|
||||
|
||||
|
||||
Reference in new issue
Block a user