Skip to content

Commit

Permalink
fixed templates to validation
Browse files Browse the repository at this point in the history
  • Loading branch information
birdperson1970 committed Dec 9, 2023
1 parent ae3610f commit 69ef211
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"continue.showInlineTip": false,
"python.testing.pytestArgs": ["server"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
"python.testing.pytestEnabled": true,
"python.terminal.activateEnvironment": true
}
4 changes: 2 additions & 2 deletions extensions/vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion extensions/vscode/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "continue",
"icon": "media/icon.png",
"version": "0.6.29",
"version": "0.6.31",
"repository": {
"type": "git",
"url": "https://github.com/continuedev/continue"
Expand Down
2 changes: 1 addition & 1 deletion server/continuedev/libs/llm/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class LLM(ContinueBaseModel):
validate_default=True,
)

template_messages: Annotated[Optional[Callable[[List[ChatMessage]], str]], WithJsonSchema({'type': 'string'}, mode='serialization')] = Field(
template_messages: Annotated[Optional[Callable[[List[ChatMessage]], str]], WithJsonSchema({'type': 'string'}, mode='validation')] = Field(
default=None,
description="A function that takes a list of messages and returns a prompt. This ensures that models like llama2, which are trained on specific chat formats, will always receive input in that format.",
validate_default=True
Expand Down
2 changes: 1 addition & 1 deletion server/continuedev/models/generate_json_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def main():
elif model == ModelName:
title = "ModelName"
try:
print(f"generating schema {title}")
print(f"generating schema {title} - {model}")
with open(f"{SCHEMA_DIR}/{title}.json", "w") as f:
f.write(json.dumps(model.model_json_schema(), indent=2))

Expand Down
1 change: 0 additions & 1 deletion server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ pathspec==0.11.2
tqdm==4.66.1
html2text==2020.1.16
aiohttp==3.8.6
chroma-hnswlib==0.7.1

0 comments on commit 69ef211

Please sign in to comment.