Skip to content

Commit f802f59

Browse files
authored
Merge pull request #200 from stackql/feature/doc-updates
added anthropic
2 parents ac295f3 + aa82f49 commit f802f59

File tree

14 files changed

+277
-6
lines changed

14 files changed

+277
-6
lines changed

.github/workflows/build-docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
if [ $PROVIDER == "root" ]; then
7979
echo "adding vanity url redirects to _redirects file.."
8080
touch ./build/_redirects
81-
array=( aws azure azure-extras azure-isv azure-stack digitalocean firebase github openai google googleadmin k8s linode netlify okta sumologic vercel godaddy pagerduty homebrew datadog )
81+
array=( aws azure azure-extras azure-isv azure-stack digitalocean firebase github openai anthropic google googleadmin k8s linode netlify okta sumologic vercel godaddy pagerduty homebrew datadog )
8282
for i in "${array[@]}"
8383
do
8484
echo "adding redirects for $i"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ This repository contains documentation for StackQL providers, which is published
2828
| Netlify Deploy Azure ISV | [![Netlify Status](https://api.netlify.com/api/v1/badges/35fc840c-0494-462f-9b3f-cbd3418a3c78/deploy-status)](https://app.netlify.com/sites/stackql-azure-isv-docs/deploys) | [azure-isv-docs.stackql.io](https://azure-isv-docs.stackql.io)<br/>[azure-isv.stackql.io](https://azure-isv.stackql.io) |
2929
| Netlify Deploy Azure Stack | [![Netlify Status](https://api.netlify.com/api/v1/badges/53abcb20-0194-41dd-b466-4d933cfffcad/deploy-status)](https://app.netlify.com/sites/stackql-azure-stack-docs/deploys) | [azure-stack-docs.stackql.io](https://azure-stack-docs.stackql.io)<br/>[azure-stack.stackql.io](https://azure-stack.stackql.io) |
3030
| Netlify Deploy OpenAI | [![Netlify Status](https://api.netlify.com/api/v1/badges/6df5743b-8c5d-4949-866e-eda4ca3f74d0/deploy-status)](https://app.netlify.com/sites/stackql-openai-docs/deploys) | [openai-docs.stackql.io](https://openai-docs.stackql.io)<br/>[openai.stackql.io](https://openai.stackql.io) |
31+
| Netlify Deploy Anthropic | [![Netlify Status](https://api.netlify.com/api/v1/badges/114c5a2a-9b76-4941-a0e8-3669ee7d2016/deploy-status)](https://app.netlify.com/sites/stackql-anthropic-docs/deploys) | [anthropic-docs.stackql.io](https://anthropic-docs.stackql.io)<br/>[anthropic.stackql.io](https://anthropic.stackql.io) |
32+
3133

3234
## Adding Docs for a New Provider
3335

ci-scripts/get-providers-to-deploy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const allProviders = [
1616
'firebase',
1717
'github',
1818
'openai',
19+
'anthropic',
1920
'google',
2021
'googleadmin',
2122
'k8s',

docs/anthropic-docs/index.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
title: anthropic
3+
hide_title: false
4+
hide_table_of_contents: false
5+
keywords:
6+
- anthropic
7+
- stackql
8+
- infrastructure-as-code
9+
- configuration-as-data
10+
- cloud inventory
11+
description: Query, deploy, and manage Anthropic resources using SQL.
12+
custom_edit_url: null
13+
image: /img/providers/anthropic/stackql-anthropic-provider-featured-image.png
14+
id: anthropic-doc
15+
slug: /providers/anthropic
16+
---
17+
18+
import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
19+
20+
AI models including Claude for advanced language understanding and generation.
21+
22+
:::info Provider Summary (v24.10.00267)
23+
24+
<div class="row">
25+
<div class="providerDocColumn">
26+
<span>total services:&nbsp;<b>1</b></span><br />
27+
<span>total methods:&nbsp;<b>2</b></span><br />
28+
</div>
29+
<div class="providerDocColumn">
30+
<span>total resources:&nbsp;<b>2</b></span><br />
31+
<span>total selectable resources:&nbsp;<b>2</b></span><br />
32+
</div>
33+
</div>
34+
35+
:::
36+
37+
See also:
38+
[[` SHOW `]](https://stackql.io/docs/language-spec/show) [[` DESCRIBE `]](https://stackql.io/docs/language-spec/describe) [[` REGISTRY `]](https://stackql.io/docs/language-spec/registry)
39+
* * *
40+
41+
## Installation
42+
43+
To pull the latest version of the `anthropic` provider, run the following command:
44+
45+
```bash
46+
REGISTRY PULL anthropic;
47+
```
48+
> To view previous provider versions or to pull a specific provider version, see [here](https://stackql.io/docs/language-spec/registry).
49+
50+
## Authentication
51+
52+
The following system environment variables are used for authentication by default:
53+
54+
- <CopyableCode code="ANTHROPIC_API_KEY" /> - Anthropic API key (see <a href="https://docs.anthropic.com/claude/reference/getting-started-with-the-api">How to Create an Anthropic API Key</a>)
55+
56+
These variables are sourced at runtime (from the local machine or as CI variables/secrets).
57+
58+
<details>
59+
60+
<summary>Using different environment variables</summary>
61+
62+
To use different environment variables (instead of the defaults), use the `--auth` flag of the `stackql` program. For example:
63+
64+
```bash
65+
66+
AUTH='{ "anthropic": { "type": "bearer", "credentialsenvvar": "MY_ANTHROPIC_API_KEY" }}'
67+
stackql shell --auth="${AUTH}"
68+
69+
```
70+
or using PowerShell:
71+
72+
```powershell
73+
74+
$Auth = "{ 'anthropic': { 'type': 'bearer', 'credentialsenvvar': 'MY_ANTHROPIC_API_KEY' }}"
75+
stackql.exe shell --auth=$Auth
76+
77+
```
78+
</details>
79+
80+
## Services
81+
<div class="row">
82+
<div class="providerDocColumn">
83+
<a href="/providers/anthropic/messages/">messages</a><br />
84+
</div>
85+
<div class="providerDocColumn">
86+
</div>
87+
</div>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: claude_35_chat
3+
hide_title: false
4+
hide_table_of_contents: false
5+
keywords:
6+
- claude_35_chat
7+
- messages
8+
- anthropic
9+
- stackql
10+
- infrastructure-as-code
11+
- configuration-as-data
12+
- cloud inventory
13+
description: Query, deploy, and manage Anthropic resources using SQL.
14+
custom_edit_url: null
15+
image: /img/providers/anthropic/stackql-anthropic-provider-featured-image.png
16+
---
17+
18+
import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
19+
20+
21+
22+
23+
## Overview
24+
<table><tbody>
25+
<tr><td><b>Name</b></td><td><code>claude_35_chat</code></td></tr>
26+
<tr><td><b>Type</b></td><td>Resource</td></tr>
27+
<tr><td><b>Id</b></td><td><CopyableCode code="anthropic.messages.claude_35_chat" /></td></tr>
28+
</tbody></table>
29+
30+
## Fields
31+
> This resource is a view. For the view definition, please refer to the provider spec in the [stackql-provider-registry](https://github.com/stackql/stackql-provider-registry/blob/dev/providers/src/anthropic/v00.00.00000/services/messages.yaml), located under `components -> x-stackQL-resources -> claude_35_chat`.
32+
33+
| Name | Datatype |
34+
|:-----|:---------|
35+
| <CopyableCode code="content" /> ||
36+
| <CopyableCode code="input_tokens" /> | `text` |
37+
| <CopyableCode code="model" /> | `text` |
38+
| <CopyableCode code="output_tokens" /> | `text` |
39+
| <CopyableCode code="role" /> | `text` |
40+
| <CopyableCode code="stop_reason" /> | `text` |
41+
| <CopyableCode code="stop_sequence" /> | `text` |
42+
## Methods
43+
No additional methods available for this resource
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: messages
3+
hide_title: false
4+
hide_table_of_contents: false
5+
keywords:
6+
- messages
7+
- anthropic
8+
- stackql
9+
- infrastructure-as-code
10+
- configuration-as-data
11+
- cloud inventory
12+
description: Query, deploy, and manage Anthropic resources using SQL.
13+
custom_edit_url: null
14+
image: /img/providers/anthropic/stackql-anthropic-provider-featured-image.png
15+
---
16+
17+
Given A List Of Messages Comprising A Conversation, The Model Will Return A Response.
18+
19+
:::info Service Summary
20+
21+
<div class="row">
22+
<div class="providerDocColumn">
23+
<span>total resources:&nbsp;<b>2</b></span><br />
24+
<span>total selectable resources:&nbsp;<b>2</b></span><br />
25+
<span>total methods:&nbsp;<b>2</b></span><br />
26+
</div>
27+
</div>
28+
29+
:::
30+
31+
## Overview
32+
<table><tbody>
33+
<tr><td><b>Name</b></td><td><code>anthropic.messages</code></td></tr>
34+
<tr><td><b>Type</b></td><td>Service</td></tr>
35+
<tr><td><b>Title</b></td><td>Anthropic API - Messages</td></tr>
36+
<tr><td><b>Description</b></td><td>Given A List Of Messages Comprising A Conversation, The Model Will Return A Response.</td></tr>
37+
<tr><td><b>Id</b></td><td><code>messages:v24.10.00267</code></td></tr>
38+
</tbody></table>
39+
40+
## Resources
41+
<div class="row">
42+
<div class="providerDocColumn">
43+
<a href="/providers/anthropic/messages/claude_35_chat/">claude_35_chat</a><br />
44+
</div>
45+
<div class="providerDocColumn">
46+
<a href="/providers/anthropic/messages/message/">message</a><br />
47+
</div>
48+
</div>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: message
3+
hide_title: false
4+
hide_table_of_contents: false
5+
keywords:
6+
- message
7+
- messages
8+
- anthropic
9+
- stackql
10+
- infrastructure-as-code
11+
- configuration-as-data
12+
- cloud inventory
13+
description: Query, deploy, and manage Anthropic resources using SQL.
14+
custom_edit_url: null
15+
image: /img/providers/anthropic/stackql-anthropic-provider-featured-image.png
16+
---
17+
18+
import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
19+
20+
21+
22+
23+
## Overview
24+
<table><tbody>
25+
<tr><td><b>Name</b></td><td><code>message</code></td></tr>
26+
<tr><td><b>Type</b></td><td>Resource</td></tr>
27+
<tr><td><b>Id</b></td><td><CopyableCode code="anthropic.messages.message" /></td></tr>
28+
</tbody></table>
29+
30+
## Fields
31+
| Name | Datatype | Description |
32+
|:-----|:---------|:------------|
33+
| <CopyableCode code="id" /> | `string` | Unique object identifier. |
34+
| <CopyableCode code="content" /> | `array` | The generated content blocks by the model. |
35+
| <CopyableCode code="model" /> | `string` | The model that handled the request. |
36+
| <CopyableCode code="role" /> | `string` | The conversational role of the generated message. |
37+
| <CopyableCode code="stop_reason" /> | `string` | The reason the model stopped generating. |
38+
| <CopyableCode code="stop_sequence" /> | `string` | The stop sequence that caused the model to stop, if applicable. |
39+
| <CopyableCode code="type" /> | `string` | Object type, which is always "message" for Messages API. |
40+
| <CopyableCode code="usage" /> | `object` | Information about token usage and rate limits. |
41+
## Methods
42+
| Name | Accessible by | Required Params |
43+
|:-----|:--------------|:----------------|
44+
| <CopyableCode code="create_message" /> | `SELECT` | <CopyableCode code="anthropic-version, data__max_tokens, data__messages, data__model" /> |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: StackQL Provider Registry
3+
hide_title: true
4+
hide_table_of_contents: true
5+
keywords:
6+
- stackql
7+
- infrastructure-as-code
8+
- configuration-as-data
9+
- cloud inventory
10+
description: Query and Deploy Cloud Infrastructure and Resources using SQL
11+
custom_edit_url: null
12+
image: https://storage.googleapis.com/stackql-web-assets/blog/stackql-blog-post-featured-image.png
13+
slug: /
14+
---
15+
import RegistryPage from '@site/src/shared/shared-stackql-provider-registry.mdx';
16+
17+
<RegistryPage currentProvider="anthropic" />
18+
19+
---
20+

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"start:firebase": "export REGISTRY=firebase && docusaurus start",
1313
"start:github": "export REGISTRY=github && docusaurus start",
1414
"start:openai": "export REGISTRY=openai && docusaurus start",
15+
"start:anthropic": "export REGISTRY=anthropic && docusaurus start",
1516
"start:google": "export REGISTRY=google && docusaurus start",
1617
"start:k8s": "export REGISTRY=k8s && docusaurus start",
1718
"start:netlify": "export REGISTRY=netlify && docusaurus start",
@@ -34,6 +35,7 @@
3435
"build:firebase": "export REGISTRY=firebase && docusaurus build",
3536
"build:github": "export REGISTRY=github && docusaurus build",
3637
"build:openai": "export REGISTRY=openai && docusaurus build",
38+
"build:anthropic": "export REGISTRY=anthropic && docusaurus build",
3739
"build:google": "export REGISTRY=google && docusaurus build",
3840
"build:k8s": "export REGISTRY=k8s && docusaurus build",
3941
"build:netlify": "export REGISTRY=netlify && docusaurus build",

scripts/docgen/provider_data.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@
131131
"""
132132

133133
provider_data = {
134+
'anthropic': {
135+
'meta_description': 'Query, deploy, and manage Anthropic resources using SQL.',
136+
'description': 'AI models including Claude for advanced language understanding and generation.',
137+
'image': '/img/providers/anthropic/stackql-anthropic-provider-featured-image.png'
138+
},
134139
'openai': {
135140
'meta_description': 'Query, deploy, and manage OpenAI and ChatGPT resources using SQL.',
136141
'description': 'AI models for natural language processing and content generation.',
@@ -240,6 +245,23 @@
240245

241246
auth_blocks = {
242247
#
248+
# Anthropic
249+
#
250+
'anthropic': {
251+
'custom': False,
252+
'variables': """
253+
- <CopyableCode code="ANTHROPIC_API_KEY" /> - Anthropic API key (see <a href="https://docs.anthropic.com/claude/reference/getting-started-with-the-api">How to Create an Anthropic API Key</a>)
254+
""",
255+
'linux': """
256+
AUTH='{ "anthropic": { "type": "bearer", "credentialsenvvar": "MY_ANTHROPIC_API_KEY" }}'
257+
stackql shell --auth="${AUTH}"
258+
""",
259+
'windows': """
260+
$Auth = "{ 'anthropic': { 'type': 'bearer', 'credentialsenvvar': 'MY_ANTHROPIC_API_KEY' }}"
261+
stackql.exe shell --auth=$Auth
262+
""",
263+
},
264+
#
243265
# OpenAI
244266
#
245267
'openai': {

0 commit comments

Comments
 (0)