This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<v-container v-if="appStore.activeLLM" fluid style="margin-top: 5vh"> | |
<v-card flat class="mx-auto" max-width="700px" color="transparent"> | |
<template v-slot:title> | |
<h2>Forensic Research Assistant</h2> | |
</template> | |
<template v-slot:subtitle> | |
Connected to | |
<strong>{{ appStore.activeLLM.display_name }}</strong> using model | |
<strong>{{ appStore.activeLLM.model }}</strong> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from fastapi import APIRouter | |
from pydantic import BaseModel | |
from typing import List | |
from api.datastores.chroma import VectorStore | |
from api.plugins.llms import manager | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from markdownify import markdownify | |
from bs4 import BeautifulSoup | |
from collections.abc import Generator | |
from api.datastores.chroma import VectorStore | |
BASE_URL = "https://forensics.wiki/tags/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import chromadb | |
class VectorStore: | |
def __init__(self, collection_name) -> None: | |
self.client = chromadb.PersistentClient(path="/tmp/embeddings.vector") | |
self.collection_name = collection_name | |
self.collection = self.client.get_or_create_collection(collection_name) | |
def embed_documents( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am berggren on github. | |
* I am j4711 (https://keybase.io/j4711) on keybase. | |
* I have a public key ASDRG5dDQ2rOVb0LPiEq_d7ftkxd_1JKJ8wvg3x0RnYUHgo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Tests for aggregations.""" | |
from __future__ import unicode_literals | |
import mock | |
from timesketch.lib.analyzers.the_sketch_analyzer import TheSketchAnalyzer | |
from timesketch.lib.testlib import BaseTest | |
from timesketch.lib.testlib import MockDataStore | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""TheSketchAnalyzer.""" | |
from __future__ import unicode_literals | |
from timesketch.lib.analyzers import interface | |
from timesketch.lib.analyzers import manager | |
class TheSketchAnalyzer(interface.BaseSketchAnalyzer): | |
"""The Sketch Analyzer.""" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""TheIndexAnalyzer.""" | |
from __future__ import unicode_literals | |
from timesketch.lib.analyzers import interface | |
from timesketch.lib.analyzers import manager | |
class TheIndexAnalyzer(interface.BaseIndexAnalyzer): | |
"""The Index Analyzer.""" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
message,timestamp,datetime,timestamp_desc,extra_field_1,extra_field_2 | |
A message,123456789,2015-07-24T19:01:01+00:00,Write time,foo,bar | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import BeautifulSoup | |
class TimesketchApiClient(): | |
def __init__(self, host, username, password): | |
self.host = host | |
self.host_url = u'http://{0:s}:5000'.format(self.host) | |
self.session = self._CreateSession(username, password) |
NewerOlder