Struct claude_flows::ClaudeFlows
source · pub struct ClaudeFlows { /* private fields */ }
Expand description
The main struct for setting the basic configuration for Claude interface.
Implementations§
source§impl ClaudeFlows
impl ClaudeFlows
sourcepub async fn chat_completion(
&self,
conversation_id: &str,
sentence: &str,
options: &ChatOptions<'_>
) -> Result<String, String>
pub async fn chat_completion( &self, conversation_id: &str, sentence: &str, options: &ChatOptions<'_> ) -> Result<String, String>
Create chat completion with the provided sentence. It uses Claude’s completion API to make a conversation.
conversation_id
is the identifier of the conversation.
The history will be fetched and attached to the sentence
as a whole prompt for Claude.
sentence
is a String that reprensents the current utterance of the conversation.
If you haven’t connected your Claude account with Flows.network platform, you will receive an error in the flow’s building log or running log.
source§impl ClaudeFlows
impl ClaudeFlows
pub fn new() -> ClaudeFlows
pub fn set_flows_account(&mut self, account: FlowsAccount)
pub fn set_retry_times(&mut self, retry_times: u8)
Auto Trait Implementations§
impl RefUnwindSafe for ClaudeFlows
impl Send for ClaudeFlows
impl Sync for ClaudeFlows
impl Unpin for ClaudeFlows
impl UnwindSafe for ClaudeFlows
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more