|
141 | 141 | # Set agent |
142 | 142 | camel_agent = ChatAgent(system_message=sys_msg, model=model) |
143 | 143 |
|
144 | | -user_msg = """Say hi to CAMEL AI, one open-source community dedicated to the |
| 144 | +user_msg = """Say hi to CAMEL AI, one open-source community dedicated to the |
| 145 | + study of autonomous and communicative agents.""" |
| 146 | + |
| 147 | +# Get response information |
| 148 | +response = camel_agent.step(user_msg) |
| 149 | +print(response.msgs[0].content) |
| 150 | +""" |
| 151 | +=============================================================================== |
| 152 | +Hello to CAMEL AI, an open-source community focused on the research of |
| 153 | +autonomous and communicative agents! |
| 154 | +=============================================================================== |
| 155 | +""" |
| 156 | + |
| 157 | +# Example with Magistral Small 1.2 |
| 158 | +model = ModelFactory.create( |
| 159 | + model_platform=ModelPlatformType.MISTRAL, |
| 160 | + model_type=ModelType.MAGISTRAL_SMALL_1_2, |
| 161 | + model_config_dict=MistralConfig(temperature=0.0).as_dict(), |
| 162 | +) |
| 163 | + |
| 164 | +# Define system message |
| 165 | +sys_msg = "You are a helpful assistant." |
| 166 | + |
| 167 | +# Set agent |
| 168 | +camel_agent = ChatAgent(system_message=sys_msg, model=model) |
| 169 | + |
| 170 | +user_msg = """Say hi to CAMEL AI, one open-source community dedicated to the |
| 171 | + study of autonomous and communicative agents.""" |
| 172 | + |
| 173 | +# Get response information |
| 174 | +response = camel_agent.step(user_msg) |
| 175 | +print(response.msgs[0].content) |
| 176 | +""" |
| 177 | +=============================================================================== |
| 178 | +Hello to CAMEL AI, an open-source community focused on the research of |
| 179 | +autonomous and communicative agents! |
| 180 | +=============================================================================== |
| 181 | +""" |
| 182 | + |
| 183 | +# Example with Magistral Medium 1.2 |
| 184 | +model = ModelFactory.create( |
| 185 | + model_platform=ModelPlatformType.MISTRAL, |
| 186 | + model_type=ModelType.MAGISTRAL_MEDIUM_1_2, |
| 187 | + model_config_dict=MistralConfig(temperature=0.0).as_dict(), |
| 188 | +) |
| 189 | + |
| 190 | +# Define system message |
| 191 | +sys_msg = "You are a helpful assistant." |
| 192 | + |
| 193 | +# Set agent |
| 194 | +camel_agent = ChatAgent(system_message=sys_msg, model=model) |
| 195 | + |
| 196 | +user_msg = """Say hi to CAMEL AI, one open-source community dedicated to the |
145 | 197 | study of autonomous and communicative agents.""" |
146 | 198 |
|
147 | 199 | # Get response information |
148 | 200 | response = camel_agent.step(user_msg) |
149 | 201 | print(response.msgs[0].content) |
150 | 202 | """ |
151 | 203 | =============================================================================== |
152 | | -Hello to CAMEL AI, an open-source community focused on the research of |
| 204 | +Hello to CAMEL AI, an open-source community focused on the research of |
153 | 205 | autonomous and communicative agents! |
154 | 206 | =============================================================================== |
155 | 207 | """ |
0 commit comments