Skip to content

Commit f544a9d

Browse files
authored
Merge pull request #318 from jekalmin/v1.0.5
1.0.5
2 parents a7ac05d + 9e44bd4 commit f544a9d

File tree

4 files changed

+84
-13
lines changed

4 files changed

+84
-13
lines changed

custom_components/extended_openai_conversation/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The OpenAI Conversation integration."""
2+
23
from __future__ import annotations
34

45
import json
@@ -72,11 +73,7 @@
7273
ParseArgumentsFailed,
7374
TokenLengthExceededError,
7475
)
75-
from .helpers import (
76-
get_function_executor,
77-
is_azure,
78-
validate_authentication,
79-
)
76+
from .helpers import get_function_executor, is_azure, validate_authentication
8077
from .services import async_setup_services
8178

8279
_LOGGER = logging.getLogger(__name__)
@@ -155,6 +152,8 @@ def __init__(self, hass: HomeAssistant, entry: ConfigEntry) -> None:
155152
organization=entry.data.get(CONF_ORGANIZATION),
156153
http_client=get_async_client(hass),
157154
)
155+
# Cache current platform data which gets added to each request (caching done by library)
156+
_ = hass.async_add_executor_job(self.client.platform_headers)
158157

159158
@property
160159
def supported_languages(self) -> list[str] | Literal["*"]:

custom_components/extended_openai_conversation/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
"requirements": [
2121
"openai~=1.3.8"
2222
],
23-
"version": "1.0.4"
23+
"version": "1.0.5"
2424
}

custom_components/extended_openai_conversation/translations/pl.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"api_key": "Klucz API",
1313
"base_url": "Bazowy URL",
1414
"api_version": "Wersja API",
15-
"organization": "Organization",
15+
"organization": "Organizacja",
1616
"skip_authentication": "Pomiń authentykację"
1717
}
1818
}
@@ -22,17 +22,17 @@
2222
"step": {
2323
"init": {
2424
"data": {
25-
"max_tokens": "Maksymalna ilość tokenów w odpowiedzi",
25+
"max_tokens": "Maksymalna liczba tokenów w odpowiedzi",
2626
"model": "Model",
2727
"prompt": "Prompt",
2828
"temperature": "Temperatura",
2929
"top_p": "Top P",
30-
"max_function_calls_per_conversation": "Maksymalna ilość wywołań funkcji na rozmowę",
30+
"max_function_calls_per_conversation": "Maksymalna liczba wywołań funkcji na rozmowę",
3131
"functions": "Funkcje",
3232
"attach_username": "Dodaj nazwę użytkownika do wiadomości",
33-
"use_tools": "Use Tools",
34-
"context_threshold": "Context Threshold",
35-
"context_truncate_strategy": "Context truncation strategy when exceeded threshold"
33+
"use_tools": "Używaj narzędzi",
34+
"context_threshold": "Limit kontekstu",
35+
"context_truncate_strategy": "Co zrobić z kontekstem, gdy przekroczony limit"
3636
}
3737
}
3838
}
@@ -69,4 +69,4 @@
6969
}
7070
}
7171
}
72-
}
72+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"config": {
3+
"error": {
4+
"cannot_connect": "Não é possível ligar",
5+
"invalid_auth": "Autenticação inválida",
6+
"unknown": "Erro desconhecido"
7+
},
8+
"step": {
9+
"user": {
10+
"data": {
11+
"name": "Nome",
12+
"api_key": "Chave API",
13+
"base_url": "Base Url",
14+
"api_version": "Versão da API",
15+
"organization": "Organização",
16+
"skip_authentication": "Saltar autenticação"
17+
}
18+
}
19+
}
20+
},
21+
"options": {
22+
"step": {
23+
"init": {
24+
"data": {
25+
"max_tokens": "Número máximo de tokens da resposta",
26+
"model": "Modelo da Conclusão",
27+
"prompt": "Template do Prompt",
28+
"temperature": "Temperatura",
29+
"top_p": "Top P",
30+
"max_function_calls_per_conversation": "Quantidade máxima de chamadas por conversação",
31+
"functions": "Funções",
32+
"attach_username": "Anexar nome do usuário na mensagem",
33+
"use_tools": "Use ferramentas",
34+
"context_threshold": "Limite do contexto",
35+
"context_truncate_strategy": "Estratégia de limite de contexto quando o limite é excedido"
36+
}
37+
}
38+
}
39+
},
40+
"services": {
41+
"query_image": {
42+
"name": "Consultar imagem",
43+
"description": "Receber imagens e responda perguntas sobre elas",
44+
"fields": {
45+
"config_entry": {
46+
"name": "Registro de configuração",
47+
"description": "O registo de configuração para utilizar neste serviço"
48+
},
49+
"model": {
50+
"name": "Modelo",
51+
"description": "Especificar modelo",
52+
"example": "gpt-4-vision-preview"
53+
},
54+
"prompt": {
55+
"name": "Prompt",
56+
"description": "O texto para fazer a pergunta sobre a imagem",
57+
"example": "O que tem nesta imagem?"
58+
},
59+
"images": {
60+
"name": "Imagens",
61+
"description": "Uma lista de imagens que serão analisadas",
62+
"example": "{\"url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\"}"
63+
},
64+
"max_tokens": {
65+
"name": "Max Tokens",
66+
"description": "Quantidade máxima de tokens",
67+
"example": "300"
68+
}
69+
}
70+
}
71+
}
72+
}

0 commit comments

Comments
 (0)