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

Configs: add openai limited access o1 models; add xAI grok-beta #81

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
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
40 changes: 39 additions & 1 deletion elia_chat/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ class EliaChatModel(BaseModel):
"""A description of the model which may appear inside the Elia UI."""
product: str | None = Field(default=None)
"""For example `ChatGPT`, `Claude`, `Gemini`, etc."""
temperature: float = Field(default=1.0)
temperature: float | None = Field(default=1.0)
"""The temperature to use. Low temperature means the same prompt is likely
to produce similar results. High temperature means a flatter distribution
when predicting the next token, and so the next token will be more random.
Setting a very high temperature will likely produce junk output."""
max_retries: int = Field(default=0)
"""The number of times to retry a request after it fails before giving up."""
is_limited_access: bool = Field(default=False)
"""Whether a model/api limits access to special groups of users and should
be noted as such to interested users. Users who know/want these models can opt-in."""

@property
def lookup_key(self) -> str:
Expand Down Expand Up @@ -74,6 +77,26 @@ def get_builtin_openai_models() -> list[EliaChatModel]:
description="Previous high-intelligence model.",
temperature=0.7,
),
EliaChatModel(
id="elia-o1-mini",
name="o1-mini",
display_name="o1-mini",
provider="OpenAI",
product="ChatGPT",
description="Faster and cheaper version of o1, adept at coding, math, and science tasks where extensive general knowledge isn't required.",
temperature=None, # o1 models do not support temperature param
is_limited_access=True,
),
EliaChatModel(
id="elia-o1-preview",
name="o1-preview",
display_name="o1-preview",
provider="OpenAI",
product="ChatGPT",
description="Early preview of o1 model, designed to reason about hard problems using broad general knowledge about the world.",
temperature=None, # o1 models do not support temperature param
is_limited_access=True,
),
]


Expand Down Expand Up @@ -140,11 +163,26 @@ def get_builtin_google_models() -> list[EliaChatModel]:
]


def get_builtin_xai_models() -> list[EliaChatModel]:
return [
EliaChatModel(
id="elia-grok-beta",
name="xai/grok-beta",
display_name="Grok Beta",
provider="xAI",
product="Grok",
description="Grok Beta",
temperature=0.7
)
]


def get_builtin_models() -> list[EliaChatModel]:
return (
get_builtin_openai_models()
+ get_builtin_anthropic_models()
+ get_builtin_google_models()
+ get_builtin_xai_models()
)


Expand Down
3 changes: 3 additions & 0 deletions elia_chat/widgets/chat_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ def compose(self) -> ComposeResult:
if provider:
label += f" [i]by[/] {provider}"

if model.is_limited_access:
label += f" [dim](Limited Access – check with provider for your eligibility)[/]"

ids_defined = selected_model.id and model.id
same_id = ids_defined and selected_model.id == model.id
same_name = selected_model.name == model.name
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "elia_chat"
version = "1.10.0"
version = "1.11.0"
description = "A powerful terminal user interface for interacting with large language models."
authors = [
{ name = "Darren Burns", email = "[email protected]" }
Expand Down