Skip to content

Commit

Permalink
Merge pull request #269 from stackql/feature/provider
Browse files Browse the repository at this point in the history
anthropic update
  • Loading branch information
jeffreyaven authored Nov 1, 2024
2 parents aa0a0b1 + 339a6d6 commit d3dee18
Showing 1 changed file with 40 additions and 39 deletions.
79 changes: 40 additions & 39 deletions providers/src/anthropic/v00.00.00000/services/messages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -254,42 +254,43 @@ components:
update: []
replace: []
delete: []
claude_35_chat:
name: claude_35_chat
id: anthropic.messages.claude_35_chat
config:
views:
select:
predicate: sqlDialect == "sqlite3"
ddl: |-
SELECT
model as model,
role as role,
stop_reason as stop_reason,
stop_sequence as stop_sequence,
JSON_EXTRACT(usage, '$.input_tokens') as input_tokens,
JSON_EXTRACT(usage, '$.output_tokens') as output_tokens,
JSON_EXTRACT(json_each.value, '$.text') as content
FROM
anthropic.messages.message, JSON_EACH(content)
WHERE "anthropic-version" = '2023-06-01'
AND data__model = 'claude-3-5-sonnet-20240620'
AND data__max_tokens = 1024
AND data__messages = '[{"role": "user", "content": "one sentence summary of stackql"}]'
fallback:
predicate: sqlDialect == "postgres"
ddl: |-
SELECT
model as model,
role as role,
stop_reason as stop_reason,
stop_sequence as stop_sequence,
json_extract_path_text(usage, 'input_tokens') as input_tokens,
json_extract_path_text(usage, 'output_tokens') as output_tokens,
json_extract_path_text(json_each.value, 'text') as content
FROM
anthropic.messages.message, json_array_elements_text(content)
WHERE "anthropic-version" = '2023-06-01'
AND data__model = 'claude-3-5-sonnet-20240620'
AND data__max_tokens = 1024
AND data__messages = '[{"role": "user", "content": "one sentence summary of stackql"}]'
# claude_35_chat:
# name: claude_35_chat
# id: anthropic.messages.claude_35_chat
# config:
# views:
# select:
# predicate: sqlDialect == "sqlite3"
# ddl: |-
# SELECT
# model as model,
# role as role,
# stop_reason as stop_reason,
# stop_sequence as stop_sequence,
# data__messages as messages,
# JSON_EXTRACT(usage, '$.input_tokens') as input_tokens,
# JSON_EXTRACT(usage, '$.output_tokens') as output_tokens,
# JSON_EXTRACT(json_each.value, '$.text') as content
# FROM
# anthropic.messages.message, JSON_EACH(content)
# WHERE "anthropic-version" = '2023-06-01'
# AND data__model = 'claude-3-5-sonnet-20240620'
# AND data__max_tokens = 1024
# AND data__messages = '[{"role": "user", "content": "one sentence summary of stackql"}]'
# fallback:
# predicate: sqlDialect == "postgres"
# ddl: |-
# SELECT
# model as model,
# role as role,
# stop_reason as stop_reason,
# stop_sequence as stop_sequence,
# json_extract_path_text(usage, 'input_tokens') as input_tokens,
# json_extract_path_text(usage, 'output_tokens') as output_tokens,
# json_extract_path_text(json_each.value, 'text') as content
# FROM
# anthropic.messages.message, json_array_elements_text(content)
# WHERE "anthropic-version" = '2023-06-01'
# AND data__model = 'claude-3-5-sonnet-20240620'
# AND data__max_tokens = 1024
# AND data__messages = '[{"role": "user", "content": "one sentence summary of stackql"}]'

0 comments on commit d3dee18

Please sign in to comment.