Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep chat model up to date #148

Merged
merged 3 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## 4.4.9 (unreleased)


- Nothing changed yet.
- Keep ChatModel up to date


## 4.4.8 (2025-01-28)
Expand Down
25 changes: 0 additions & 25 deletions docs/10-activity-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,31 +95,6 @@ The `audit_metadata` field is a customizable dictionary. Use the `key` operator
}
}
```
### Special Field: `audit_metadata`
The `audit_metadata` field is a customizable dictionary. Use the `key` operator to target specific keys within the dictionary.

#### Example to filter by `audit_metadata`:

```json
{
"year_month": "2024-10",
"show": ["audit_metadata.environment"],
"filters": {
"audit_metadata": [
{
"key": "environment",
"eq": "prod"
}
]
},
"pagination": {
"limit": 10
}
}
```




### Download Examples

Expand Down
11 changes: 11 additions & 0 deletions nuclia/lib/nua_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,24 @@ class ChatModel(BaseModel):
truncate: Optional[bool] = False
user_prompt: Optional[UserPrompt] = None
citations: Optional[bool] = False
citation_threshold: Optional[float] = Field(
default=None,
description="If citations is set to True, this will be the similarity threshold. Value between 0 and 1, lower values will produce more citations. If not set, it will be set to the optimized threshold found by Nuclia.",
ge=0.0,
le=1.0,
)
generative_model: Optional[str] = None
max_tokens: Optional[int] = None
query_context_images: Union[
List[Image], Dict[str, Image]
] = {} # base64.b64encode(image_file.read()).decode('utf-8')
prefer_markdown: Optional[bool] = None
json_schema: Optional[Dict[str, Any]] = None
format_prompt: bool = True
rerank_context: bool = Field(
default=False,
description="Whether to reorder the query context based on a reranker. This option will also make it so the first response will contain the scores given for each context piece.",
)

@model_validator(mode="after")
def validate_model(self) -> Self:
Expand Down