chatgraph 1.4.0__tar.gz → 1.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chatgraph-1.6.0/.dockerignore +7 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/.env.example +75 -70
- {chatgraph-1.4.0 → chatgraph-1.6.0}/.github/agents/SkillManager.agent.md +0 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/.github/agents/architect.agent.md +0 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/.github/agents/code-reviewer.agent.md +0 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/.github/agents/developer.agent.md +0 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/.github/copilot-instructions.md +0 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/.github/skills/chatgraph-framework/SKILL.md +805 -722
- {chatgraph-1.4.0 → chatgraph-1.6.0}/.gitignore +191 -191
- {chatgraph-1.4.0 → chatgraph-1.6.0}/.python-version +0 -0
- chatgraph-1.6.0/CHANGELOG.md +48 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/CLAUDE.md +153 -130
- {chatgraph-1.4.0 → chatgraph-1.6.0}/LICENSE +21 -21
- {chatgraph-1.4.0 → chatgraph-1.6.0}/PKG-INFO +94 -1
- {chatgraph-1.4.0 → chatgraph-1.6.0}/PROGRESS.md +215 -192
- {chatgraph-1.4.0 → chatgraph-1.6.0}/README.md +582 -490
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/__init__.py +161 -123
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/agent/__init__.py +28 -28
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/agent/agent.py +539 -539
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/agent/content.py +138 -138
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/agent/context.py +212 -212
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/agent/errors.py +53 -53
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/agent/executor.py +653 -653
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/agent/history_bridge.py +206 -206
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/agent/openrouter.py +383 -383
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/agent/prompts.py +306 -306
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/agent/protocol.py +459 -459
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/agent/schema.py +259 -259
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/agent/types.py +108 -108
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/auth/credentials.py +75 -75
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/bot/chatbot_model.py +447 -442
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/bot/chatbot_router.py +85 -85
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/bot/default_functions.py +23 -23
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/bot/default_guard.py +0 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/bot/route_registry.py +64 -64
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/cli/__init__.py +234 -234
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/container/container.py +0 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/error/chatbot_error.py +57 -57
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/error/route_error.py +26 -26
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/gRPC/gRPCCall.py +182 -182
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/history/__init__.py +16 -16
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/history/entry.py +72 -72
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/history/keys.py +22 -22
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/history/store.py +62 -62
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/logger/__init__.py +11 -11
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/logger/logger.py +3 -3
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/logger/user_logger.py +104 -104
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/messages/__init__.py +4 -4
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/messages/log_publisher.py +189 -189
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/messages/message_consumer.py +254 -337
- chatgraph-1.6.0/chatgraph/messages/transport.py +29 -0
- chatgraph-1.6.0/chatgraph/messages/turn.py +106 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/models/__init__.py +13 -13
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/models/actions.py +141 -141
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/models/http_responses.py +0 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/models/log_envelope.py +97 -97
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/models/message.py +380 -380
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/models/platform_state.py +35 -35
- chatgraph-1.6.0/chatgraph/models/url_button.py +136 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/models/userstate.py +474 -474
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/pb/router.proto +151 -151
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/pb/router_pb2.py +80 -80
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/pb/router_pb2_grpc.py +909 -909
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/services/__init__.py +0 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/services/router_http_client.py +742 -722
- chatgraph-1.6.0/chatgraph/stream/__init__.py +31 -0
- chatgraph-1.6.0/chatgraph/stream/backoff.py +52 -0
- chatgraph-1.6.0/chatgraph/stream/client.py +541 -0
- chatgraph-1.6.0/chatgraph/stream/connection.py +289 -0
- chatgraph-1.6.0/chatgraph/stream/consumer.py +355 -0
- chatgraph-1.6.0/chatgraph/stream/dedupe.py +19 -0
- chatgraph-1.6.0/chatgraph/stream/dual.py +68 -0
- chatgraph-1.6.0/chatgraph/stream/errors.py +66 -0
- chatgraph-1.6.0/chatgraph/stream/frames.py +60 -0
- chatgraph-1.6.0/chatgraph/stream/options.py +91 -0
- chatgraph-1.6.0/chatgraph/stream/router_client.py +98 -0
- chatgraph-1.6.0/chatgraph/stream/runtime.py +100 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/types/background_task.py +30 -30
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/types/end_types.py +81 -81
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/types/route.py +109 -109
- {chatgraph-1.4.0 → chatgraph-1.6.0}/chatgraph/types/usercall.py +587 -547
- {chatgraph-1.4.0 → chatgraph-1.6.0}/docs/gaps-go-to-python.md +184 -184
- chatgraph-1.6.0/docs/gaps-python-to-go.md +65 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/example.py +98 -98
- {chatgraph-1.4.0 → chatgraph-1.6.0}/example2.py +59 -59
- {chatgraph-1.4.0 → chatgraph-1.6.0}/examples/agent_smoke.py +259 -259
- {chatgraph-1.4.0 → chatgraph-1.6.0}/examples/agents_bot.py +127 -127
- {chatgraph-1.4.0 → chatgraph-1.6.0}/examples/content_insight.py +63 -63
- chatgraph-1.6.0/examples/stream/Dockerfile +12 -0
- chatgraph-1.6.0/examples/stream/bot.py +35 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/jsons/voll_return.json +8 -8
- {chatgraph-1.4.0 → chatgraph-1.6.0}/poetry.lock +1618 -1618
- {chatgraph-1.4.0 → chatgraph-1.6.0}/pyproject.toml +88 -85
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/__init__.py +0 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/integration/__init__.py +1 -1
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/integration/conftest.py +111 -111
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/integration/test_router_client_integration.py +376 -376
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/__init__.py +1 -1
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/conftest.py +144 -114
- chatgraph-1.6.0/tests/unit/stream_fake_router.py +332 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_agent_content.py +168 -168
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_agent_context.py +241 -241
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_agent_core.py +352 -352
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_agent_executor.py +764 -764
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_agent_history_bridge.py +208 -208
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_agent_openrouter.py +401 -401
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_agent_prompts.py +190 -190
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_agent_protocol.py +265 -265
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_agent_schema.py +323 -323
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_agent_validate_config.py +146 -146
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_chatbot_app_log_publisher.py +152 -152
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_default_guard.py +100 -100
- chatgraph-1.6.0/tests/unit/test_dual.py +839 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_guard.py +165 -165
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_history_integration.py +297 -297
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_history_store.py +278 -278
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_history_tool_entries.py +88 -88
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_log_envelope.py +110 -110
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_log_publisher.py +438 -438
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_message_consumer.py +403 -403
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_message_consumer_log_publisher.py +129 -129
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_models_actions.py +239 -239
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_models_message.py +376 -376
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_models_platform_state.py +52 -52
- chatgraph-1.6.0/tests/unit/test_models_url_button.py +346 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_models_userstate.py +472 -472
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_route_registry_integration.py +236 -236
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_router_http_client.py +926 -926
- chatgraph-1.6.0/tests/unit/test_router_url.py +54 -0
- chatgraph-1.6.0/tests/unit/test_stream_backoff.py +190 -0
- chatgraph-1.6.0/tests/unit/test_stream_consumer.py +610 -0
- chatgraph-1.6.0/tests/unit/test_stream_dedupe.py +42 -0
- chatgraph-1.6.0/tests/unit/test_stream_example.py +75 -0
- chatgraph-1.6.0/tests/unit/test_stream_executor.py +518 -0
- chatgraph-1.6.0/tests/unit/test_stream_handshake.py +184 -0
- chatgraph-1.6.0/tests/unit/test_stream_lifecycle.py +347 -0
- chatgraph-1.6.0/tests/unit/test_stream_options.py +107 -0
- chatgraph-1.6.0/tests/unit/test_stream_receiver.py +378 -0
- chatgraph-1.6.0/tests/unit/test_stream_router_client.py +339 -0
- chatgraph-1.6.0/tests/unit/test_stream_runtime.py +154 -0
- chatgraph-1.6.0/tests/unit/test_transport_selection.py +122 -0
- chatgraph-1.6.0/tests/unit/test_turn.py +134 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_user_logger.py +251 -251
- {chatgraph-1.4.0 → chatgraph-1.6.0}/tests/unit/test_usercall.py +520 -520
- chatgraph-1.6.0/tests/unit/test_usercall_url_button.py +204 -0
- {chatgraph-1.4.0 → chatgraph-1.6.0}/uv.lock +1417 -1139
- chatgraph-1.4.0/docs/gaps-python-to-go.md +0 -69
|
@@ -1,70 +1,75 @@
|
|
|
1
|
-
# Configuração do ChatGraph
|
|
2
|
-
|
|
3
|
-
# RabbitMQ
|
|
4
|
-
RABBIT_USER=seu_usuario
|
|
5
|
-
RABBIT_PASS=sua_senha
|
|
6
|
-
RABBIT_URI=amqp://localhost
|
|
7
|
-
RABBIT_QUEUE=chat_queue
|
|
8
|
-
RABBIT_PREFETCH=1
|
|
9
|
-
RABBIT_VHOST=/
|
|
10
|
-
|
|
11
|
-
# gRPC (legado)
|
|
12
|
-
GRPC_URI=grpc://localhost:50051
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
|
|
25
|
-
#
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
#
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
#
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
#
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
#
|
|
45
|
-
|
|
46
|
-
#
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
#
|
|
50
|
-
|
|
51
|
-
#
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
#
|
|
60
|
-
#
|
|
61
|
-
#
|
|
62
|
-
|
|
63
|
-
#
|
|
64
|
-
#
|
|
65
|
-
#
|
|
66
|
-
#
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
#
|
|
1
|
+
# Configuração do ChatGraph
|
|
2
|
+
|
|
3
|
+
# RabbitMQ
|
|
4
|
+
RABBIT_USER=seu_usuario
|
|
5
|
+
RABBIT_PASS=sua_senha
|
|
6
|
+
RABBIT_URI=amqp://localhost
|
|
7
|
+
RABBIT_QUEUE=chat_queue
|
|
8
|
+
RABBIT_PREFETCH=1
|
|
9
|
+
RABBIT_VHOST=/
|
|
10
|
+
|
|
11
|
+
# gRPC (legado)
|
|
12
|
+
GRPC_URI=grpc://localhost:50051
|
|
13
|
+
|
|
14
|
+
# Só o host; /v1 e /v1/actions continuam aceitos
|
|
15
|
+
ROUTER_URL='http://api-voll-hml.verdecard.tech/'
|
|
16
|
+
ROUTER_TOKEN='f078b1cf-b4c8-11f0-b4fe-0242ac140002'
|
|
17
|
+
# Transporte de entrada: queue (RabbitMQ, padrão), stream (WebSocket) ou dual (transição: fila + stream)
|
|
18
|
+
# ROUTER_TRANSPORT=queue
|
|
19
|
+
# Menus servidos no stream, separados por vírgula (padrão: RABBIT_QUEUE)
|
|
20
|
+
# ROUTER_MENUS=
|
|
21
|
+
|
|
22
|
+
# ====================================
|
|
23
|
+
# Testes de Integração
|
|
24
|
+
# ====================================
|
|
25
|
+
# Estas variáveis são necessárias APENAS para executar testes de integração
|
|
26
|
+
# que fazem chamadas reais para APIs externas.
|
|
27
|
+
#
|
|
28
|
+
# Se não configuradas, os testes de integração serão automaticamente pulados.
|
|
29
|
+
|
|
30
|
+
# URL base da API de roteamento (OBRIGATÓRIO para testes de integração)
|
|
31
|
+
ROUTER_API_BASE_URL=http://localhost:8000/v1/actions
|
|
32
|
+
|
|
33
|
+
# Autenticação da API (OPCIONAL - se a API requer autenticação)
|
|
34
|
+
ROUTER_API_USERNAME=test_integration_user
|
|
35
|
+
ROUTER_API_PASSWORD=f078b1cf-b4c8-11f0-b4fe-0242ac140002
|
|
36
|
+
|
|
37
|
+
# Timeout para requisições (OPCIONAL - default: 60s)
|
|
38
|
+
# ROUTER_API_TIMEOUT=60.0
|
|
39
|
+
|
|
40
|
+
# IDs para testes (OPCIONAL - valores padrão serão usados)
|
|
41
|
+
TEST_USER_ID=6107
|
|
42
|
+
TEST_COMPANY_ID=business-tech
|
|
43
|
+
|
|
44
|
+
# ====================================
|
|
45
|
+
# Agentes de IA (extra opcional: pip install chatgraph[agent])
|
|
46
|
+
# ====================================
|
|
47
|
+
# OpenRouter (provedor de LLM)
|
|
48
|
+
OPENROUTER_API_KEY=sk-or-...
|
|
49
|
+
# OPENROUTER_BASE_URL=https://openrouter.ai/api/v1 # opcional
|
|
50
|
+
|
|
51
|
+
# Modelo usado pelo Agent (qualquer modelo do OpenRouter)
|
|
52
|
+
AGENT_MODEL=openai/gpt-4o-mini
|
|
53
|
+
# AGENT_TEMPERATURE=0.7 # opcional (default 0.7)
|
|
54
|
+
# AGENT_MAX_TOKENS=2048 # opcional (default 2048)
|
|
55
|
+
# AGENT_MAX_TOOL_LOOPS=5 # opcional (default 5)
|
|
56
|
+
# AGENT_HISTORY_LIMIT=20 # opcional (default 20)
|
|
57
|
+
# AGENT_SYSTEM_PROMPT_FILE=prompts/personalidade.md # opcional
|
|
58
|
+
|
|
59
|
+
# Diagnóstico: loga o AgentContext COMPLETO (inclui dados do usuário
|
|
60
|
+
# na observation). Use apenas em debug local.
|
|
61
|
+
# LOG_AGENT_CONTEXT=1
|
|
62
|
+
|
|
63
|
+
# Bots com agente: um turno de LLM pode levar vários segundos; com
|
|
64
|
+
# RABBIT_PREFETCH=1 o consumer processa 1 mensagem por vez e a fila
|
|
65
|
+
# serializa. Considere aumentar (com o caveat de ordenação por chat).
|
|
66
|
+
# RABBIT_PREFETCH=4
|
|
67
|
+
|
|
68
|
+
# Log Publisher (RabbitMQ - opcional)
|
|
69
|
+
# Defina LOG_RABBIT_QUEUE para ativar o envio de logs de erro para fila RabbitMQ.
|
|
70
|
+
# O exchange e routing key padrão seguem o padrão do Go: exchange = vhost, routing key = chatbot.{queue}
|
|
71
|
+
# Com RABBIT_VHOST='/' não existe exchange homônima: cai na exchange
|
|
72
|
+
# default do AMQP e a routing key passa a ser o próprio nome da fila.
|
|
73
|
+
LOG_RABBIT_QUEUE=logs
|
|
74
|
+
LOG_RABBIT_EXCHANGE=chatbot-hml
|
|
75
|
+
# LOG_RABBIT_ROUTING_KEY=chatbot.logs # opcional: default = chatbot.{LOG_RABBIT_QUEUE}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|