Skip to content

Commit b91c020

Browse files
authored
feat(ChatSnowflake): Add tool calling support (& move to new API) (#98)
* wip add tool calling support to ChatSnowflake() * Get the non-streaming case working * Handle additional chat parameters * Add tests * Undo outdated change * Change model default; update changelog * Add password * cleanup
1 parent 54714a8 commit b91c020

File tree

7 files changed

+525
-112
lines changed

7 files changed

+525
-112
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,24 @@ jobs:
4848
- name: 📦 Install the project
4949
run: uv sync --python ${{ matrix.config.python-version }} --all-extras
5050

51+
- name: Create Snowflake connections.toml file
52+
run: |
53+
mkdir -p ~/.ssh
54+
echo '${{ secrets.SNOWFLAKE_SSH_PUBLIC_KEY }}' > ~/.ssh/snowflake_key.pub
55+
echo '${{ secrets.SNOWFLAKE_SSH_PRIVATE_KEY }}' > ~/.ssh/snowflake_key.p8
56+
chmod 644 ~/.ssh/snowflake_key.pub
57+
chmod 600 ~/.ssh/snowflake_key.p8
58+
chmod 700 ~/.ssh
59+
60+
mkdir -p ~/.snowflake
61+
cat > ~/.snowflake/connections.toml << 'EOF'
62+
[posit]
63+
account="duloftf-posit-software-pbc-dev"
64+
user="carson@posit.co"
65+
private_key_file="/home/runner/.ssh/snowflake_key.p8"
66+
private_key_file_pwd="${{ secrets.SNOWFLAKE_SSH_PRIVATE_KEY_PASSWORD }}"
67+
EOF
68+
5169
- name: 🧪 Check tests
5270
run: make check-tests
5371

CHANGELOG.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [UNRELEASED]
1111

12-
### Changes
13-
14-
* `ChatDatabricks()`'s `model` now defaults to `databricks-claude-3-7-sonnet` instead of `databricks-dbrx-instruct`. (#95)
15-
1612
### Improvements
1713

18-
* The `CHATLAS_LOG` environment variable will now enable logs for the relevant model provider. It now also supports a lovel of `debug` in addition to `info`. (#97)
14+
* The `CHATLAS_LOG` environment variable nows enable logs for the relevant model provider. It now also supports a lovel of `debug` in addition to `info`. (#97)
15+
* `ChatSnowflake()` now supports tool calling. (#98)
1916
* `Chat` instances can now be deep copied, which is useful for forking the chat session. (#96)
2017

18+
### Changes
19+
20+
* `ChatDatabricks()`'s `model` now defaults to `databricks-claude-3-7-sonnet` instead of `databricks-dbrx-instruct`. (#95)
21+
* `ChatSnowflake()`'s `model` now defaults to `claude-3-7-sonnet` instead of `llama3.1-70b`. (#98)
22+
2123
### Bug fixes
2224

2325
* Fixed an issue where `ChatDatabricks()` with an Anthropic `model` wasn't handling empty-string responses gracefully. (#95)

0 commit comments

Comments
 (0)