mirror of https://github.com/buster-so/buster.git
snowflake credentials adjustment
This commit is contained in:
parent
fb1a49f498
commit
5b1c903f78
|
@ -102,14 +102,12 @@ export function createDoneToolStart(context: DoneToolContext, doneToolState: Don
|
|||
|
||||
const doneToolResponseEntry = createDoneToolResponseMessage(doneToolState, options.toolCallId);
|
||||
const doneToolMessage = createDoneToolRawLlmMessageEntry(doneToolState, options.toolCallId);
|
||||
|
||||
|
||||
// Create the tool result immediately with success: true
|
||||
// This ensures it's always present even if the stream terminates early
|
||||
const rawToolResultEntry = createRawToolResultEntry(
|
||||
options.toolCallId,
|
||||
DONE_TOOL_NAME,
|
||||
{ success: true }
|
||||
);
|
||||
const rawToolResultEntry = createRawToolResultEntry(options.toolCallId, DONE_TOOL_NAME, {
|
||||
success: true,
|
||||
});
|
||||
|
||||
const entries: UpdateMessageEntriesParams = {
|
||||
messageId: context.messageId,
|
||||
|
@ -126,7 +124,7 @@ export function createDoneToolStart(context: DoneToolContext, doneToolState: Don
|
|||
rawLlmMessages.push(doneToolMessage);
|
||||
}
|
||||
rawLlmMessages.push(rawToolResultEntry);
|
||||
|
||||
|
||||
if (rawLlmMessages.length > 0) {
|
||||
entries.rawLlmMessages = rawLlmMessages;
|
||||
}
|
||||
|
|
|
@ -93,13 +93,22 @@ export class SnowflakeAdapter extends BaseAdapter {
|
|||
|
||||
private async createConnection(credentials: SnowflakeCredentials): Promise<snowflake.Connection> {
|
||||
const connectionOptions: snowflake.ConnectionOptions = {
|
||||
account: credentials.account_id,
|
||||
account: credentials.account_id, // Always required by SDK
|
||||
username: credentials.username,
|
||||
password: credentials.password,
|
||||
warehouse: credentials.warehouse_id,
|
||||
database: credentials.default_database,
|
||||
};
|
||||
|
||||
// Use custom_host if provided via accessUrl
|
||||
if (credentials.custom_host) {
|
||||
// Ensure the URL has proper protocol
|
||||
const host = credentials.custom_host.startsWith('http')
|
||||
? credentials.custom_host
|
||||
: `https://${credentials.custom_host}`;
|
||||
connectionOptions.accessUrl = host;
|
||||
}
|
||||
|
||||
if (credentials.role) {
|
||||
connectionOptions.role = credentials.role;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,9 @@ export interface SnowflakeCredentials {
|
|||
|
||||
/** Default schema to use */
|
||||
default_schema?: string;
|
||||
|
||||
/** Optional custom host for load balancers (e.g., "ridedvp-angel.yukicomputing.com:443") */
|
||||
custom_host?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue