fix hardcoding of ein's IP

This commit is contained in:
Luke Robles 2024-08-05 15:23:05 -07:00
parent 48ca801642
commit 096fc1ea6c
4 changed files with 59 additions and 3 deletions

View File

@ -131,7 +131,7 @@ async def on_message(ctx):
await ctx.respond(random.choice(responses))
return
url = "http://192.168.1.137:1337/v1/chat/completions"
url = f"http://{core_utils.ein_ip}:1337/v1/chat/completions"
instructions = llm_rules["prompt"]
payload = {

View File

@ -46,7 +46,7 @@ class StableDiffusion(commands.Cog):
import stable_diffusion
port = "7860"
ip = "192.168.1.52"
ip = core_utils.ein_ip
steps = 120
enable_upscale = "false"
if "<lora:" not in positive_prompt:
@ -65,7 +65,7 @@ class StableDiffusion(commands.Cog):
try:
s.connect((ip, int(port)))
except Exception:
ip = "192.168.1.52"
ip = core_utils.ein_ip
try:
await ctx.defer()
original_message = await ctx.followup.send(

View File

@ -4,6 +4,7 @@ import os
my_guilds = [826547484632678450, 152921472304676865]
my_id = 144986109804412928
ein_ip = "192.168.1.137"
json_endpoint = "http://192.168.1.200/"
if os.getenv("DRAGON_ENV") == "prod":

55
helm/README.md Executable file
View File

@ -0,0 +1,55 @@
# dragon-bot
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
A Helm chart for Kubernetes
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| autoscaling.enabled | bool | `false` | |
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| env.DRAGON_ENV | string | `"prod"` | |
| env.PYTHONUNBUFFERED | int | `1` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"ldooks/dragon-bot"` | |
| image.tag | string | `"152"` | |
| imagePullSecrets | list | `[]` | |
| ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | |
| ingress.enabled | bool | `false` | |
| ingress.hosts[0].host | string | `"chart-example.local"` | |
| ingress.hosts[0].paths[0].path | string | `"/"` | |
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
| ingress.tls | list | `[]` | |
| nameOverride | string | `""` | |
| namespace | string | `"dragon-bot"` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| revisionHistoryLimit | int | `0` | |
| secrets.OPENAI_API_KEY | string | `"OPENAI_API_KEY"` | |
| secrets.discord_token | string | `"discord_token"` | |
| secrets.ffxiv_token | string | `"ffxiv_token"` | |
| secrets.star_citizen_token | string | `"star_citizen_token"` | |
| secrets.tracker_network_token | string | `"tracker_network_token"` | |
| secrets.twitch_token | string | `"twitch_token"` | |
| secrets.uexcorp_key | string | `"uexcorp_key"` | |
| secrets.wolfram_token | string | `"wolfram_token"` | |
| securityContext | object | `{}` | |
| tolerations | list | `[]` | |
| volumes[0].mountPath | string | `"/tmp/dale"` | |
| volumes[0].name | string | `"dale-pics"` | |
| volumes[0].path | string | `"/volume1/nas/docker_storage/syncthing-syncthing-claim-pvc-c42f03ae-56f6-498a-9af7-2ee8de1fcdb7/syncthing-configs/Dropbox-mirror/Photos/dale"` | |
| volumes[0].server | string | `"192.168.1.119"` | |
| volumes[0].type | string | `"nfs"` | |
----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)