kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
pull/717/head
rodzic
58f923b247
commit
256898d5ec
|
@ -88,6 +88,7 @@ export function registerV1CreateDeployment(
|
||||||
// Used to simplify recreating the demo `@agentic/search` project during
|
// Used to simplify recreating the demo `@agentic/search` project during
|
||||||
// development while we're frequently resetting the database
|
// development while we're frequently resetting the database
|
||||||
const secret =
|
const secret =
|
||||||
|
projectIdentifier === '@dev/search' ||
|
||||||
projectIdentifier === '@agentic/search'
|
projectIdentifier === '@agentic/search'
|
||||||
? env.AGENTIC_SEARCH_PROXY_SECRET
|
? env.AGENTIC_SEARCH_PROXY_SECRET
|
||||||
: await sha256()
|
: await sha256()
|
||||||
|
|
|
@ -67,6 +67,7 @@ export function registerV1CreateProject(
|
||||||
// Used to simplify recreating the demo `@agentic/search` project during
|
// Used to simplify recreating the demo `@agentic/search` project during
|
||||||
// development while we're frequently resetting the database
|
// development while we're frequently resetting the database
|
||||||
const secret =
|
const secret =
|
||||||
|
projectIdentifier === '@dev/search' ||
|
||||||
projectIdentifier === '@agentic/search'
|
projectIdentifier === '@agentic/search'
|
||||||
? env.AGENTIC_SEARCH_PROXY_SECRET
|
? env.AGENTIC_SEARCH_PROXY_SECRET
|
||||||
: await sha256()
|
: await sha256()
|
||||||
|
|
|
@ -76,6 +76,12 @@ export class DurableMcpClientBase extends DurableObject<RawEnv> {
|
||||||
}): Promise<string> {
|
}): Promise<string> {
|
||||||
await this.ensureClientConnection()
|
await this.ensureClientConnection()
|
||||||
|
|
||||||
|
// console.log('DurableMcpClient.callTool', {
|
||||||
|
// name,
|
||||||
|
// args,
|
||||||
|
// metadata
|
||||||
|
// })
|
||||||
|
|
||||||
const toolCallResponse = await this.client!.callTool({
|
const toolCallResponse = await this.client!.callTool({
|
||||||
name,
|
name,
|
||||||
arguments: args,
|
arguments: args,
|
||||||
|
|
|
@ -78,10 +78,12 @@ export default {
|
||||||
parsedEnv.AGENTIC_PROXY_SECRET
|
parsedEnv.AGENTIC_PROXY_SECRET
|
||||||
) {
|
) {
|
||||||
return {
|
return {
|
||||||
content: [],
|
content: [
|
||||||
structuredContent: {
|
{
|
||||||
error: 'Invalid request'
|
type: 'text',
|
||||||
|
text: 'Invalid request: must come from Agentic MCP proxy'
|
||||||
}
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue