Skip to content

Commit

Permalink
Fixed type warning
Browse files Browse the repository at this point in the history
  • Loading branch information
slincoln-aiq committed Nov 7, 2024
1 parent 7766e2c commit b752206
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sigmaiq/llm/tools/query_to_sigma_rule.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import asyncio
import json
from typing import Union, Type
from typing import Optional, Union, Type

from langchain.prompts import ChatPromptTemplate
from langchain.schema.language_model import BaseLanguageModel
Expand Down Expand Up @@ -50,10 +50,10 @@ class Config:

extra = Extra.forbid

def _run(self, query: str = None, backend: str = None) -> str:
def _run(self, query: Optional[str] = None, backend: Optional[str] = None) -> str:
return asyncio.run(self._arun(query, backend))

async def _arun(self, query: str = None, backend: str = None) -> str:
async def _arun(self, query: Optional[str] = None, backend: Optional[str] = None) -> str:
template = """You are a cybersecurity detection engineering assistant bot specializing in Sigma Rule creation.
You are assisting a user in taking a query for a security/SIEM product, and converting it to a Sigma Rule.
The backend is used to validate the query and ensure it is compatible with the backend.
Expand Down

0 comments on commit b752206

Please sign in to comment.