Skip to content

Commit

Permalink
(update) Sync with internal (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: Aleksandr Liadov <[email protected]>
  • Loading branch information
AleksandrLiadov and Aleksandr Liadov authored Dec 20, 2024
1 parent 36cf7fa commit d6cd376
Show file tree
Hide file tree
Showing 34 changed files with 3,932 additions and 2,245 deletions.
5 changes: 0 additions & 5 deletions .devcontainer/devcontainer.json

This file was deleted.

11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

190 changes: 0 additions & 190 deletions .github/workflows/combine-prs.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/openai-review.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/versioning.yml

This file was deleted.

4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ inputs:
heavy_model_port:
required: false
description: 'Port for the heavy model'
default: '44902'
default: '44951'
model_temperature:
required: false
description: 'Temperature for language model'
default: '0.1'
default: '0.2'
retries:
required: false
description:
Expand Down
Empty file added core/bots/__init__.py
Empty file.
14 changes: 6 additions & 8 deletions core/bot.py → core/bots/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,19 @@


class Ids(BaseModel):
conversationId: Optional[str]
parentMessageId: Optional[str]
# Currently not used
conversationId: Optional[str] = None
parentMessageId: Optional[str] = None

def __str__(self) -> str:
return f"conversationId: {self.conversationId}, parentMessageId: {self.parentMessageId} \n"


class AiResponse(BaseModel):
message: str
ids: Ids
message: str = ""

def __str__(self) -> str:
return str(self.ids) + "\n".join(
[f"{line}" for line in self.message.split("\n")]
)
return "\n".join([f"{line}" for line in self.message.split("\n")])


class ModelOptions(ABC):
Expand All @@ -47,5 +45,5 @@ def __init__(self, options: Options, model_options: ModelOptions):
self.model_options = model_options

@abstractmethod
def chat(self, message, ids):
def chat(self, message: str) -> AiResponse:
pass
Loading

0 comments on commit d6cd376

Please sign in to comment.