@standardagents/groq 0.0.1-dev.ffffff
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.
- package/README.md +7 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.js +821 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -0
package/README.md
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { LLMProviderInterface, ProviderFactoryConfig, ProviderModelInfo, ModelCapabilities, ProviderRequest, InspectedRequest, ProviderResponse, ProviderStreamChunk, ProviderFactoryWithOptions } from '@standardagents/spec';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
declare const groqProviderOptions: z.ZodObject<{
|
|
5
|
+
citation_options: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
enabled: "enabled";
|
|
7
|
+
disabled: "disabled";
|
|
8
|
+
}>>;
|
|
9
|
+
disable_tool_validation: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
include_reasoning: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
reasoning_effort: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
none: "none";
|
|
13
|
+
default: "default";
|
|
14
|
+
low: "low";
|
|
15
|
+
medium: "medium";
|
|
16
|
+
high: "high";
|
|
17
|
+
}>>;
|
|
18
|
+
reasoning_format: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
hidden: "hidden";
|
|
20
|
+
raw: "raw";
|
|
21
|
+
parsed: "parsed";
|
|
22
|
+
}>>;
|
|
23
|
+
user: z.ZodOptional<z.ZodString>;
|
|
24
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
service_tier: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
auto: "auto";
|
|
27
|
+
on_demand: "on_demand";
|
|
28
|
+
flex: "flex";
|
|
29
|
+
performance: "performance";
|
|
30
|
+
}>>;
|
|
31
|
+
search_settings: z.ZodOptional<z.ZodObject<{
|
|
32
|
+
include_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
|
+
exclude_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
|
+
}, z.core.$loose>>;
|
|
35
|
+
compound_custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
36
|
+
documents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
37
|
+
id: z.ZodOptional<z.ZodString>;
|
|
38
|
+
text: z.ZodOptional<z.ZodString>;
|
|
39
|
+
json: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
40
|
+
}, z.core.$strip>>>;
|
|
41
|
+
}, z.core.$loose>;
|
|
42
|
+
type GroqProviderOptions = z.infer<typeof groqProviderOptions>;
|
|
43
|
+
|
|
44
|
+
declare class GroqProvider implements LLMProviderInterface {
|
|
45
|
+
readonly name = "groq";
|
|
46
|
+
readonly specificationVersion: "1";
|
|
47
|
+
private client;
|
|
48
|
+
private readonly config;
|
|
49
|
+
private static readonly modelsCacheTtl;
|
|
50
|
+
private static modelsCache;
|
|
51
|
+
private static modelsCacheTime;
|
|
52
|
+
constructor(config: ProviderFactoryConfig);
|
|
53
|
+
private getClient;
|
|
54
|
+
supportsModel(_modelId: string): boolean;
|
|
55
|
+
getIcon(modelId?: string): string;
|
|
56
|
+
getModels(filter?: string): Promise<ProviderModelInfo[]>;
|
|
57
|
+
private filterModels;
|
|
58
|
+
getModelCapabilities(modelId: string): Promise<ModelCapabilities | null>;
|
|
59
|
+
private buildChatParams;
|
|
60
|
+
inspectRequest(request: ProviderRequest): Promise<InspectedRequest>;
|
|
61
|
+
generate(request: ProviderRequest): Promise<ProviderResponse>;
|
|
62
|
+
stream(request: ProviderRequest): Promise<AsyncIterable<ProviderStreamChunk>>;
|
|
63
|
+
private toProviderError;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Groq provider factory for Standard Agents.
|
|
68
|
+
*
|
|
69
|
+
* Uses Groq's official `groq-sdk` and Chat Completions API.
|
|
70
|
+
*/
|
|
71
|
+
declare const groq: ProviderFactoryWithOptions<typeof groqProviderOptions>;
|
|
72
|
+
|
|
73
|
+
export { GroqProvider, type GroqProviderOptions, groq, groqProviderOptions };
|