Skip to content

Commit

Permalink
assistant things ig
Browse files Browse the repository at this point in the history
  • Loading branch information
catgirlinspace committed Jul 16, 2024
1 parent 1975d0c commit 5a2abcc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions assistant/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class Meta:
def get_absolute_url(self):
return reverse('assistant:view_thread', args=[str(self.id)])

def __str__(self):
return f"Thread {self.id} - {self.openai_thread_id} - @{self.creator.username}"


class SharedThread(models.Model):
uuid = models.UUIDField(default=uuid.uuid4, editable=False, db_index=True, unique=True)
Expand Down
8 changes: 5 additions & 3 deletions assistant/templates/assistant/list_threads.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ <h2 class="text-xl font-splatoon1">Threads</h2>

<p class="py-1 max-w-prose">
Splashcat Assistant uses <a href="https://openai.com/index/hello-gpt-4o/" target="_blank" rel="noopener"
class="text-blue-500 underline">OpenAI GPT-4o</a>. The knowledge cutoff is October
2023. Splashcat Assistant may make mistakes and responses should always be checked for accuracy.
class="text-blue-500 underline">OpenAI GPT-4o</a> to analyze selected battle data
and create battle groups.
The knowledge cutoff is October 2023. Splashcat Assistant may make mistakes and responses should always be
checked for accuracy.
</p>

<p class="py-1 max-w-prose">
When interacting with Splashcat Assistant, prefer using the exact names of weapons over shortened names for
better results.
better results. The data available is selected at the time of thread creation.
</p>

<div class="py-5">
Expand Down
3 changes: 2 additions & 1 deletion assistant/templatetags/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
def get_openai_image(context, image: ImageFile | dict):
file = client.files.content(image['file_id'] if type(image) is dict else image.file_id)
base64_image = base64.b64encode(file.content).decode('ascii')
return mark_safe(f'<img src="data:image/png;base64,{base64_image}" class="w-full max-w-fit aspect-auto">')
return mark_safe(
f'<img src="data:image/png;base64,{base64_image}" class="w-full max-w-fit aspect-auto rounded-sm">')
3 changes: 2 additions & 1 deletion templates/splashcat/sponsor.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ <h2 class="text-xl font-splatoon1">Xponsor Features</h2>
<li>
Splashcat Assistant
<p class="text-md ml-8">
Receive insights on your battle data with Splashcat Assistant.
Receive insights on your battle data and create new battle groups with Splashcat Assistant.
<a href="https://splashcat.ink/assistant/threads/shared/7a6226d0-083c-47af-97de-be2f20aca86c/" class="text-blue-500 underline text-base">Example Thread</a>
</p>
<p class="text-sm ml-8 text-gray-500">
Sponsorship privacy does not affect this feature.
Expand Down

0 comments on commit 5a2abcc

Please sign in to comment.