Skip to content

Commit

Permalink
Update lib
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions Bot committed May 9, 2024
1 parent 0fcc013 commit a923450
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions lib/experimental_agents/llm_agents/groq_agent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,33 @@ export declare const groqAgent: AgentFunction<{
query?: string;
system?: string;
verbose?: boolean;
tools?: Record<string, Groq.Chat.CompletionCreateParams.ToolChoice>;
tools?: Record<string, Groq.Chat.CompletionCreateParams.Tool>;
temperature?: number;
max_tokens?: number;
tool_choice?: string | Record<string, any>;
}, Record<string, any> | string, string | Array<Groq.Chat.CompletionCreateParams.Message>>;
tool_choice?: string | Record<string, Groq.Chat.CompletionCreateParams.ToolChoice>;
}, Groq.Chat.ChatCompletion, string | Array<Groq.Chat.CompletionCreateParams.Message>>;
declare const groqAgentInfo: {
name: string;
agent: AgentFunction<{
model: string;
query?: string | undefined;
system?: string | undefined;
verbose?: boolean | undefined;
tools?: Record<string, Groq.Chat.Completions.CompletionCreateParams.ToolChoice> | undefined;
tools?: Record<string, Groq.Chat.Completions.CompletionCreateParams.Tool> | undefined;
temperature?: number | undefined;
max_tokens?: number | undefined;
tool_choice?: string | Record<string, any> | undefined;
}, string | Record<string, any>, string | Groq.Chat.Completions.CompletionCreateParams.Message[]>;
tool_choice?: string | Record<string, Groq.Chat.Completions.CompletionCreateParams.ToolChoice> | undefined;
}, Groq.Chat.Completions.ChatCompletion, string | Groq.Chat.Completions.CompletionCreateParams.Message[]>;
mock: AgentFunction<{
model: string;
query?: string | undefined;
system?: string | undefined;
verbose?: boolean | undefined;
tools?: Record<string, Groq.Chat.Completions.CompletionCreateParams.ToolChoice> | undefined;
tools?: Record<string, Groq.Chat.Completions.CompletionCreateParams.Tool> | undefined;
temperature?: number | undefined;
max_tokens?: number | undefined;
tool_choice?: string | Record<string, any> | undefined;
}, string | Record<string, any>, string | Groq.Chat.Completions.CompletionCreateParams.Message[]>;
tool_choice?: string | Record<string, Groq.Chat.Completions.CompletionCreateParams.ToolChoice> | undefined;
}, Groq.Chat.Completions.ChatCompletion, string | Groq.Chat.Completions.CompletionCreateParams.Message[]>;
samples: never[];
description: string;
category: string[];
Expand Down
2 changes: 1 addition & 1 deletion lib/experimental_agents/llm_agents/groq_agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const groqAgent = async ({ params, inputs }) => {
const [input_query, previous_messages] = inputs;
// Notice that we ignore params.system if previous_message exists.
const messages = previous_messages && Array.isArray(previous_messages) ? previous_messages : system ? [{ role: "system", content: system }] : [];
const content = (query ? [query] : []).concat(input_query ? [input_query] : []).join("\n");
const content = (query ? [query] : []).concat(input_query && typeof input_query === "string" ? [input_query] : []).join("\n");
if (content) {
messages.push({
role: "user",
Expand Down

0 comments on commit a923450

Please sign in to comment.