move the example provider into the crate

This commit is contained in:
Jack Amadeo
2026-06-30 08:49:31 -07:00
parent 971eba2ce1
commit 8ad3ea3ebf
2 changed files with 31 additions and 3 deletions
+30
View File
@@ -0,0 +1,30 @@
{
"name": "deepseek",
"engine": "openai",
"display_name": "DeepSeek",
"description": "Custom DeepSeek provider",
"api_key_env": "DEEPSEEK_API_KEY",
"base_url": "https://api.deepseek.com",
"models": [
{
"name": "deepseek-chat",
"context_limit": 128000,
"input_token_cost": null,
"output_token_cost": null,
"currency": null,
"supports_cache_control": null
},
{
"name": "deepseek-reasoner",
"context_limit": 128000,
"input_token_cost": null,
"output_token_cost": null,
"currency": null,
"supports_cache_control": null
}
],
"headers": null,
"timeout_seconds": null,
"preserves_thinking": true,
"supports_streaming": true
}
+1 -3
View File
@@ -16,8 +16,7 @@ from aaif_goose import ( # noqa: E402
def main() -> None:
provider_json = (HERE.parent.parent.parent / "goose-providers" / "examples" / "deepseek.json").read_text()
provider = DeclarativeProvider.from_json(provider_json)
provider = DeclarativeProvider.from_json((HERE.parent / "deepseek.json").read_text())
model = ProviderModelConfig(model_name="deepseek-v4-flash")
messages = [ProviderMessage(role=MessageRole.USER, text="what is the capital of France?")]
stream = provider.stream(
@@ -26,7 +25,6 @@ def main() -> None:
messages,
)
print(f"{provider.name()}:")
while chunk := stream.next():
if chunk.text:
print(chunk.text, end="")