Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add input moderation on all chains and all agents #1888

Merged
merged 1 commit into from
Mar 9, 2024

Conversation

ocflowiseai
Copy link
Contributor

@ocflowiseai ocflowiseai commented Mar 6, 2024

Add input moderation on Chains and Agents.

Chains

  • OpenAPI Chain
  • Conversational Retrieval QA Chain
  • Multi Prompt Chain
  • Multi Retrieval QA Chain
  • Retrieval QA Chain
  • Sql Database Chain
  • Vectara QA Chain
  • VectorDB QA Chain

Agents

  • Airtable Agent
  • AutoGPT
  • BabyAGI
  • Conversational Agent
  • Conversational Retrieval Agent
  • CSV Agent
  • ReAct Agent for Chat Models
  • ReAct Agent for LLMs
  • OpenAI Assistant
  • OpenAI Function Agent
  • XML Agent

Relates to: #1646

@ocflowiseai ocflowiseai self-assigned this Mar 6, 2024
input = await checkInputs(moderations, input)
} catch (e) {
await new Promise((resolve) => setTimeout(resolve, 500))
//streamResponse(options.socketIO && options.socketIOClientId, e.message, options.socketIO, options.socketIOClientId)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should Vectara QA Chain have streaming?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not it shouldnt

@HenryHengZJ HenryHengZJ marked this pull request as ready for review March 9, 2024 14:21
@ocflowiseai ocflowiseai force-pushed the feature/add-input-moderation-2-chain-and-agents branch from abfedd8 to 69e082e Compare March 9, 2024 22:22
@ocflowiseai ocflowiseai merged commit 797ee30 into main Mar 9, 2024
2 checks passed
input = await checkInputs(moderations, input)
} catch (e) {
await new Promise((resolve) => setTimeout(resolve, 500))
//streamResponse(options.socketIO && options.socketIOClientId, e.message, options.socketIO, options.socketIOClientId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ocflowiseai we should enable the streamResponse for some of the agents/chains.

For full list of which chains/agents are available for streaming, refer here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing! I will open a separate PR for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants