Skip to content

Commit

Permalink
ci: makes the protoc compiler available on github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
marieaurore123 committed Sep 23, 2024
1 parent 9cba7a1 commit e22d778
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,8 @@ jobs:
with:
components: clippy

- name: Install Protoc
uses: arduino/setup-protoc@v3

- name: Run clippy action
uses: clechasseur/rs-clippy-check@v3
16 changes: 8 additions & 8 deletions rig-core/src/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ impl<M: CompletionModel> Completion<M> for Agent<M> {
chat_history: Vec<Message>,
) -> Result<CompletionRequestBuilder<M>, CompletionError> {
let dynamic_context = stream::iter(self.dynamic_context.iter())
.then(|(num_sample, index, search_query)| async {
.then(|(num_sample, index, search_params)| async {
Ok::<_, VectorStoreError>(
index
.top_n_from_query(prompt, *num_sample, search_query)
.top_n_from_query(prompt, *num_sample, search_params)
.await?
.into_iter()
.map(|(_, doc)| {
Expand All @@ -195,10 +195,10 @@ impl<M: CompletionModel> Completion<M> for Agent<M> {
.map_err(|e| CompletionError::RequestError(Box::new(e)))?;

let dynamic_tools = stream::iter(self.dynamic_tools.iter())
.then(|(num_sample, index, search_query)| async {
.then(|(num_sample, index, search_params)| async {
Ok::<_, VectorStoreError>(
index
.top_n_ids_from_query(prompt, *num_sample, search_query)
.top_n_ids_from_query(prompt, *num_sample, search_params)
.await?
.into_iter()
.map(|(_, doc)| doc)
Expand Down Expand Up @@ -360,10 +360,10 @@ impl<M: CompletionModel> AgentBuilder<M> {
mut self,
sample: usize,
dynamic_context: impl VectorStoreIndexDyn + 'static,
params: String,
search_params: String,
) -> Self {
self.dynamic_context
.push((sample, Box::new(dynamic_context), params));
.push((sample, Box::new(dynamic_context), search_params));
self
}

Expand All @@ -374,10 +374,10 @@ impl<M: CompletionModel> AgentBuilder<M> {
sample: usize,
dynamic_tools: impl VectorStoreIndexDyn + 'static,
toolset: ToolSet,
params: String,
search_params: String,
) -> Self {
self.dynamic_tools
.push((sample, Box::new(dynamic_tools), params));
.push((sample, Box::new(dynamic_tools), search_params));
self.tools.add_tools(toolset);
self
}
Expand Down

0 comments on commit e22d778

Please sign in to comment.