diff --git a/.gitignore b/.gitignore index 947b99b7b..838419e3b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,5 @@ crew_tasks_output.json .mypy_cache .ruff_cache .venv -agentops.log \ No newline at end of file +agentops.log +test_flow.html \ No newline at end of file diff --git a/src/crewai/agents/agent_builder/base_agent_executor_mixin.py b/src/crewai/agents/agent_builder/base_agent_executor_mixin.py index 924cef71c..e7917f2bd 100644 --- a/src/crewai/agents/agent_builder/base_agent_executor_mixin.py +++ b/src/crewai/agents/agent_builder/base_agent_executor_mixin.py @@ -114,10 +114,15 @@ class CrewAgentExecutorMixin: prompt = ( "\n\n=====\n" "## HUMAN FEEDBACK: Provide feedback on the Final Result and Agent's actions.\n" - "Respond with 'looks good' to accept or provide specific improvement requests.\n" - "You can provide multiple rounds of feedback until satisfied.\n" + "Please follow these guidelines:\n" + " - If you are happy with the result, simply hit Enter without typing anything.\n" + " - Otherwise, provide specific improvement requests.\n" + " - You can provide multiple rounds of feedback until satisfied.\n" "=====\n" ) self._printer.print(content=prompt, color="bold_yellow") - return input() + response = input() + if response.strip() != "": + self._printer.print(content="\nProcessing your feedback...", color="cyan") + return response diff --git a/src/crewai/agents/agent_builder/utilities/base_output_converter.py b/src/crewai/agents/agent_builder/utilities/base_output_converter.py index 454edc5f3..938a6b29a 100644 --- a/src/crewai/agents/agent_builder/utilities/base_output_converter.py +++ b/src/crewai/agents/agent_builder/utilities/base_output_converter.py @@ -31,11 +31,11 @@ class OutputConverter(BaseModel, ABC): ) @abstractmethod - def to_pydantic(self, current_attempt=1): + def to_pydantic(self, current_attempt=1) -> BaseModel: """Convert text to pydantic.""" pass @abstractmethod - def to_json(self, current_attempt=1): + def to_json(self, current_attempt=1) -> dict: """Convert text to json.""" pass diff --git a/src/crewai/agents/crew_agent_executor.py b/src/crewai/agents/crew_agent_executor.py index 6d34fea4e..452b343c8 100644 --- a/src/crewai/agents/crew_agent_executor.py +++ b/src/crewai/agents/crew_agent_executor.py @@ -548,10 +548,6 @@ class CrewAgentExecutor(CrewAgentExecutorMixin): self, initial_answer: AgentFinish, feedback: str ) -> AgentFinish: """Process feedback for training scenarios with single iteration.""" - self._printer.print( - content="\nProcessing training feedback.\n", - color="yellow", - ) self._handle_crew_training_output(initial_answer, feedback) self.messages.append( self._format_msg( @@ -571,9 +567,8 @@ class CrewAgentExecutor(CrewAgentExecutorMixin): answer = current_answer while self.ask_for_human_input: - response = self._get_llm_feedback_response(feedback) - - if not self._feedback_requires_changes(response): + # If the user provides a blank response, assume they are happy with the result + if feedback.strip() == "": self.ask_for_human_input = False else: answer = self._process_feedback_iteration(feedback) @@ -581,27 +576,6 @@ class CrewAgentExecutor(CrewAgentExecutorMixin): return answer - def _get_llm_feedback_response(self, feedback: str) -> Optional[str]: - """Get LLM classification of whether feedback requires changes.""" - prompt = self._i18n.slice("human_feedback_classification").format( - feedback=feedback - ) - message = self._format_msg(prompt, role="system") - - for retry in range(MAX_LLM_RETRY): - try: - response = self.llm.call([message], callbacks=self.callbacks) - return response.strip().lower() if response else None - except Exception as error: - self._log_feedback_error(retry, error) - - self._log_max_retries_exceeded() - return None - - def _feedback_requires_changes(self, response: Optional[str]) -> bool: - """Determine if feedback response indicates need for changes.""" - return response == "true" if response else False - def _process_feedback_iteration(self, feedback: str) -> AgentFinish: """Process a single feedback iteration.""" self.messages.append( diff --git a/src/crewai/llm.py b/src/crewai/llm.py index 2d8a08228..aac1af3b7 100644 --- a/src/crewai/llm.py +++ b/src/crewai/llm.py @@ -26,9 +26,9 @@ from crewai.utilities.events.tool_usage_events import ToolExecutionErrorEvent with warnings.catch_warnings(): warnings.simplefilter("ignore", UserWarning) import litellm - from litellm import Choices, get_supported_openai_params + from litellm import Choices from litellm.types.utils import ModelResponse - from litellm.utils import supports_response_schema + from litellm.utils import get_supported_openai_params, supports_response_schema from crewai.traces.unified_trace_controller import trace_llm_call @@ -449,7 +449,7 @@ class LLM: def supports_function_calling(self) -> bool: try: params = get_supported_openai_params(model=self.model) - return "response_format" in params + return params is not None and "tools" in params except Exception as e: logging.error(f"Failed to get supported params: {str(e)}") return False @@ -457,7 +457,7 @@ class LLM: def supports_stop_words(self) -> bool: try: params = get_supported_openai_params(model=self.model) - return "stop" in params + return params is not None and "stop" in params except Exception as e: logging.error(f"Failed to get supported params: {str(e)}") return False diff --git a/src/crewai/translations/en.json b/src/crewai/translations/en.json index f09f1dba0..4c28fc5d5 100644 --- a/src/crewai/translations/en.json +++ b/src/crewai/translations/en.json @@ -23,7 +23,6 @@ "summary": "This is a summary of our conversation so far:\n{merged_summary}", "manager_request": "Your best answer to your coworker asking you this, accounting for the context shared.", "formatted_task_instructions": "Ensure your final answer contains only the content in the following format: {output_format}\n\nEnsure the final output does not include any code block markers like ```json or ```python.", - "human_feedback_classification": "Determine if the following feedback indicates that the user is satisfied or if further changes are needed. Respond with 'True' if further changes are needed, or 'False' if the user is satisfied. **Important** Do not include any additional commentary outside of your 'True' or 'False' response.\n\nFeedback: \"{feedback}\"", "conversation_history_instruction": "You are a member of a crew collaborating to achieve a common goal. Your task is a specific action that contributes to this larger objective. For additional context, please review the conversation history between you and the user that led to the initiation of this crew. Use any relevant information or feedback from the conversation to inform your task execution and ensure your response aligns with both the immediate task and the crew's overall goals.", "feedback_instructions": "User feedback: {feedback}\nInstructions: Use this feedback to enhance the next output iteration.\nNote: Do not respond or add commentary." }, diff --git a/src/crewai/utilities/converter.py b/src/crewai/utilities/converter.py index 5a797d8a9..991185f4a 100644 --- a/src/crewai/utilities/converter.py +++ b/src/crewai/utilities/converter.py @@ -20,11 +20,11 @@ class ConverterError(Exception): class Converter(OutputConverter): """Class that converts text into either pydantic or json.""" - def to_pydantic(self, current_attempt=1): + def to_pydantic(self, current_attempt=1) -> BaseModel: """Convert text to pydantic.""" try: if self.llm.supports_function_calling(): - return self._create_instructor().to_pydantic() + result = self._create_instructor().to_pydantic() else: response = self.llm.call( [ @@ -32,18 +32,40 @@ class Converter(OutputConverter): {"role": "user", "content": self.text}, ] ) - return self.model.model_validate_json(response) + try: + # Try to directly validate the response JSON + result = self.model.model_validate_json(response) + except ValidationError: + # If direct validation fails, attempt to extract valid JSON + result = handle_partial_json(response, self.model, False, None) + # Ensure result is a BaseModel instance + if not isinstance(result, BaseModel): + if isinstance(result, dict): + result = self.model.parse_obj(result) + elif isinstance(result, str): + try: + parsed = json.loads(result) + result = self.model.parse_obj(parsed) + except Exception as parse_err: + raise ConverterError( + f"Failed to convert partial JSON result into Pydantic: {parse_err}" + ) + else: + raise ConverterError( + "handle_partial_json returned an unexpected type." + ) + return result except ValidationError as e: if current_attempt < self.max_attempts: return self.to_pydantic(current_attempt + 1) raise ConverterError( - f"Failed to convert text into a Pydantic model due to the following validation error: {e}" + f"Failed to convert text into a Pydantic model due to validation error: {e}" ) except Exception as e: if current_attempt < self.max_attempts: return self.to_pydantic(current_attempt + 1) raise ConverterError( - f"Failed to convert text into a Pydantic model due to the following error: {e}" + f"Failed to convert text into a Pydantic model due to error: {e}" ) def to_json(self, current_attempt=1): @@ -197,11 +219,15 @@ def get_conversion_instructions(model: Type[BaseModel], llm: Any) -> str: if llm.supports_function_calling(): model_schema = PydanticSchemaParser(model=model).get_schema() instructions += ( - f"\n\nThe JSON should follow this schema:\n```json\n{model_schema}\n```" + f"\n\nOutput ONLY the valid JSON and nothing else.\n\n" + f"The JSON must follow this schema exactly:\n```json\n{model_schema}\n```" ) else: model_description = generate_model_description(model) - instructions += f"\n\nThe JSON should follow this format:\n{model_description}" + instructions += ( + f"\n\nOutput ONLY the valid JSON and nothing else.\n\n" + f"The JSON must follow this format exactly:\n{model_description}" + ) return instructions diff --git a/tests/agent_test.py b/tests/agent_test.py index 3547398e5..1d07da23e 100644 --- a/tests/agent_test.py +++ b/tests/agent_test.py @@ -1,7 +1,6 @@ """Test Agent creation and execution basic functionality.""" import os -from datetime import UTC, datetime, timezone from unittest import mock from unittest.mock import patch @@ -9,7 +8,7 @@ import pytest from crewai import Agent, Crew, Task from crewai.agents.cache import CacheHandler -from crewai.agents.crew_agent_executor import CrewAgentExecutor +from crewai.agents.crew_agent_executor import AgentFinish, CrewAgentExecutor from crewai.agents.parser import AgentAction, CrewAgentParser, OutputParserException from crewai.knowledge.source.base_knowledge_source import BaseKnowledgeSource from crewai.knowledge.source.string_knowledge_source import StringKnowledgeSource @@ -999,23 +998,35 @@ def test_agent_human_input(): # Side effect function for _ask_human_input to simulate multiple feedback iterations feedback_responses = iter( [ - "Don't say hi, say Hello instead!", # First feedback - "looks good", # Second feedback to exit loop + "Don't say hi, say Hello instead!", # First feedback: instruct change + "", # Second feedback: empty string signals acceptance ] ) def ask_human_input_side_effect(*args, **kwargs): return next(feedback_responses) - with patch.object( - CrewAgentExecutor, "_ask_human_input", side_effect=ask_human_input_side_effect - ) as mock_human_input: + # Patch both _ask_human_input and _invoke_loop to avoid real API/network calls. + with ( + patch.object( + CrewAgentExecutor, + "_ask_human_input", + side_effect=ask_human_input_side_effect, + ) as mock_human_input, + patch.object( + CrewAgentExecutor, + "_invoke_loop", + return_value=AgentFinish(output="Hello", thought="", text=""), + ) as mock_invoke_loop, + ): # Execute the task output = agent.execute_task(task) - # Assertions to ensure the agent behaves correctly - assert mock_human_input.call_count == 2 # Should have asked for feedback twice - assert output.strip().lower() == "hello" # Final output should be 'Hello' + # Assertions to ensure the agent behaves correctly. + # It should have requested feedback twice. + assert mock_human_input.call_count == 2 + # The final result should be processed to "Hello" + assert output.strip().lower() == "hello" def test_interpolate_inputs(): diff --git a/tests/cassettes/test_agent_human_input.yaml b/tests/cassettes/test_agent_human_input.yaml deleted file mode 100644 index 8c5fd3a80..000000000 --- a/tests/cassettes/test_agent_human_input.yaml +++ /dev/null @@ -1,520 +0,0 @@ -interactions: -- request: - body: !!binary | - CqcXCiQKIgoMc2VydmljZS5uYW1lEhIKEGNyZXdBSS10ZWxlbWV0cnkS/hYKEgoQY3Jld2FpLnRl - bGVtZXRyeRJ5ChBuJJtOdNaB05mOW/p3915eEgj2tkAd3rZcASoQVG9vbCBVc2FnZSBFcnJvcjAB - OYa7/URvKBUYQUpcFEVvKBUYShoKDmNyZXdhaV92ZXJzaW9uEggKBjAuODYuMEoPCgNsbG0SCAoG - Z3B0LTRvegIYAYUBAAEAABLJBwoQifhX01E5i+5laGdALAlZBBIIBuGM1aN+OPgqDENyZXcgQ3Jl - YXRlZDABORVGruBvKBUYQaipwOBvKBUYShoKDmNyZXdhaV92ZXJzaW9uEggKBjAuODYuMEoaCg5w - eXRob25fdmVyc2lvbhIICgYzLjEyLjdKLgoIY3Jld19rZXkSIgogN2U2NjA4OTg5ODU5YTY3ZWVj - ODhlZWY3ZmNlODUyMjVKMQoHY3Jld19pZBImCiRiOThiNWEwMC01YTI1LTQxMDctYjQwNS1hYmYz - MjBhOGYzYThKHAoMY3Jld19wcm9jZXNzEgwKCnNlcXVlbnRpYWxKEQoLY3Jld19tZW1vcnkSAhAA - ShoKFGNyZXdfbnVtYmVyX29mX3Rhc2tzEgIYAUobChVjcmV3X251bWJlcl9vZl9hZ2VudHMSAhgB - SuQCCgtjcmV3X2FnZW50cxLUAgrRAlt7ImtleSI6ICIyMmFjZDYxMWU0NGVmNWZhYzA1YjUzM2Q3 - NWU4ODkzYiIsICJpZCI6ICJkNWIyMzM1YS0yMmIyLTQyZWEtYmYwNS03OTc3NmU3MmYzOTIiLCAi - cm9sZSI6ICJEYXRhIFNjaWVudGlzdCIsICJ2ZXJib3NlPyI6IGZhbHNlLCAibWF4X2l0ZXIiOiAy - MCwgIm1heF9ycG0iOiBudWxsLCAiZnVuY3Rpb25fY2FsbGluZ19sbG0iOiAiIiwgImxsbSI6ICJn - cHQtNG8tbWluaSIsICJkZWxlZ2F0aW9uX2VuYWJsZWQ/IjogZmFsc2UsICJhbGxvd19jb2RlX2V4 - ZWN1dGlvbj8iOiBmYWxzZSwgIm1heF9yZXRyeV9saW1pdCI6IDIsICJ0b29sc19uYW1lcyI6IFsi - Z2V0IGdyZWV0aW5ncyJdfV1KkgIKCmNyZXdfdGFza3MSgwIKgAJbeyJrZXkiOiAiYTI3N2IzNGIy - YzE0NmYwYzU2YzVlMTM1NmU4ZjhhNTciLCAiaWQiOiAiMjJiZWMyMzEtY2QyMS00YzU4LTgyN2Ut - MDU4MWE4ZjBjMTExIiwgImFzeW5jX2V4ZWN1dGlvbj8iOiBmYWxzZSwgImh1bWFuX2lucHV0PyI6 - IGZhbHNlLCAiYWdlbnRfcm9sZSI6ICJEYXRhIFNjaWVudGlzdCIsICJhZ2VudF9rZXkiOiAiMjJh - Y2Q2MTFlNDRlZjVmYWMwNWI1MzNkNzVlODg5M2IiLCAidG9vbHNfbmFtZXMiOiBbImdldCBncmVl - dGluZ3MiXX1degIYAYUBAAEAABKOAgoQ5WYoxRtTyPjge4BduhL0rRIIv2U6rvWALfwqDFRhc2sg - Q3JlYXRlZDABOX068uBvKBUYQZkv8+BvKBUYSi4KCGNyZXdfa2V5EiIKIDdlNjYwODk4OTg1OWE2 - N2VlYzg4ZWVmN2ZjZTg1MjI1SjEKB2NyZXdfaWQSJgokYjk4YjVhMDAtNWEyNS00MTA3LWI0MDUt - YWJmMzIwYThmM2E4Si4KCHRhc2tfa2V5EiIKIGEyNzdiMzRiMmMxNDZmMGM1NmM1ZTEzNTZlOGY4 - YTU3SjEKB3Rhc2tfaWQSJgokMjJiZWMyMzEtY2QyMS00YzU4LTgyN2UtMDU4MWE4ZjBjMTExegIY - AYUBAAEAABKQAQoQXyeDtJDFnyp2Fjk9YEGTpxIIaNE7gbhPNYcqClRvb2wgVXNhZ2UwATkaXTvj - bygVGEGvx0rjbygVGEoaCg5jcmV3YWlfdmVyc2lvbhIICgYwLjg2LjBKHAoJdG9vbF9uYW1lEg8K - DUdldCBHcmVldGluZ3NKDgoIYXR0ZW1wdHMSAhgBegIYAYUBAAEAABLVBwoQMWfznt0qwauEzl7T - UOQxRBII9q+pUS5EdLAqDENyZXcgQ3JlYXRlZDABORONPORvKBUYQSAoS+RvKBUYShoKDmNyZXdh - aV92ZXJzaW9uEggKBjAuODYuMEoaCg5weXRob25fdmVyc2lvbhIICgYzLjEyLjdKLgoIY3Jld19r - ZXkSIgogYzMwNzYwMDkzMjY3NjE0NDRkNTdjNzFkMWRhM2YyN2NKMQoHY3Jld19pZBImCiQ3OTQw - MTkyNS1iOGU5LTQ3MDgtODUzMC00NDhhZmEzYmY4YjBKHAoMY3Jld19wcm9jZXNzEgwKCnNlcXVl - bnRpYWxKEQoLY3Jld19tZW1vcnkSAhAAShoKFGNyZXdfbnVtYmVyX29mX3Rhc2tzEgIYAUobChVj - cmV3X251bWJlcl9vZl9hZ2VudHMSAhgBSuoCCgtjcmV3X2FnZW50cxLaAgrXAlt7ImtleSI6ICI5 - OGYzYjFkNDdjZTk2OWNmMDU3NzI3Yjc4NDE0MjVjZCIsICJpZCI6ICI5OTJkZjYyZi1kY2FiLTQy - OTUtOTIwNi05MDBkNDExNGIxZTkiLCAicm9sZSI6ICJGcmllbmRseSBOZWlnaGJvciIsICJ2ZXJi - b3NlPyI6IGZhbHNlLCAibWF4X2l0ZXIiOiAyMCwgIm1heF9ycG0iOiBudWxsLCAiZnVuY3Rpb25f - Y2FsbGluZ19sbG0iOiAiIiwgImxsbSI6ICJncHQtNG8tbWluaSIsICJkZWxlZ2F0aW9uX2VuYWJs - ZWQ/IjogZmFsc2UsICJhbGxvd19jb2RlX2V4ZWN1dGlvbj8iOiBmYWxzZSwgIm1heF9yZXRyeV9s - aW1pdCI6IDIsICJ0b29sc19uYW1lcyI6IFsiZGVjaWRlIGdyZWV0aW5ncyJdfV1KmAIKCmNyZXdf - dGFza3MSiQIKhgJbeyJrZXkiOiAiODBkN2JjZDQ5MDk5MjkwMDgzODMyZjBlOTgzMzgwZGYiLCAi - aWQiOiAiMmZmNjE5N2UtYmEyNy00YjczLWI0YTctNGZhMDQ4ZTYyYjQ3IiwgImFzeW5jX2V4ZWN1 - dGlvbj8iOiBmYWxzZSwgImh1bWFuX2lucHV0PyI6IGZhbHNlLCAiYWdlbnRfcm9sZSI6ICJGcmll - bmRseSBOZWlnaGJvciIsICJhZ2VudF9rZXkiOiAiOThmM2IxZDQ3Y2U5NjljZjA1NzcyN2I3ODQx - NDI1Y2QiLCAidG9vbHNfbmFtZXMiOiBbImRlY2lkZSBncmVldGluZ3MiXX1degIYAYUBAAEAABKO - AgoQnjTp5boK7/+DQxztYIpqihIIgGnMUkBtzHEqDFRhc2sgQ3JlYXRlZDABOcpYcuRvKBUYQalE - c+RvKBUYSi4KCGNyZXdfa2V5EiIKIGMzMDc2MDA5MzI2NzYxNDQ0ZDU3YzcxZDFkYTNmMjdjSjEK - B2NyZXdfaWQSJgokNzk0MDE5MjUtYjhlOS00NzA4LTg1MzAtNDQ4YWZhM2JmOGIwSi4KCHRhc2tf - a2V5EiIKIDgwZDdiY2Q0OTA5OTI5MDA4MzgzMmYwZTk4MzM4MGRmSjEKB3Rhc2tfaWQSJgokMmZm - NjE5N2UtYmEyNy00YjczLWI0YTctNGZhMDQ4ZTYyYjQ3egIYAYUBAAEAABKTAQoQ26H9pLUgswDN - p9XhJwwL6BIIx3bw7mAvPYwqClRvb2wgVXNhZ2UwATmy7NPlbygVGEEvb+HlbygVGEoaCg5jcmV3 - YWlfdmVyc2lvbhIICgYwLjg2LjBKHwoJdG9vbF9uYW1lEhIKEERlY2lkZSBHcmVldGluZ3NKDgoI - YXR0ZW1wdHMSAhgBegIYAYUBAAEAAA== - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '2986' - Content-Type: - - application/x-protobuf - User-Agent: - - OTel-OTLP-Exporter-Python/1.27.0 - method: POST - uri: https://telemetry.crewai.com:4319/v1/traces - response: - body: - string: "\n\0" - headers: - Content-Length: - - '2' - Content-Type: - - application/x-protobuf - Date: - - Fri, 27 Dec 2024 22:14:53 GMT - status: - code: 200 - message: OK -- request: - body: '{"messages": [{"role": "system", "content": "You are test role. test backstory\nYour - personal goal is: test goal\nTo give my best complete final answer to the task - use the exact following format:\n\nThought: I now can give a great answer\nFinal - Answer: Your final answer must be the great and the most complete as possible, - it must be outcome described.\n\nI MUST use these formats, my job depends on - it!"}, {"role": "user", "content": "\nCurrent Task: Say the word: Hi\n\nThis - is the expect criteria for your final answer: The word: Hi\nyou MUST return - the actual complete content as the final answer, not a summary.\n\nBegin! This - is VERY important to you, use the tools available and give your best Final Answer, - your job depends on it!\n\nThought:"}], "model": "gpt-4o-mini", "stop": ["\nObservation:"], - "stream": false}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '824' - content-type: - - application/json - cookie: - - _cfuvid=ePJSDFdHag2D8lj21_ijAMWjoA6xfnPNxN4uekvC728-1727226247743-0.0.1.1-604800000 - host: - - api.openai.com - user-agent: - - OpenAI/Python 1.52.1 - x-stainless-arch: - - x64 - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - Linux - x-stainless-package-version: - - 1.52.1 - x-stainless-raw-response: - - 'true' - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.12.7 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - content: "{\n \"id\": \"chatcmpl-AjCtZLLrWi8ZASpP9bz6HaCV7xBIn\",\n \"object\": - \"chat.completion\",\n \"created\": 1735337693,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"I now can give a great answer \\nFinal - Answer: Hi\",\n \"refusal\": null\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 158,\n \"completion_tokens\": 12,\n \"total_tokens\": 170,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0aa8d3e20b\"\n}\n" - headers: - CF-Cache-Status: - - DYNAMIC - CF-RAY: - - 8f8caa83deca756b-SEA - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 27 Dec 2024 22:14:53 GMT - Server: - - cloudflare - Set-Cookie: - - __cf_bm=wJkq_yLkzE3OdxE0aMJz.G0kce969.9JxRmZ0ratl4c-1735337693-1.0.1.1-OKpUoRrSPFGvWv5Hp5ET1PNZ7iZNHPKEAuakpcQUxxPSeisUIIR3qIOZ31MGmYugqB5.wkvidgbxOAagqJvmnw; - path=/; expires=Fri, 27-Dec-24 22:44:53 GMT; domain=.api.openai.com; HttpOnly; - Secure; SameSite=None - - _cfuvid=A_ASCLNAVfQoyucWOAIhecWtEpNotYoZr0bAFihgNxs-1735337693273-0.0.1.1-604800000; - path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - access-control-expose-headers: - - X-Request-ID - alt-svc: - - h3=":443"; ma=86400 - openai-organization: - - crewai-iuxna1 - openai-processing-ms: - - '404' - openai-version: - - '2020-10-01' - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-ratelimit-limit-requests: - - '30000' - x-ratelimit-limit-tokens: - - '150000000' - x-ratelimit-remaining-requests: - - '29999' - x-ratelimit-remaining-tokens: - - '149999816' - x-ratelimit-reset-requests: - - 2ms - x-ratelimit-reset-tokens: - - 0s - x-request-id: - - req_6ac84634bff9193743c4b0911c09b4a6 - http_version: HTTP/1.1 - status_code: 200 -- request: - body: '{"messages": [{"role": "system", "content": "Determine if the following - feedback indicates that the user is satisfied or if further changes are needed. - Respond with ''True'' if further changes are needed, or ''False'' if the user - is satisfied. **Important** Do not include any additional commentary outside - of your ''True'' or ''False'' response.\n\nFeedback: \"Don''t say hi, say Hello - instead!\""}], "model": "gpt-4o-mini", "stop": ["\nObservation:"], "stream": - false}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '461' - content-type: - - application/json - cookie: - - _cfuvid=A_ASCLNAVfQoyucWOAIhecWtEpNotYoZr0bAFihgNxs-1735337693273-0.0.1.1-604800000; - __cf_bm=wJkq_yLkzE3OdxE0aMJz.G0kce969.9JxRmZ0ratl4c-1735337693-1.0.1.1-OKpUoRrSPFGvWv5Hp5ET1PNZ7iZNHPKEAuakpcQUxxPSeisUIIR3qIOZ31MGmYugqB5.wkvidgbxOAagqJvmnw - host: - - api.openai.com - user-agent: - - OpenAI/Python 1.52.1 - x-stainless-arch: - - x64 - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - Linux - x-stainless-package-version: - - 1.52.1 - x-stainless-raw-response: - - 'true' - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.12.7 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - content: "{\n \"id\": \"chatcmpl-AjCtZNlWdrrPZhq0MJDqd16sMuQEJ\",\n \"object\": - \"chat.completion\",\n \"created\": 1735337693,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"True\",\n \"refusal\": null\n - \ },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n - \ ],\n \"usage\": {\n \"prompt_tokens\": 78,\n \"completion_tokens\": - 1,\n \"total_tokens\": 79,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n - \ \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0aa8d3e20b\"\n}\n" - headers: - CF-Cache-Status: - - DYNAMIC - CF-RAY: - - 8f8caa87094f756b-SEA - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 27 Dec 2024 22:14:53 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - access-control-expose-headers: - - X-Request-ID - alt-svc: - - h3=":443"; ma=86400 - openai-organization: - - crewai-iuxna1 - openai-processing-ms: - - '156' - openai-version: - - '2020-10-01' - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-ratelimit-limit-requests: - - '30000' - x-ratelimit-limit-tokens: - - '150000000' - x-ratelimit-remaining-requests: - - '29999' - x-ratelimit-remaining-tokens: - - '149999898' - x-ratelimit-reset-requests: - - 2ms - x-ratelimit-reset-tokens: - - 0s - x-request-id: - - req_ec74bef2a9ef7b2144c03fd7f7bbeab0 - http_version: HTTP/1.1 - status_code: 200 -- request: - body: '{"messages": [{"role": "system", "content": "You are test role. test backstory\nYour - personal goal is: test goal\nTo give my best complete final answer to the task - use the exact following format:\n\nThought: I now can give a great answer\nFinal - Answer: Your final answer must be the great and the most complete as possible, - it must be outcome described.\n\nI MUST use these formats, my job depends on - it!"}, {"role": "user", "content": "\nCurrent Task: Say the word: Hi\n\nThis - is the expect criteria for your final answer: The word: Hi\nyou MUST return - the actual complete content as the final answer, not a summary.\n\nBegin! This - is VERY important to you, use the tools available and give your best Final Answer, - your job depends on it!\n\nThought:"}, {"role": "assistant", "content": "I now - can give a great answer \nFinal Answer: Hi"}, {"role": "user", "content": "Feedback: - Don''t say hi, say Hello instead!"}], "model": "gpt-4o-mini", "stop": ["\nObservation:"], - "stream": false}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '986' - content-type: - - application/json - cookie: - - _cfuvid=A_ASCLNAVfQoyucWOAIhecWtEpNotYoZr0bAFihgNxs-1735337693273-0.0.1.1-604800000; - __cf_bm=wJkq_yLkzE3OdxE0aMJz.G0kce969.9JxRmZ0ratl4c-1735337693-1.0.1.1-OKpUoRrSPFGvWv5Hp5ET1PNZ7iZNHPKEAuakpcQUxxPSeisUIIR3qIOZ31MGmYugqB5.wkvidgbxOAagqJvmnw - host: - - api.openai.com - user-agent: - - OpenAI/Python 1.52.1 - x-stainless-arch: - - x64 - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - Linux - x-stainless-package-version: - - 1.52.1 - x-stainless-raw-response: - - 'true' - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.12.7 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - content: "{\n \"id\": \"chatcmpl-AjCtZGv4f3h7GDdhyOy9G0sB1lRgC\",\n \"object\": - \"chat.completion\",\n \"created\": 1735337693,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Thought: I understand the feedback and - will adjust my response accordingly. \\nFinal Answer: Hello\",\n \"refusal\": - null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 188,\n \"completion_tokens\": - 18,\n \"total_tokens\": 206,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n - \ \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0aa8d3e20b\"\n}\n" - headers: - CF-Cache-Status: - - DYNAMIC - CF-RAY: - - 8f8caa88cac4756b-SEA - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 27 Dec 2024 22:14:54 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - access-control-expose-headers: - - X-Request-ID - alt-svc: - - h3=":443"; ma=86400 - openai-organization: - - crewai-iuxna1 - openai-processing-ms: - - '358' - openai-version: - - '2020-10-01' - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-ratelimit-limit-requests: - - '30000' - x-ratelimit-limit-tokens: - - '150000000' - x-ratelimit-remaining-requests: - - '29999' - x-ratelimit-remaining-tokens: - - '149999793' - x-ratelimit-reset-requests: - - 2ms - x-ratelimit-reset-tokens: - - 0s - x-request-id: - - req_ae1ab6b206d28ded6fee3c83ed0c2ab7 - http_version: HTTP/1.1 - status_code: 200 -- request: - body: '{"messages": [{"role": "system", "content": "Determine if the following - feedback indicates that the user is satisfied or if further changes are needed. - Respond with ''True'' if further changes are needed, or ''False'' if the user - is satisfied. **Important** Do not include any additional commentary outside - of your ''True'' or ''False'' response.\n\nFeedback: \"looks good\""}], "model": - "gpt-4o-mini", "stop": ["\nObservation:"], "stream": false}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '439' - content-type: - - application/json - cookie: - - _cfuvid=A_ASCLNAVfQoyucWOAIhecWtEpNotYoZr0bAFihgNxs-1735337693273-0.0.1.1-604800000; - __cf_bm=wJkq_yLkzE3OdxE0aMJz.G0kce969.9JxRmZ0ratl4c-1735337693-1.0.1.1-OKpUoRrSPFGvWv5Hp5ET1PNZ7iZNHPKEAuakpcQUxxPSeisUIIR3qIOZ31MGmYugqB5.wkvidgbxOAagqJvmnw - host: - - api.openai.com - user-agent: - - OpenAI/Python 1.52.1 - x-stainless-arch: - - x64 - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - Linux - x-stainless-package-version: - - 1.52.1 - x-stainless-raw-response: - - 'true' - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.12.7 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - content: "{\n \"id\": \"chatcmpl-AjCtaiHL4TY8Dssk0j2miqmjrzquy\",\n \"object\": - \"chat.completion\",\n \"created\": 1735337694,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"False\",\n \"refusal\": null\n - \ },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n - \ ],\n \"usage\": {\n \"prompt_tokens\": 73,\n \"completion_tokens\": - 1,\n \"total_tokens\": 74,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n - \ \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0aa8d3e20b\"\n}\n" - headers: - CF-Cache-Status: - - DYNAMIC - CF-RAY: - - 8f8caa8bdd26756b-SEA - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 27 Dec 2024 22:14:54 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - access-control-expose-headers: - - X-Request-ID - alt-svc: - - h3=":443"; ma=86400 - openai-organization: - - crewai-iuxna1 - openai-processing-ms: - - '184' - openai-version: - - '2020-10-01' - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-ratelimit-limit-requests: - - '30000' - x-ratelimit-limit-tokens: - - '150000000' - x-ratelimit-remaining-requests: - - '29999' - x-ratelimit-remaining-tokens: - - '149999902' - x-ratelimit-reset-requests: - - 2ms - x-ratelimit-reset-tokens: - - 0s - x-request-id: - - req_652891f79c1104a7a8436275d78a69f1 - http_version: HTTP/1.1 - status_code: 200 -version: 1 diff --git a/tests/utilities/cassettes/test_converter_with_llama3_1_model.yaml b/tests/utilities/cassettes/test_converter_with_llama3_1_model.yaml index ca597b3ed..c63e006d9 100644 --- a/tests/utilities/cassettes/test_converter_with_llama3_1_model.yaml +++ b/tests/utilities/cassettes/test_converter_with_llama3_1_model.yaml @@ -1,14 +1,6 @@ interactions: - request: - body: '{"model": "llama3.1", "prompt": "### User:\nName: Alice Llama, Age: 30\n\n### - System:\nProduce JSON OUTPUT ONLY! Adhere to this format {\"name\": \"function_name\", - \"arguments\":{\"argument_name\": \"argument_value\"}} The following functions - are available to you:\n{''type'': ''function'', ''function'': {''name'': ''SimpleModel'', - ''description'': ''Correctly extracted `SimpleModel` with all the required parameters - with correct types'', ''parameters'': {''properties'': {''name'': {''title'': - ''Name'', ''type'': ''string''}, ''age'': {''title'': ''Age'', ''type'': ''integer''}}, - ''required'': [''age'', ''name''], ''type'': ''object''}}}\n\n\n", "options": - {}, "stream": false, "format": "json"}' + body: '{"name": "llama3.2:3b"}' headers: accept: - '*/*' @@ -17,23 +9,441 @@ interactions: connection: - keep-alive content-length: - - '654' + - '23' + content-type: + - application/json host: - localhost:11434 user-agent: - - litellm/1.57.4 + - litellm/1.60.2 + method: POST + uri: http://localhost:11434/api/show + response: + content: "{\"license\":\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version + Release Date: September 25, 2024\\n\\n\u201CAgreement\u201D means the terms + and conditions for use, reproduction, distribution \\nand modification of the + Llama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, + manuals and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D + or \u201Cyou\u201D means you, or your employer or any other person or entity + (if you are \\nentering into this Agreement on such person or entity\u2019s + behalf), of the age required under\\napplicable laws, rules or regulations to + provide legal consent and that has legal authority\\nto bind your employer or + such other person or entity if you are entering in this Agreement\\non their + behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models + and software and algorithms, including\\nmachine-learning model code, trained + model weights, inference-enabling code, training-enabling code,\\nfine-tuning + enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama + Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation + (and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D + or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in + or, \\nif you are an entity, your principal place of business is in the EEA + or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the + EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using + or distributing any portion or element of the Llama Materials,\\nyou agree to + be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n + \ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable + and royalty-free limited license under Meta\u2019s intellectual property or + other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce, + distribute, copy, create derivative works \\nof, and make modifications to the + Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If + you distribute or make available the Llama Materials (or any derivative works + thereof), \\nor a product or service (including another AI model) that contains + any of them, you shall (A) provide\\na copy of this Agreement with any such + Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non + a related website, user interface, blogpost, about page, or product documentation. + If you use the\\nLlama Materials or any outputs or results of the Llama Materials + to create, train, fine tune, or\\notherwise improve an AI model, which is distributed + or made available, you shall also include \u201CLlama\u201D\\nat the beginning + of any such AI model name.\\n\\n ii. If you receive Llama Materials, + or any derivative works thereof, from a Licensee as part\\nof an integrated + end user product, then Section 2 of this Agreement will not apply to you. \\n\\n + \ iii. You must retain in all copies of the Llama Materials that you distribute + the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed + as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2 + Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n + \ iv. Your use of the Llama Materials must comply with applicable laws + and regulations\\n(including trade compliance laws and regulations) and adhere + to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy), + which is hereby \\nincorporated by reference into this Agreement.\\n \\n2. + Additional Commercial Terms. If, on the Llama 3.2 version release date, the + monthly active users\\nof the products or services made available by or for + Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly + active users in the preceding calendar month, you must request \\na license + from Meta, which Meta may grant to you in its sole discretion, and you are not + authorized to\\nexercise any of the rights under this Agreement unless or until + Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty. + UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS + THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF + ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND + IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT, + MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR + DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS + AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY + OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR + ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT, + TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, + \\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, + EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED + OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n + \ a. No trademark licenses are granted under this Agreement, and in connection + with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark + owned by or associated with the other or any of its affiliates, \\nexcept as + required for reasonable and customary use in describing and redistributing the + Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants + you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required + \\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s + brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/). + All goodwill arising out of your use of the Mark \\nwill inure to the benefit + of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and + derivatives made by or for Meta, with respect to any\\n derivative works + and modifications of the Llama Materials that are made by you, as between you + and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n + \ c. If you institute litigation or other proceedings against Meta or any + entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging + that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n + \ of any of the foregoing, constitutes infringement of intellectual property + or other rights owned or licensable\\n by you, then any licenses granted + to you under this Agreement shall terminate as of the date such litigation or\\n + \ claim is filed or instituted. You will indemnify and hold harmless Meta + from and against any claim by any third\\n party arising out of or related + to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination. + The term of this Agreement will commence upon your acceptance of this Agreement + or access\\nto the Llama Materials and will continue in full force and effect + until terminated in accordance with the terms\\nand conditions herein. Meta + may terminate this Agreement if you are in breach of any term or condition of + this\\nAgreement. Upon termination of this Agreement, you shall delete and cease + use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination + of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will + be governed and construed under the laws of the State of \\nCalifornia without + regard to choice of law principles, and the UN Convention on Contracts for the + International\\nSale of Goods does not apply to this Agreement. The courts of + California shall have exclusive jurisdiction of\\nany dispute arising out of + this Agreement.\\n**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta is committed + to promoting safe and fair use of its tools and features, including Llama 3.2. + If you access or use Llama 3.2, you agree to this Acceptable Use Policy (\u201C**Policy**\u201D). + The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited + Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree + you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate + the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate, + contribute to, encourage, plan, incite, or further illegal or unlawful activity + or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation + or harm to children, including the solicitation, creation, acquisition, or dissemination + of child exploitative content or failure to report Child Sexual Abuse Material\\n + \ 3. Human trafficking, exploitation, and sexual violence\\n 4. + The illegal distribution of information or materials to minors, including obscene + materials, or failure to employ legally required age-gating in connection with + such information or materials.\\n 5. Sexual solicitation\\n 6. + Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate + the harassment, abuse, threatening, or bullying of individuals or groups of + individuals\\n 2. Engage in, promote, incite, or facilitate discrimination + or other unlawful or harmful conduct in the provision of employment, employment + benefits, credit, housing, other economic benefits, or other essential goods + and services\\n 3. Engage in the unauthorized or unlicensed practice of any + profession including, but not limited to, financial, legal, medical/health, + or related professional practices\\n 4. Collect, process, disclose, generate, + or infer private or sensitive information about individuals, including information + about individuals\u2019 identity, health, or demographic information, unless + you have obtained the right to do so in accordance with applicable law\\n 5. + Engage in or facilitate any action or generate any content that infringes, misappropriates, + or otherwise violates any third-party rights, including the outputs or results + of any products or services using the Llama Materials\\n 6. Create, generate, + or facilitate the creation of malicious code, malware, computer viruses or do + anything else that could disable, overburden, interfere with or impair the proper + working, integrity, operation or appearance of a website or computer system\\n + \ 7. Engage in any action, or facilitate any action, to intentionally circumvent + or remove usage restrictions or other safety measures, or to enable functionality + disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the + planning or development of activities that present a risk of death or bodily + harm to individuals, including use of Llama 3.2 related to the following:\\n + \ 8. Military, warfare, nuclear industries or applications, espionage, use + for materials or activities that are subject to the International Traffic Arms + Regulations (ITAR) maintained by the United States Department of State or to + the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons + Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including + weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n + \ 11. Operation of critical infrastructure, transportation technologies, or + heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting, + and eating disorders\\n 13. Any content intended to incite or promote violence, + abuse, or any infliction of bodily harm to an individual\\n3. Intentionally + deceive or mislead others, including use of Llama 3.2 related to the following:\\n + \ 14. Generating, promoting, or furthering fraud or the creation or promotion + of disinformation\\n 15. Generating, promoting, or furthering defamatory + content, including the creation of defamatory statements, images, or other content\\n + \ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating + another individual without consent, authorization, or legal right\\n 18. + Representing that the use of Llama 3.2 or outputs are human-generated\\n 19. + Generating or facilitating false online engagement, including fake reviews and + other means of fake online engagement\\n4. Fail to appropriately disclose to + end users any known dangers of your AI system\\n5. Interact with third party + tools, models, or software designed to generate unlawful content or engage in + unlawful or harmful conduct and/or represent that the outputs of such tools, + models, or software are associated with Meta or Llama 3.2\\n\\nWith respect + to any multimodal models included in Llama 3.2, the rights granted under Section + 1(a) of the Llama 3.2 Community License Agreement are not being granted to you + if you are an individual domiciled in, or a company with a principal place of + business in, the European Union. This restriction does not apply to end users + of a product or service that incorporates any such multimodal models.\\n\\nPlease + report any violation of this Policy, software \u201Cbug,\u201D or other problems + that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n* + Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n* + Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n* + Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n* + Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama + 3.2: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama + show\\\"\\n# To build a new Modelfile based on this, replace FROM with:\\n# + FROM llama3.2:3b\\n\\nFROM /Users/joaomoura/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE + \\\"\\\"\\\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting + Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- + if .Tools }}When you receive a tool call response, use the output to format + an answer to the orginal user question.\\n\\nYou are a helpful assistant with + tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i, + $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- + if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- + if and $.Tools $last }}\\n\\nGiven the following functions, please respond with + a JSON for a function call with its proper arguments that best answers the given + prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": + dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range + $.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- + else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ + end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- + if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name + }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ + .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- + else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ + .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ + end }}\\n{{- end }}\\n{{- end }}\\\"\\\"\\\"\\nPARAMETER stop \\u003c|start_header_id|\\u003e\\nPARAMETER + stop \\u003c|end_header_id|\\u003e\\nPARAMETER stop \\u003c|eot_id|\\u003e\\nLICENSE + \\\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version Release Date: + September 25, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions + for use, reproduction, distribution \\nand modification of the Llama Materials + set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals + and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D + or \u201Cyou\u201D means you, or your employer or any other person or entity + (if you are \\nentering into this Agreement on such person or entity\u2019s + behalf), of the age required under\\napplicable laws, rules or regulations to + provide legal consent and that has legal authority\\nto bind your employer or + such other person or entity if you are entering in this Agreement\\non their + behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models + and software and algorithms, including\\nmachine-learning model code, trained + model weights, inference-enabling code, training-enabling code,\\nfine-tuning + enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama + Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation + (and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D + or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in + or, \\nif you are an entity, your principal place of business is in the EEA + or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the + EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using + or distributing any portion or element of the Llama Materials,\\nyou agree to + be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n + \ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable + and royalty-free limited license under Meta\u2019s intellectual property or + other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce, + distribute, copy, create derivative works \\nof, and make modifications to the + Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If + you distribute or make available the Llama Materials (or any derivative works + thereof), \\nor a product or service (including another AI model) that contains + any of them, you shall (A) provide\\na copy of this Agreement with any such + Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non + a related website, user interface, blogpost, about page, or product documentation. + If you use the\\nLlama Materials or any outputs or results of the Llama Materials + to create, train, fine tune, or\\notherwise improve an AI model, which is distributed + or made available, you shall also include \u201CLlama\u201D\\nat the beginning + of any such AI model name.\\n\\n ii. If you receive Llama Materials, + or any derivative works thereof, from a Licensee as part\\nof an integrated + end user product, then Section 2 of this Agreement will not apply to you. \\n\\n + \ iii. You must retain in all copies of the Llama Materials that you distribute + the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed + as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2 + Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n + \ iv. Your use of the Llama Materials must comply with applicable laws + and regulations\\n(including trade compliance laws and regulations) and adhere + to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy), + which is hereby \\nincorporated by reference into this Agreement.\\n \\n2. + Additional Commercial Terms. If, on the Llama 3.2 version release date, the + monthly active users\\nof the products or services made available by or for + Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly + active users in the preceding calendar month, you must request \\na license + from Meta, which Meta may grant to you in its sole discretion, and you are not + authorized to\\nexercise any of the rights under this Agreement unless or until + Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty. + UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS + THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF + ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND + IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT, + MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR + DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS + AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY + OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR + ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT, + TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, + \\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, + EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED + OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n + \ a. No trademark licenses are granted under this Agreement, and in connection + with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark + owned by or associated with the other or any of its affiliates, \\nexcept as + required for reasonable and customary use in describing and redistributing the + Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants + you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required + \\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s + brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/). + All goodwill arising out of your use of the Mark \\nwill inure to the benefit + of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and + derivatives made by or for Meta, with respect to any\\n derivative works + and modifications of the Llama Materials that are made by you, as between you + and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n + \ c. If you institute litigation or other proceedings against Meta or any + entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging + that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n + \ of any of the foregoing, constitutes infringement of intellectual property + or other rights owned or licensable\\n by you, then any licenses granted + to you under this Agreement shall terminate as of the date such litigation or\\n + \ claim is filed or instituted. You will indemnify and hold harmless Meta + from and against any claim by any third\\n party arising out of or related + to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination. + The term of this Agreement will commence upon your acceptance of this Agreement + or access\\nto the Llama Materials and will continue in full force and effect + until terminated in accordance with the terms\\nand conditions herein. Meta + may terminate this Agreement if you are in breach of any term or condition of + this\\nAgreement. Upon termination of this Agreement, you shall delete and cease + use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination + of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will + be governed and construed under the laws of the State of \\nCalifornia without + regard to choice of law principles, and the UN Convention on Contracts for the + International\\nSale of Goods does not apply to this Agreement. The courts of + California shall have exclusive jurisdiction of\\nany dispute arising out of + this Agreement.\\\"\\nLICENSE \\\"**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta + is committed to promoting safe and fair use of its tools and features, including + Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use + Policy (\u201C**Policy**\u201D). The most recent copy of this policy can be + found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited + Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree + you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate + the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate, + contribute to, encourage, plan, incite, or further illegal or unlawful activity + or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation + or harm to children, including the solicitation, creation, acquisition, or dissemination + of child exploitative content or failure to report Child Sexual Abuse Material\\n + \ 3. Human trafficking, exploitation, and sexual violence\\n 4. + The illegal distribution of information or materials to minors, including obscene + materials, or failure to employ legally required age-gating in connection with + such information or materials.\\n 5. Sexual solicitation\\n 6. + Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate + the harassment, abuse, threatening, or bullying of individuals or groups of + individuals\\n 2. Engage in, promote, incite, or facilitate discrimination + or other unlawful or harmful conduct in the provision of employment, employment + benefits, credit, housing, other economic benefits, or other essential goods + and services\\n 3. Engage in the unauthorized or unlicensed practice of any + profession including, but not limited to, financial, legal, medical/health, + or related professional practices\\n 4. Collect, process, disclose, generate, + or infer private or sensitive information about individuals, including information + about individuals\u2019 identity, health, or demographic information, unless + you have obtained the right to do so in accordance with applicable law\\n 5. + Engage in or facilitate any action or generate any content that infringes, misappropriates, + or otherwise violates any third-party rights, including the outputs or results + of any products or services using the Llama Materials\\n 6. Create, generate, + or facilitate the creation of malicious code, malware, computer viruses or do + anything else that could disable, overburden, interfere with or impair the proper + working, integrity, operation or appearance of a website or computer system\\n + \ 7. Engage in any action, or facilitate any action, to intentionally circumvent + or remove usage restrictions or other safety measures, or to enable functionality + disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the + planning or development of activities that present a risk of death or bodily + harm to individuals, including use of Llama 3.2 related to the following:\\n + \ 8. Military, warfare, nuclear industries or applications, espionage, use + for materials or activities that are subject to the International Traffic Arms + Regulations (ITAR) maintained by the United States Department of State or to + the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons + Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including + weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n + \ 11. Operation of critical infrastructure, transportation technologies, or + heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting, + and eating disorders\\n 13. Any content intended to incite or promote violence, + abuse, or any infliction of bodily harm to an individual\\n3. Intentionally + deceive or mislead others, including use of Llama 3.2 related to the following:\\n + \ 14. Generating, promoting, or furthering fraud or the creation or promotion + of disinformation\\n 15. Generating, promoting, or furthering defamatory + content, including the creation of defamatory statements, images, or other content\\n + \ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating + another individual without consent, authorization, or legal right\\n 18. + Representing that the use of Llama 3.2 or outputs are human-generated\\n 19. + Generating or facilitating false online engagement, including fake reviews and + other means of fake online engagement\\n4. Fail to appropriately disclose to + end users any known dangers of your AI system\\n5. Interact with third party + tools, models, or software designed to generate unlawful content or engage in + unlawful or harmful conduct and/or represent that the outputs of such tools, + models, or software are associated with Meta or Llama 3.2\\n\\nWith respect + to any multimodal models included in Llama 3.2, the rights granted under Section + 1(a) of the Llama 3.2 Community License Agreement are not being granted to you + if you are an individual domiciled in, or a company with a principal place of + business in, the European Union. This restriction does not apply to end users + of a product or service that incorporates any such multimodal models.\\n\\nPlease + report any violation of this Policy, software \u201Cbug,\u201D or other problems + that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n* + Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n* + Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n* + Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n* + Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama + 3.2: LlamaUseReport@meta.com\\\"\\n\",\"parameters\":\"stop \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop + \ \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting + Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- + if .Tools }}When you receive a tool call response, use the output to format + an answer to the orginal user question.\\n\\nYou are a helpful assistant with + tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i, + $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- + if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- + if and $.Tools $last }}\\n\\nGiven the following functions, please respond with + a JSON for a function call with its proper arguments that best answers the given + prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": + dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range + $.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- + else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ + end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- + if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name + }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ + .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- + else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ + .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ + end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2025-02-20T18:55:09.150577031-08:00\"}" + headers: + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 21 Feb 2025 02:57:55 GMT + Transfer-Encoding: + - chunked + http_version: HTTP/1.1 + status_code: 200 +- request: + body: '{"model": "llama3.1", "prompt": "### System:\nPlease convert the following + text into valid JSON.\n\nOutput ONLY the valid JSON and nothing else.\n\nThe + JSON must follow this format exactly:\n{\n \"name\": str,\n \"age\": int\n}\n\n### + User:\nName: Alice Llama, Age: 30\n\n", "options": {"stop": []}, "stream": false}' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '318' + host: + - localhost:11434 + user-agent: + - litellm/1.60.2 method: POST uri: http://localhost:11434/api/generate response: - content: '{"model":"llama3.1","created_at":"2025-01-15T20:47:17.068012Z","response":"{\"name\": - \"SimpleModel\", \"arguments\": {\"age\": \"30\", \"name\": \"Alice Llama\"}}","done":true,"done_reason":"stop","context":[128006,882,128007,271,14711,2724,512,678,25,30505,445,81101,11,13381,25,220,966,271,14711,744,512,1360,13677,4823,32090,27785,0,2467,6881,311,420,3645,5324,609,794,330,1723,1292,498,330,16774,23118,14819,1292,794,330,14819,3220,32075,578,2768,5865,527,2561,311,499,512,13922,1337,1232,364,1723,518,364,1723,1232,5473,609,1232,364,16778,1747,518,364,4789,1232,364,34192,398,28532,1595,16778,1747,63,449,682,279,2631,5137,449,4495,4595,518,364,14105,1232,5473,13495,1232,5473,609,1232,5473,2150,1232,364,678,518,364,1337,1232,364,928,25762,364,425,1232,5473,2150,1232,364,17166,518,364,1337,1232,364,11924,8439,2186,364,6413,1232,2570,425,518,364,609,4181,364,1337,1232,364,1735,23742,3818,128009,128006,78191,128007,271,5018,609,794,330,16778,1747,498,330,16774,794,5324,425,794,330,966,498,330,609,794,330,62786,445,81101,32075],"total_duration":4753211958,"load_duration":1084951250,"prompt_eval_count":152,"prompt_eval_duration":2906000000,"eval_count":25,"eval_duration":761000000}' + content: '{"model":"llama3.1","created_at":"2025-02-21T02:58:15.591873Z","response":"```\n{\n \"name\": + \"Alice Llama\",\n \"age\": 30\n}\n```","done":true,"done_reason":"stop","context":[128006,882,128007,271,14711,744,512,5618,5625,279,2768,1495,1139,2764,4823,382,5207,27785,279,2764,4823,323,4400,775,382,791,4823,2011,1833,420,3645,7041,512,517,220,330,609,794,610,345,220,330,425,794,528,198,633,14711,2724,512,678,25,30505,445,81101,11,13381,25,220,966,271,128009,128006,78191,128007,271,14196,4077,517,220,330,609,794,330,62786,445,81101,761,220,330,425,794,220,966,198,534,74694],"total_duration":20230916375,"load_duration":11878250500,"prompt_eval_count":67,"prompt_eval_duration":7472000000,"eval_count":22,"eval_duration":877000000}' headers: Content-Length: - - '1193' + - '737' Content-Type: - application/json; charset=utf-8 Date: - - Wed, 15 Jan 2025 20:47:17 GMT + - Fri, 21 Feb 2025 02:58:15 GMT http_version: HTTP/1.1 status_code: 200 - request: @@ -52,7 +462,7 @@ interactions: host: - localhost:11434 user-agent: - - litellm/1.57.4 + - litellm/1.60.2 method: POST uri: http://localhost:11434/api/show response: @@ -212,40 +622,37 @@ interactions: means:\\n\\n* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://github.com/meta-llama/llama-models/issues)\\n* Reporting risky content generated by the model: developers.facebook.com/llama_output_feedback\\n* Reporting bugs and security concerns: facebook.com/whitehat/info\\n* Reporting - violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\\n\",\"modelfile\":\"# + violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama show\\\"\\n# To build a new Modelfile based - on this, replace FROM with:\\n# FROM llama3.1:latest\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-87048bcd55216712ef14c11c2c303728463207b165bf18440b9b84b07ec00f87\\nTEMPLATE - \\\"\\\"\\\"{{ if .Messages }}\\n{{- if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- - if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nYou are - a helpful assistant with tool calling capabilities. When you receive a tool - call response, use the output to format an answer to the orginal use question.\\n{{- - end }}\\u003c|eot_id|\\u003e\\n{{- end }}\\n{{- range $i, $_ := .Messages }}\\n{{- - $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" - }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- if - and $.Tools $last }}\\n\\nGiven the following functions, please respond with + on this, replace FROM with:\\n# FROM llama3.1:latest\\n\\nFROM /Users/joaomoura/.ollama/models/blobs/sha256-667b0c1932bc6ffc593ed1d03f895bf2dc8dc6df21db3042284a6f4416b06a29\\nTEMPLATE + \\\"\\\"\\\"{{- if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- + if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nCutting + Knowledge Date: December 2023\\n\\nWhen you receive a tool call response, use + the output to format an answer to the orginal user question.\\n\\nYou are a + helpful assistant with tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- + end }}\\n{{- range $i, $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages + $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- + if and $.Tools $last }}\\n\\nGiven the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ $.Tools - }}\\n{{- end }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ + dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range + $.Tools }}\\n{{- . }}\\n{{ end }}\\nQuestion: {{ .Content }}\\u003c|eot_id|\\u003e\\n{{- + else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n\\n{{- range .ToolCalls }}{\\\"name\\\": \\\"{{ .Function.Name + if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- end }}\\n{{- + .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\n{{- else }}\\n{{- if .System }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\n{{ - .System }}\\u003c|eot_id|\\u003e{{ end }}{{ if .Prompt }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n\\n{{ - .Prompt }}\\u003c|eot_id|\\u003e{{ end }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}{{ .Response }}{{ if .Response }}\\u003c|eot_id|\\u003e{{ end }}\\\"\\\"\\\"\\nPARAMETER - stop \\u003c|start_header_id|\\u003e\\nPARAMETER stop \\u003c|end_header_id|\\u003e\\nPARAMETER - stop \\u003c|eot_id|\\u003e\\nLICENSE \\\"LLAMA 3.1 COMMUNITY LICENSE AGREEMENT\\nLlama - 3.1 Version Release Date: July 23, 2024\\n\\n\u201CAgreement\u201D means the - terms and conditions for use, reproduction, distribution and modification of - the\\nLlama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means - the specifications, manuals and documentation accompanying Llama 3.1\\ndistributed - by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D or - \u201Cyou\u201D means you, or your employer or any other person or entity (if - you are entering into\\nthis Agreement on such person or entity\u2019s behalf), + end }}\\n{{- end }}\\n{{- end }}\\\"\\\"\\\"\\nPARAMETER stop \\u003c|start_header_id|\\u003e\\nPARAMETER + stop \\u003c|end_header_id|\\u003e\\nPARAMETER stop \\u003c|eot_id|\\u003e\\nLICENSE + \\\"LLAMA 3.1 COMMUNITY LICENSE AGREEMENT\\nLlama 3.1 Version Release Date: + July 23, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions for + use, reproduction, distribution and modification of the\\nLlama Materials set + forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals + and documentation accompanying Llama 3.1\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D + or \u201Cyou\u201D means you, or your employer or any other person or entity + (if you are entering into\\nthis Agreement on such person or entity\u2019s behalf), of the age required under applicable laws, rules or\\nregulations to provide legal consent and that has legal authority to bind your employer or such other\\nperson or entity if you are entering in this Agreement on their behalf.\\n\\n\u201CLlama @@ -395,36 +802,34 @@ interactions: means:\\n\\n* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://github.com/meta-llama/llama-models/issues)\\n* Reporting risky content generated by the model: developers.facebook.com/llama_output_feedback\\n* Reporting bugs and security concerns: facebook.com/whitehat/info\\n* Reporting - violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\\n\\\"\\n\",\"parameters\":\"stop + violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\\\"\\n\",\"parameters\":\"stop \ \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop - \ \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"{{ - if .Messages }}\\n{{- if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- - if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nYou are - a helpful assistant with tool calling capabilities. When you receive a tool - call response, use the output to format an answer to the orginal use question.\\n{{- - end }}\\u003c|eot_id|\\u003e\\n{{- end }}\\n{{- range $i, $_ := .Messages }}\\n{{- - $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" - }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- if - and $.Tools $last }}\\n\\nGiven the following functions, please respond with + \ \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"{{- + if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- + if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nCutting + Knowledge Date: December 2023\\n\\nWhen you receive a tool call response, use + the output to format an answer to the orginal user question.\\n\\nYou are a + helpful assistant with tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- + end }}\\n{{- range $i, $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages + $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- + if and $.Tools $last }}\\n\\nGiven the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ $.Tools - }}\\n{{- end }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ + dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range + $.Tools }}\\n{{- . }}\\n{{ end }}\\nQuestion: {{ .Content }}\\u003c|eot_id|\\u003e\\n{{- + else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n\\n{{- range .ToolCalls }}{\\\"name\\\": \\\"{{ .Function.Name + if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- end }}\\n{{- + .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\n{{- else }}\\n{{- if .System }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\n{{ - .System }}\\u003c|eot_id|\\u003e{{ end }}{{ if .Prompt }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n\\n{{ - .Prompt }}\\u003c|eot_id|\\u003e{{ end }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}{{ .Response }}{{ if .Response }}\\u003c|eot_id|\\u003e{{ end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"8.0B\",\"quantization_level\":\"Q4_0\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Meta-Llama-3.1\",\"general.file_type\":2,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.license\":\"llama3.1\",\"general.parameter_count\":8030261248,\"general.quantization_version\":2,\"general.size_label\":\"8B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":32,\"llama.attention.head_count_kv\":8,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.block_count\":32,\"llama.context_length\":131072,\"llama.embedding_length\":4096,\"llama.feed_forward_length\":14336,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-08-01T11:38:16.96106256-04:00\"}" + end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"8.0B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Meta-Llama-3.1\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.license\":\"llama3.1\",\"general.parameter_count\":8030261312,\"general.quantization_version\":2,\"general.size_label\":\"8B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":32,\"llama.attention.head_count_kv\":8,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.block_count\":32,\"llama.context_length\":131072,\"llama.embedding_length\":4096,\"llama.feed_forward_length\":14336,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2025-02-20T18:56:54.293648887-08:00\"}" headers: Content-Type: - application/json; charset=utf-8 Date: - - Wed, 15 Jan 2025 20:47:17 GMT + - Fri, 21 Feb 2025 02:58:15 GMT Transfer-Encoding: - chunked http_version: HTTP/1.1 @@ -445,7 +850,7 @@ interactions: host: - localhost:11434 user-agent: - - litellm/1.57.4 + - litellm/1.60.2 method: POST uri: http://localhost:11434/api/show response: @@ -605,247 +1010,34 @@ interactions: means:\\n\\n* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://github.com/meta-llama/llama-models/issues)\\n* Reporting risky content generated by the model: developers.facebook.com/llama_output_feedback\\n* Reporting bugs and security concerns: facebook.com/whitehat/info\\n* Reporting - violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\\n\",\"modelfile\":\"# + violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama show\\\"\\n# To build a new Modelfile based - on this, replace FROM with:\\n# FROM llama3.1:latest\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-87048bcd55216712ef14c11c2c303728463207b165bf18440b9b84b07ec00f87\\nTEMPLATE - \\\"\\\"\\\"{{ if .Messages }}\\n{{- if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- - if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nYou are - a helpful assistant with tool calling capabilities. When you receive a tool - call response, use the output to format an answer to the orginal use question.\\n{{- - end }}\\u003c|eot_id|\\u003e\\n{{- end }}\\n{{- range $i, $_ := .Messages }}\\n{{- - $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" - }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- if - and $.Tools $last }}\\n\\nGiven the following functions, please respond with + on this, replace FROM with:\\n# FROM llama3.1:latest\\n\\nFROM /Users/joaomoura/.ollama/models/blobs/sha256-667b0c1932bc6ffc593ed1d03f895bf2dc8dc6df21db3042284a6f4416b06a29\\nTEMPLATE + \\\"\\\"\\\"{{- if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- + if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nCutting + Knowledge Date: December 2023\\n\\nWhen you receive a tool call response, use + the output to format an answer to the orginal user question.\\n\\nYou are a + helpful assistant with tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- + end }}\\n{{- range $i, $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages + $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- + if and $.Tools $last }}\\n\\nGiven the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ $.Tools - }}\\n{{- end }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ + dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range + $.Tools }}\\n{{- . }}\\n{{ end }}\\nQuestion: {{ .Content }}\\u003c|eot_id|\\u003e\\n{{- + else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n\\n{{- range .ToolCalls }}{\\\"name\\\": \\\"{{ .Function.Name + if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- end }}\\n{{- + .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\n{{- else }}\\n{{- if .System }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\n{{ - .System }}\\u003c|eot_id|\\u003e{{ end }}{{ if .Prompt }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n\\n{{ - .Prompt }}\\u003c|eot_id|\\u003e{{ end }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}{{ .Response }}{{ if .Response }}\\u003c|eot_id|\\u003e{{ end }}\\\"\\\"\\\"\\nPARAMETER - stop \\u003c|start_header_id|\\u003e\\nPARAMETER stop \\u003c|end_header_id|\\u003e\\nPARAMETER - stop \\u003c|eot_id|\\u003e\\nLICENSE \\\"LLAMA 3.1 COMMUNITY LICENSE AGREEMENT\\nLlama - 3.1 Version Release Date: July 23, 2024\\n\\n\u201CAgreement\u201D means the - terms and conditions for use, reproduction, distribution and modification of - the\\nLlama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means - the specifications, manuals and documentation accompanying Llama 3.1\\ndistributed - by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D or - \u201Cyou\u201D means you, or your employer or any other person or entity (if - you are entering into\\nthis Agreement on such person or entity\u2019s behalf), - of the age required under applicable laws, rules or\\nregulations to provide - legal consent and that has legal authority to bind your employer or such other\\nperson - or entity if you are entering in this Agreement on their behalf.\\n\\n\u201CLlama - 3.1\u201D means the foundational large language models and software and algorithms, - including\\nmachine-learning model code, trained model weights, inference-enabling - code, training-enabling code,\\nfine-tuning enabling code and other elements - of the foregoing distributed by Meta at\\nhttps://llama.meta.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.1 and Documentation - (and any\\nportion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, if you are an entity, your\\nprincipal place of business is in the EEA or - Switzerland) and Meta Platforms, Inc. (if you are located\\noutside of the EEA - or Switzerland).\\n\\nBy clicking \u201CI Accept\u201D below or by using or - distributing any portion or element of the Llama Materials,\\nyou agree to be - bound by this Agreement.\\n\\n1. License Rights and Redistribution.\\n\\n a. - Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable - and royalty-free\\nlimited license under Meta\u2019s intellectual property or - other rights owned by Meta embodied in the Llama\\nMaterials to use, reproduce, - distribute, copy, create derivative works of, and make modifications to the\\nLlama - Materials.\\n\\n b. Redistribution and Use.\\n\\n i. If you distribute - or make available the Llama Materials (or any derivative works\\nthereof), or - a product or service (including another AI model) that contains any of them, - you shall (A)\\nprovide a copy of this Agreement with any such Llama Materials; - and (B) prominently display \u201CBuilt with\\nLlama\u201D on a related website, - user interface, blogpost, about page, or product documentation. If you use\\nthe - Llama Materials or any outputs or results of the Llama Materials to create, - train, fine tune, or\\notherwise improve an AI model, which is distributed or - made available, you shall also include \u201CLlama\u201D at\\nthe beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, or - any derivative works thereof, from a Licensee as part \\nof an integrated end - user product, then Section 2 of this Agreement will not apply to you.\\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the following\\nattribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \u201CLlama 3.1 is\\nlicensed under the Llama 3.1 - Community License, Copyright \xA9 Meta Platforms, Inc. All Rights\\nReserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws and - regulations\\n(including trade compliance laws and regulations) and adhere to - the Acceptable Use Policy for the Llama\\nMaterials (available at https://llama.meta.com/llama3_1/use-policy), - which is hereby incorporated by\\nreference into this Agreement.\\n\\n2. Additional - Commercial Terms. If, on the Llama 3.1 version release date, the monthly active - users\\nof the products or services made available by or for Licensee, or Licensee\u2019s - affiliates, is greater than 700\\nmillion monthly active users in the preceding - calendar month, you must request a license from Meta,\\nwhich Meta may grant - to you in its sole discretion, and you are not authorized to exercise any of - the\\nrights under this Agreement unless or until Meta otherwise expressly grants - you such rights.\\n\\n3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE - LAW, THE LLAMA MATERIALS AND ANY\\nOUTPUT AND RESULTS THEREFROM ARE PROVIDED - ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF\\nANY KIND, AND META DISCLAIMS - ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED,\\nINCLUDING, WITHOUT LIMITATION, - ANY WARRANTIES OF TITLE, NON-INFRINGEMENT,\\nMERCHANTABILITY, OR FITNESS FOR - A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR\\nDETERMINING THE APPROPRIATENESS - OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND\\nASSUME ANY RISKS ASSOCIATED - WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND\\nRESULTS.\\n\\n4. Limitation - of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY - OF\\nLIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR - OTHERWISE, ARISING\\nOUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, - SPECIAL, CONSEQUENTIAL,\\nINCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF - META OR ITS AFFILIATES HAVE BEEN ADVISED\\nOF THE POSSIBILITY OF ANY OF THE - FOREGOING.\\n\\n5. Intellectual Property.\\n\\n a. No trademark licenses are - granted under this Agreement, and in connection with the Llama\\nMaterials, - neither Meta nor Licensee may use any name or mark owned by or associated with - the other\\nor any of its affiliates, except as required for reasonable and - customary use in describing and\\nredistributing the Llama Materials or as set - forth in this Section 5(a). Meta hereby grants you a license to\\nuse \u201CLlama\u201D - (the \u201CMark\u201D) solely as required to comply with the last sentence of - Section 1.b.i. You will\\ncomply with Meta\u2019s brand guidelines (currently - accessible at\\nhttps://about.meta.com/brand/resources/meta/company-brand/ ). - All goodwill arising out of your use\\nof the Mark will inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and derivatives - made by or for Meta, with\\nrespect to any derivative works and modifications - of the Llama Materials that are made by you, as\\nbetween you and Meta, you - are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any entity - (including a\\ncross-claim or counterclaim in a lawsuit) alleging that the Llama - Materials or Llama 3.1 outputs or\\nresults, or any portion of any of the foregoing, - constitutes infringement of intellectual property or other\\nrights owned or - licensable by you, then any licenses granted to you under this Agreement shall\\nterminate - as of the date such litigation or claim is filed or instituted. You will indemnify - and hold\\nharmless Meta from and against any claim by any third party arising - out of or related to your use or\\ndistribution of the Llama Materials.\\n\\n6. - Term and Termination. The term of this Agreement will commence upon your acceptance - of this\\nAgreement or access to the Llama Materials and will continue in full - force and effect until terminated in\\naccordance with the terms and conditions - herein. Meta may terminate this Agreement if you are in\\nbreach of any term - or condition of this Agreement. Upon termination of this Agreement, you shall - delete\\nand cease use of the Llama Materials. Sections 3, 4 and 7 shall survive - the termination of this\\nAgreement.\\n\\n7. Governing Law and Jurisdiction. - This Agreement will be governed and construed under the laws of\\nthe State - of California without regard to choice of law principles, and the UN Convention - on Contracts\\nfor the International Sale of Goods does not apply to this Agreement. - The courts of California shall have\\nexclusive jurisdiction of any dispute - arising out of this Agreement.\\n\\n# Llama 3.1 Acceptable Use Policy\\n\\nMeta - is committed to promoting safe and fair use of its tools and features, including - Llama 3.1. If you\\naccess or use Llama 3.1, you agree to this Acceptable Use - Policy (\u201CPolicy\u201D). The most recent copy of\\nthis policy can be found - at [https://llama.meta.com/llama3_1/use-policy](https://llama.meta.com/llama3_1/use-policy)\\n\\n## - Prohibited Uses\\n\\nWe want everyone to use Llama 3.1 safely and responsibly. - You agree you will not use, or allow\\nothers to use, Llama 3.1 to:\\n\\n1. - Violate the law or others\u2019 rights, including to:\\n 1. Engage in, promote, - generate, contribute to, encourage, plan, incite, or further illegal or unlawful - activity or content, such as:\\n 1. Violence or terrorism\\n 2. - Exploitation or harm to children, including the solicitation, creation, acquisition, - or dissemination of child exploitative content or failure to report Child Sexual - Abuse Material\\n 3. Human trafficking, exploitation, and sexual violence\\n - \ 4. The illegal distribution of information or materials to minors, including - obscene materials, or failure to employ legally required age-gating in connection - with such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 3. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 4. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 5. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 6. Collect, process, disclose, generate, - or infer health, demographic, or other sensitive personal or private information - about individuals without rights and consents required by applicable laws\\n - \ 7. Engage in or facilitate any action or generate any content that infringes, - misappropriates, or otherwise violates any third-party rights, including the - outputs or results of any products or services using the Llama Materials\\n - \ 8. Create, generate, or facilitate the creation of malicious code, malware, - computer viruses or do anything else that could disable, overburden, interfere - with or impair the proper working, integrity, operation or appearance of a website - or computer system\\n\\n2. Engage in, promote, incite, facilitate, or assist - in the planning or development of activities that present a risk of death or - bodily harm to individuals, including use of Llama 3.1 related to the following:\\n - \ 1. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State\\n 2. - Guns and illegal weapons (including weapon development)\\n 3. Illegal drugs - and regulated/controlled substances\\n 4. Operation of critical infrastructure, - transportation technologies, or heavy machinery\\n 5. Self-harm or harm to - others, including suicide, cutting, and eating disorders\\n 6. Any content - intended to incite or promote violence, abuse, or any infliction of bodily harm - to an individual\\n\\n3. Intentionally deceive or mislead others, including - use of Llama 3.1 related to the following:\\n 1. Generating, promoting, or - furthering fraud or the creation or promotion of disinformation\\n 2. Generating, - promoting, or furthering defamatory content, including the creation of defamatory - statements, images, or other content\\n 3. Generating, promoting, or further - distributing spam\\n 4. Impersonating another individual without consent, - authorization, or legal right\\n 5. Representing that the use of Llama 3.1 - or outputs are human-generated\\n 6. Generating or facilitating false online - engagement, including fake reviews and other means of fake online engagement\\n\\n4. - Fail to appropriately disclose to end users any known dangers of your AI system\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation\\nof this Policy through one of the following - means:\\n\\n* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://github.com/meta-llama/llama-models/issues)\\n* - Reporting risky content generated by the model: developers.facebook.com/llama_output_feedback\\n* - Reporting bugs and security concerns: facebook.com/whitehat/info\\n* Reporting - violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\\n\\\"\\n\",\"parameters\":\"stop - \ \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop - \ \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"{{ - if .Messages }}\\n{{- if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- - if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nYou are - a helpful assistant with tool calling capabilities. When you receive a tool - call response, use the output to format an answer to the orginal use question.\\n{{- - end }}\\u003c|eot_id|\\u003e\\n{{- end }}\\n{{- range $i, $_ := .Messages }}\\n{{- - $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" - }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- if - and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ $.Tools - }}\\n{{- end }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n\\n{{- range .ToolCalls }}{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\n{{- else }}\\n{{- if .System }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\n{{ - .System }}\\u003c|eot_id|\\u003e{{ end }}{{ if .Prompt }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n\\n{{ - .Prompt }}\\u003c|eot_id|\\u003e{{ end }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}{{ .Response }}{{ if .Response }}\\u003c|eot_id|\\u003e{{ end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"8.0B\",\"quantization_level\":\"Q4_0\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Meta-Llama-3.1\",\"general.file_type\":2,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.license\":\"llama3.1\",\"general.parameter_count\":8030261248,\"general.quantization_version\":2,\"general.size_label\":\"8B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":32,\"llama.attention.head_count_kv\":8,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.block_count\":32,\"llama.context_length\":131072,\"llama.embedding_length\":4096,\"llama.feed_forward_length\":14336,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-08-01T11:38:16.96106256-04:00\"}" - headers: - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 15 Jan 2025 20:47:17 GMT - Transfer-Encoding: - - chunked - http_version: HTTP/1.1 - status_code: 200 -- request: - body: '{"name": "llama3.1"}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '20' - content-type: - - application/json - host: - - localhost:11434 - user-agent: - - litellm/1.57.4 - method: POST - uri: http://localhost:11434/api/show - response: - content: "{\"license\":\"LLAMA 3.1 COMMUNITY LICENSE AGREEMENT\\nLlama 3.1 Version - Release Date: July 23, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions - for use, reproduction, distribution and modification of the\\nLlama Materials - set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals + end }}\\n{{- end }}\\n{{- end }}\\\"\\\"\\\"\\nPARAMETER stop \\u003c|start_header_id|\\u003e\\nPARAMETER + stop \\u003c|end_header_id|\\u003e\\nPARAMETER stop \\u003c|eot_id|\\u003e\\nLICENSE + \\\"LLAMA 3.1 COMMUNITY LICENSE AGREEMENT\\nLlama 3.1 Version Release Date: + July 23, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions for + use, reproduction, distribution and modification of the\\nLlama Materials set + forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals and documentation accompanying Llama 3.1\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D or \u201Cyou\u201D means you, or your employer or any other person or entity (if you are entering into\\nthis Agreement on such person or entity\u2019s behalf), @@ -998,1049 +1190,34 @@ interactions: means:\\n\\n* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://github.com/meta-llama/llama-models/issues)\\n* Reporting risky content generated by the model: developers.facebook.com/llama_output_feedback\\n* Reporting bugs and security concerns: facebook.com/whitehat/info\\n* Reporting - violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\\n\",\"modelfile\":\"# - Modelfile generated by \\\"ollama show\\\"\\n# To build a new Modelfile based - on this, replace FROM with:\\n# FROM llama3.1:latest\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-87048bcd55216712ef14c11c2c303728463207b165bf18440b9b84b07ec00f87\\nTEMPLATE - \\\"\\\"\\\"{{ if .Messages }}\\n{{- if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- - if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nYou are - a helpful assistant with tool calling capabilities. When you receive a tool - call response, use the output to format an answer to the orginal use question.\\n{{- - end }}\\u003c|eot_id|\\u003e\\n{{- end }}\\n{{- range $i, $_ := .Messages }}\\n{{- - $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" - }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- if - and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ $.Tools - }}\\n{{- end }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n\\n{{- range .ToolCalls }}{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\n{{- else }}\\n{{- if .System }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\n{{ - .System }}\\u003c|eot_id|\\u003e{{ end }}{{ if .Prompt }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n\\n{{ - .Prompt }}\\u003c|eot_id|\\u003e{{ end }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}{{ .Response }}{{ if .Response }}\\u003c|eot_id|\\u003e{{ end }}\\\"\\\"\\\"\\nPARAMETER - stop \\u003c|start_header_id|\\u003e\\nPARAMETER stop \\u003c|end_header_id|\\u003e\\nPARAMETER - stop \\u003c|eot_id|\\u003e\\nLICENSE \\\"LLAMA 3.1 COMMUNITY LICENSE AGREEMENT\\nLlama - 3.1 Version Release Date: July 23, 2024\\n\\n\u201CAgreement\u201D means the - terms and conditions for use, reproduction, distribution and modification of - the\\nLlama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means - the specifications, manuals and documentation accompanying Llama 3.1\\ndistributed - by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D or - \u201Cyou\u201D means you, or your employer or any other person or entity (if - you are entering into\\nthis Agreement on such person or entity\u2019s behalf), - of the age required under applicable laws, rules or\\nregulations to provide - legal consent and that has legal authority to bind your employer or such other\\nperson - or entity if you are entering in this Agreement on their behalf.\\n\\n\u201CLlama - 3.1\u201D means the foundational large language models and software and algorithms, - including\\nmachine-learning model code, trained model weights, inference-enabling - code, training-enabling code,\\nfine-tuning enabling code and other elements - of the foregoing distributed by Meta at\\nhttps://llama.meta.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.1 and Documentation - (and any\\nportion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, if you are an entity, your\\nprincipal place of business is in the EEA or - Switzerland) and Meta Platforms, Inc. (if you are located\\noutside of the EEA - or Switzerland).\\n\\nBy clicking \u201CI Accept\u201D below or by using or - distributing any portion or element of the Llama Materials,\\nyou agree to be - bound by this Agreement.\\n\\n1. License Rights and Redistribution.\\n\\n a. - Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable - and royalty-free\\nlimited license under Meta\u2019s intellectual property or - other rights owned by Meta embodied in the Llama\\nMaterials to use, reproduce, - distribute, copy, create derivative works of, and make modifications to the\\nLlama - Materials.\\n\\n b. Redistribution and Use.\\n\\n i. If you distribute - or make available the Llama Materials (or any derivative works\\nthereof), or - a product or service (including another AI model) that contains any of them, - you shall (A)\\nprovide a copy of this Agreement with any such Llama Materials; - and (B) prominently display \u201CBuilt with\\nLlama\u201D on a related website, - user interface, blogpost, about page, or product documentation. If you use\\nthe - Llama Materials or any outputs or results of the Llama Materials to create, - train, fine tune, or\\notherwise improve an AI model, which is distributed or - made available, you shall also include \u201CLlama\u201D at\\nthe beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, or - any derivative works thereof, from a Licensee as part \\nof an integrated end - user product, then Section 2 of this Agreement will not apply to you.\\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the following\\nattribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \u201CLlama 3.1 is\\nlicensed under the Llama 3.1 - Community License, Copyright \xA9 Meta Platforms, Inc. All Rights\\nReserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws and - regulations\\n(including trade compliance laws and regulations) and adhere to - the Acceptable Use Policy for the Llama\\nMaterials (available at https://llama.meta.com/llama3_1/use-policy), - which is hereby incorporated by\\nreference into this Agreement.\\n\\n2. Additional - Commercial Terms. If, on the Llama 3.1 version release date, the monthly active - users\\nof the products or services made available by or for Licensee, or Licensee\u2019s - affiliates, is greater than 700\\nmillion monthly active users in the preceding - calendar month, you must request a license from Meta,\\nwhich Meta may grant - to you in its sole discretion, and you are not authorized to exercise any of - the\\nrights under this Agreement unless or until Meta otherwise expressly grants - you such rights.\\n\\n3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE - LAW, THE LLAMA MATERIALS AND ANY\\nOUTPUT AND RESULTS THEREFROM ARE PROVIDED - ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF\\nANY KIND, AND META DISCLAIMS - ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED,\\nINCLUDING, WITHOUT LIMITATION, - ANY WARRANTIES OF TITLE, NON-INFRINGEMENT,\\nMERCHANTABILITY, OR FITNESS FOR - A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR\\nDETERMINING THE APPROPRIATENESS - OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND\\nASSUME ANY RISKS ASSOCIATED - WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND\\nRESULTS.\\n\\n4. Limitation - of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY - OF\\nLIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR - OTHERWISE, ARISING\\nOUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, - SPECIAL, CONSEQUENTIAL,\\nINCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF - META OR ITS AFFILIATES HAVE BEEN ADVISED\\nOF THE POSSIBILITY OF ANY OF THE - FOREGOING.\\n\\n5. Intellectual Property.\\n\\n a. No trademark licenses are - granted under this Agreement, and in connection with the Llama\\nMaterials, - neither Meta nor Licensee may use any name or mark owned by or associated with - the other\\nor any of its affiliates, except as required for reasonable and - customary use in describing and\\nredistributing the Llama Materials or as set - forth in this Section 5(a). Meta hereby grants you a license to\\nuse \u201CLlama\u201D - (the \u201CMark\u201D) solely as required to comply with the last sentence of - Section 1.b.i. You will\\ncomply with Meta\u2019s brand guidelines (currently - accessible at\\nhttps://about.meta.com/brand/resources/meta/company-brand/ ). - All goodwill arising out of your use\\nof the Mark will inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and derivatives - made by or for Meta, with\\nrespect to any derivative works and modifications - of the Llama Materials that are made by you, as\\nbetween you and Meta, you - are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any entity - (including a\\ncross-claim or counterclaim in a lawsuit) alleging that the Llama - Materials or Llama 3.1 outputs or\\nresults, or any portion of any of the foregoing, - constitutes infringement of intellectual property or other\\nrights owned or - licensable by you, then any licenses granted to you under this Agreement shall\\nterminate - as of the date such litigation or claim is filed or instituted. You will indemnify - and hold\\nharmless Meta from and against any claim by any third party arising - out of or related to your use or\\ndistribution of the Llama Materials.\\n\\n6. - Term and Termination. The term of this Agreement will commence upon your acceptance - of this\\nAgreement or access to the Llama Materials and will continue in full - force and effect until terminated in\\naccordance with the terms and conditions - herein. Meta may terminate this Agreement if you are in\\nbreach of any term - or condition of this Agreement. Upon termination of this Agreement, you shall - delete\\nand cease use of the Llama Materials. Sections 3, 4 and 7 shall survive - the termination of this\\nAgreement.\\n\\n7. Governing Law and Jurisdiction. - This Agreement will be governed and construed under the laws of\\nthe State - of California without regard to choice of law principles, and the UN Convention - on Contracts\\nfor the International Sale of Goods does not apply to this Agreement. - The courts of California shall have\\nexclusive jurisdiction of any dispute - arising out of this Agreement.\\n\\n# Llama 3.1 Acceptable Use Policy\\n\\nMeta - is committed to promoting safe and fair use of its tools and features, including - Llama 3.1. If you\\naccess or use Llama 3.1, you agree to this Acceptable Use - Policy (\u201CPolicy\u201D). The most recent copy of\\nthis policy can be found - at [https://llama.meta.com/llama3_1/use-policy](https://llama.meta.com/llama3_1/use-policy)\\n\\n## - Prohibited Uses\\n\\nWe want everyone to use Llama 3.1 safely and responsibly. - You agree you will not use, or allow\\nothers to use, Llama 3.1 to:\\n\\n1. - Violate the law or others\u2019 rights, including to:\\n 1. Engage in, promote, - generate, contribute to, encourage, plan, incite, or further illegal or unlawful - activity or content, such as:\\n 1. Violence or terrorism\\n 2. - Exploitation or harm to children, including the solicitation, creation, acquisition, - or dissemination of child exploitative content or failure to report Child Sexual - Abuse Material\\n 3. Human trafficking, exploitation, and sexual violence\\n - \ 4. The illegal distribution of information or materials to minors, including - obscene materials, or failure to employ legally required age-gating in connection - with such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 3. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 4. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 5. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 6. Collect, process, disclose, generate, - or infer health, demographic, or other sensitive personal or private information - about individuals without rights and consents required by applicable laws\\n - \ 7. Engage in or facilitate any action or generate any content that infringes, - misappropriates, or otherwise violates any third-party rights, including the - outputs or results of any products or services using the Llama Materials\\n - \ 8. Create, generate, or facilitate the creation of malicious code, malware, - computer viruses or do anything else that could disable, overburden, interfere - with or impair the proper working, integrity, operation or appearance of a website - or computer system\\n\\n2. Engage in, promote, incite, facilitate, or assist - in the planning or development of activities that present a risk of death or - bodily harm to individuals, including use of Llama 3.1 related to the following:\\n - \ 1. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State\\n 2. - Guns and illegal weapons (including weapon development)\\n 3. Illegal drugs - and regulated/controlled substances\\n 4. Operation of critical infrastructure, - transportation technologies, or heavy machinery\\n 5. Self-harm or harm to - others, including suicide, cutting, and eating disorders\\n 6. Any content - intended to incite or promote violence, abuse, or any infliction of bodily harm - to an individual\\n\\n3. Intentionally deceive or mislead others, including - use of Llama 3.1 related to the following:\\n 1. Generating, promoting, or - furthering fraud or the creation or promotion of disinformation\\n 2. Generating, - promoting, or furthering defamatory content, including the creation of defamatory - statements, images, or other content\\n 3. Generating, promoting, or further - distributing spam\\n 4. Impersonating another individual without consent, - authorization, or legal right\\n 5. Representing that the use of Llama 3.1 - or outputs are human-generated\\n 6. Generating or facilitating false online - engagement, including fake reviews and other means of fake online engagement\\n\\n4. - Fail to appropriately disclose to end users any known dangers of your AI system\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation\\nof this Policy through one of the following - means:\\n\\n* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://github.com/meta-llama/llama-models/issues)\\n* - Reporting risky content generated by the model: developers.facebook.com/llama_output_feedback\\n* - Reporting bugs and security concerns: facebook.com/whitehat/info\\n* Reporting - violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\\n\\\"\\n\",\"parameters\":\"stop + violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\\\"\\n\",\"parameters\":\"stop \ \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop - \ \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"{{ - if .Messages }}\\n{{- if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- - if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nYou are - a helpful assistant with tool calling capabilities. When you receive a tool - call response, use the output to format an answer to the orginal use question.\\n{{- - end }}\\u003c|eot_id|\\u003e\\n{{- end }}\\n{{- range $i, $_ := .Messages }}\\n{{- - $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" - }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- if - and $.Tools $last }}\\n\\nGiven the following functions, please respond with + \ \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"{{- + if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- + if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nCutting + Knowledge Date: December 2023\\n\\nWhen you receive a tool call response, use + the output to format an answer to the orginal user question.\\n\\nYou are a + helpful assistant with tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- + end }}\\n{{- range $i, $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages + $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- + if and $.Tools $last }}\\n\\nGiven the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ $.Tools - }}\\n{{- end }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ + dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range + $.Tools }}\\n{{- . }}\\n{{ end }}\\nQuestion: {{ .Content }}\\u003c|eot_id|\\u003e\\n{{- + else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n\\n{{- range .ToolCalls }}{\\\"name\\\": \\\"{{ .Function.Name + if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- end }}\\n{{- + .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\n{{- else }}\\n{{- if .System }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\n{{ - .System }}\\u003c|eot_id|\\u003e{{ end }}{{ if .Prompt }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n\\n{{ - .Prompt }}\\u003c|eot_id|\\u003e{{ end }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}{{ .Response }}{{ if .Response }}\\u003c|eot_id|\\u003e{{ end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"8.0B\",\"quantization_level\":\"Q4_0\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Meta-Llama-3.1\",\"general.file_type\":2,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.license\":\"llama3.1\",\"general.parameter_count\":8030261248,\"general.quantization_version\":2,\"general.size_label\":\"8B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":32,\"llama.attention.head_count_kv\":8,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.block_count\":32,\"llama.context_length\":131072,\"llama.embedding_length\":4096,\"llama.feed_forward_length\":14336,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-08-01T11:38:16.96106256-04:00\"}" + end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"8.0B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Meta-Llama-3.1\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.license\":\"llama3.1\",\"general.parameter_count\":8030261312,\"general.quantization_version\":2,\"general.size_label\":\"8B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":32,\"llama.attention.head_count_kv\":8,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.block_count\":32,\"llama.context_length\":131072,\"llama.embedding_length\":4096,\"llama.feed_forward_length\":14336,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2025-02-20T18:56:54.293648887-08:00\"}" headers: Content-Type: - application/json; charset=utf-8 Date: - - Wed, 15 Jan 2025 20:47:17 GMT - Transfer-Encoding: - - chunked - http_version: HTTP/1.1 - status_code: 200 -- request: - body: '{"model": "llama3.1", "prompt": "### User:\nName: Alice Llama, Age: 30\n\n### - Assistant:\nTool Calls: [\n {\n \"id\": \"call_5487de90-385d-48f4-843c-04b9dc635b23\",\n \"type\": - \"function\",\n \"function\": {\n \"name\": \"SimpleModel\",\n \"arguments\": - {\n \"age\": \"30\",\n \"name\": \"Alice Llama\"\n }\n }\n }\n]\n\n### - User:\nValidation Error found:\n1 validation error for SimpleModel\nage\n Input - should be a valid integer [type=int_type, input_value=''30'', input_type=str]\n For - further information visit https://errors.pydantic.dev/2.10/v/int_type\nRecall - the function correctly, fix the errors\n\n### System:\nProduce JSON OUTPUT ONLY! - Adhere to this format {\"name\": \"function_name\", \"arguments\":{\"argument_name\": - \"argument_value\"}} The following functions are available to you:\n{''type'': - ''function'', ''function'': {''name'': ''SimpleModel'', ''description'': ''Correctly - extracted `SimpleModel` with all the required parameters with correct types'', - ''parameters'': {''properties'': {''name'': {''title'': ''Name'', ''type'': - ''string''}, ''age'': {''title'': ''Age'', ''type'': ''integer''}}, ''required'': - [''age'', ''name''], ''type'': ''object''}}}\n\n\n", "options": {}, "stream": - false, "format": "json"}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '1235' - host: - - localhost:11434 - user-agent: - - litellm/1.57.4 - method: POST - uri: http://localhost:11434/api/generate - response: - content: '{"model":"llama3.1","created_at":"2025-01-15T20:47:19.399083Z","response":"{\"name\": - \"SimpleModel\", \"arguments\":{\"name\": \"Alice Llama\", \"age\": 30}}","done":true,"done_reason":"stop","context":[128006,882,128007,271,14711,2724,512,678,25,30505,445,81101,11,13381,25,220,966,271,14711,22103,512,7896,41227,25,2330,220,341,262,330,307,794,330,6797,62,22287,22,451,1954,12,18695,67,12,2166,69,19,12,23996,66,12,2371,65,24,7783,22276,65,1419,761,262,330,1337,794,330,1723,761,262,330,1723,794,341,415,330,609,794,330,16778,1747,761,415,330,16774,794,341,286,330,425,794,330,966,761,286,330,609,794,330,62786,445,81101,702,415,457,262,457,220,457,2595,14711,2724,512,14118,4703,1766,512,16,10741,1493,369,9170,1747,198,425,198,220,5688,1288,387,264,2764,7698,510,1337,16972,1857,11,1988,3220,1151,966,518,1988,1857,16311,933,262,1789,4726,2038,4034,3788,1129,7805,7345,67,8322,22247,14,17,13,605,5574,32214,1857,198,3905,543,279,734,12722,11,5155,279,6103,271,14711,744,512,1360,13677,4823,32090,27785,0,2467,6881,311,420,3645,5324,609,794,330,1723,1292,498,330,16774,23118,14819,1292,794,330,14819,3220,32075,578,2768,5865,527,2561,311,499,512,13922,1337,1232,364,1723,518,364,1723,1232,5473,609,1232,364,16778,1747,518,364,4789,1232,364,34192,398,28532,1595,16778,1747,63,449,682,279,2631,5137,449,4495,4595,518,364,14105,1232,5473,13495,1232,5473,609,1232,5473,2150,1232,364,678,518,364,1337,1232,364,928,25762,364,425,1232,5473,2150,1232,364,17166,518,364,1337,1232,364,11924,8439,2186,364,6413,1232,2570,425,518,364,609,4181,364,1337,1232,364,1735,23742,3818,128009,128006,78191,128007,271,5018,609,794,330,16778,1747,498,330,16774,23118,609,794,330,62786,445,81101,498,330,425,794,220,966,3500],"total_duration":1822667750,"load_duration":14204166,"prompt_eval_count":306,"prompt_eval_duration":1057000000,"eval_count":24,"eval_duration":749000000}' - headers: - Content-Length: - - '1859' - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 15 Jan 2025 20:47:19 GMT - http_version: HTTP/1.1 - status_code: 200 -- request: - body: '{"name": "llama3.1"}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '20' - content-type: - - application/json - host: - - localhost:11434 - user-agent: - - litellm/1.57.4 - method: POST - uri: http://localhost:11434/api/show - response: - content: "{\"license\":\"LLAMA 3.1 COMMUNITY LICENSE AGREEMENT\\nLlama 3.1 Version - Release Date: July 23, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions - for use, reproduction, distribution and modification of the\\nLlama Materials - set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals - and documentation accompanying Llama 3.1\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D - or \u201Cyou\u201D means you, or your employer or any other person or entity - (if you are entering into\\nthis Agreement on such person or entity\u2019s behalf), - of the age required under applicable laws, rules or\\nregulations to provide - legal consent and that has legal authority to bind your employer or such other\\nperson - or entity if you are entering in this Agreement on their behalf.\\n\\n\u201CLlama - 3.1\u201D means the foundational large language models and software and algorithms, - including\\nmachine-learning model code, trained model weights, inference-enabling - code, training-enabling code,\\nfine-tuning enabling code and other elements - of the foregoing distributed by Meta at\\nhttps://llama.meta.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.1 and Documentation - (and any\\nportion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, if you are an entity, your\\nprincipal place of business is in the EEA or - Switzerland) and Meta Platforms, Inc. (if you are located\\noutside of the EEA - or Switzerland).\\n\\nBy clicking \u201CI Accept\u201D below or by using or - distributing any portion or element of the Llama Materials,\\nyou agree to be - bound by this Agreement.\\n\\n1. License Rights and Redistribution.\\n\\n a. - Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable - and royalty-free\\nlimited license under Meta\u2019s intellectual property or - other rights owned by Meta embodied in the Llama\\nMaterials to use, reproduce, - distribute, copy, create derivative works of, and make modifications to the\\nLlama - Materials.\\n\\n b. Redistribution and Use.\\n\\n i. If you distribute - or make available the Llama Materials (or any derivative works\\nthereof), or - a product or service (including another AI model) that contains any of them, - you shall (A)\\nprovide a copy of this Agreement with any such Llama Materials; - and (B) prominently display \u201CBuilt with\\nLlama\u201D on a related website, - user interface, blogpost, about page, or product documentation. If you use\\nthe - Llama Materials or any outputs or results of the Llama Materials to create, - train, fine tune, or\\notherwise improve an AI model, which is distributed or - made available, you shall also include \u201CLlama\u201D at\\nthe beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, or - any derivative works thereof, from a Licensee as part \\nof an integrated end - user product, then Section 2 of this Agreement will not apply to you.\\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the following\\nattribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \u201CLlama 3.1 is\\nlicensed under the Llama 3.1 - Community License, Copyright \xA9 Meta Platforms, Inc. All Rights\\nReserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws and - regulations\\n(including trade compliance laws and regulations) and adhere to - the Acceptable Use Policy for the Llama\\nMaterials (available at https://llama.meta.com/llama3_1/use-policy), - which is hereby incorporated by\\nreference into this Agreement.\\n\\n2. Additional - Commercial Terms. If, on the Llama 3.1 version release date, the monthly active - users\\nof the products or services made available by or for Licensee, or Licensee\u2019s - affiliates, is greater than 700\\nmillion monthly active users in the preceding - calendar month, you must request a license from Meta,\\nwhich Meta may grant - to you in its sole discretion, and you are not authorized to exercise any of - the\\nrights under this Agreement unless or until Meta otherwise expressly grants - you such rights.\\n\\n3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE - LAW, THE LLAMA MATERIALS AND ANY\\nOUTPUT AND RESULTS THEREFROM ARE PROVIDED - ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF\\nANY KIND, AND META DISCLAIMS - ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED,\\nINCLUDING, WITHOUT LIMITATION, - ANY WARRANTIES OF TITLE, NON-INFRINGEMENT,\\nMERCHANTABILITY, OR FITNESS FOR - A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR\\nDETERMINING THE APPROPRIATENESS - OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND\\nASSUME ANY RISKS ASSOCIATED - WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND\\nRESULTS.\\n\\n4. Limitation - of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY - OF\\nLIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR - OTHERWISE, ARISING\\nOUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, - SPECIAL, CONSEQUENTIAL,\\nINCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF - META OR ITS AFFILIATES HAVE BEEN ADVISED\\nOF THE POSSIBILITY OF ANY OF THE - FOREGOING.\\n\\n5. Intellectual Property.\\n\\n a. No trademark licenses are - granted under this Agreement, and in connection with the Llama\\nMaterials, - neither Meta nor Licensee may use any name or mark owned by or associated with - the other\\nor any of its affiliates, except as required for reasonable and - customary use in describing and\\nredistributing the Llama Materials or as set - forth in this Section 5(a). Meta hereby grants you a license to\\nuse \u201CLlama\u201D - (the \u201CMark\u201D) solely as required to comply with the last sentence of - Section 1.b.i. You will\\ncomply with Meta\u2019s brand guidelines (currently - accessible at\\nhttps://about.meta.com/brand/resources/meta/company-brand/ ). - All goodwill arising out of your use\\nof the Mark will inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and derivatives - made by or for Meta, with\\nrespect to any derivative works and modifications - of the Llama Materials that are made by you, as\\nbetween you and Meta, you - are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any entity - (including a\\ncross-claim or counterclaim in a lawsuit) alleging that the Llama - Materials or Llama 3.1 outputs or\\nresults, or any portion of any of the foregoing, - constitutes infringement of intellectual property or other\\nrights owned or - licensable by you, then any licenses granted to you under this Agreement shall\\nterminate - as of the date such litigation or claim is filed or instituted. You will indemnify - and hold\\nharmless Meta from and against any claim by any third party arising - out of or related to your use or\\ndistribution of the Llama Materials.\\n\\n6. - Term and Termination. The term of this Agreement will commence upon your acceptance - of this\\nAgreement or access to the Llama Materials and will continue in full - force and effect until terminated in\\naccordance with the terms and conditions - herein. Meta may terminate this Agreement if you are in\\nbreach of any term - or condition of this Agreement. Upon termination of this Agreement, you shall - delete\\nand cease use of the Llama Materials. Sections 3, 4 and 7 shall survive - the termination of this\\nAgreement.\\n\\n7. Governing Law and Jurisdiction. - This Agreement will be governed and construed under the laws of\\nthe State - of California without regard to choice of law principles, and the UN Convention - on Contracts\\nfor the International Sale of Goods does not apply to this Agreement. - The courts of California shall have\\nexclusive jurisdiction of any dispute - arising out of this Agreement.\\n\\n# Llama 3.1 Acceptable Use Policy\\n\\nMeta - is committed to promoting safe and fair use of its tools and features, including - Llama 3.1. If you\\naccess or use Llama 3.1, you agree to this Acceptable Use - Policy (\u201CPolicy\u201D). The most recent copy of\\nthis policy can be found - at [https://llama.meta.com/llama3_1/use-policy](https://llama.meta.com/llama3_1/use-policy)\\n\\n## - Prohibited Uses\\n\\nWe want everyone to use Llama 3.1 safely and responsibly. - You agree you will not use, or allow\\nothers to use, Llama 3.1 to:\\n\\n1. - Violate the law or others\u2019 rights, including to:\\n 1. Engage in, promote, - generate, contribute to, encourage, plan, incite, or further illegal or unlawful - activity or content, such as:\\n 1. Violence or terrorism\\n 2. - Exploitation or harm to children, including the solicitation, creation, acquisition, - or dissemination of child exploitative content or failure to report Child Sexual - Abuse Material\\n 3. Human trafficking, exploitation, and sexual violence\\n - \ 4. The illegal distribution of information or materials to minors, including - obscene materials, or failure to employ legally required age-gating in connection - with such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 3. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 4. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 5. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 6. Collect, process, disclose, generate, - or infer health, demographic, or other sensitive personal or private information - about individuals without rights and consents required by applicable laws\\n - \ 7. Engage in or facilitate any action or generate any content that infringes, - misappropriates, or otherwise violates any third-party rights, including the - outputs or results of any products or services using the Llama Materials\\n - \ 8. Create, generate, or facilitate the creation of malicious code, malware, - computer viruses or do anything else that could disable, overburden, interfere - with or impair the proper working, integrity, operation or appearance of a website - or computer system\\n\\n2. Engage in, promote, incite, facilitate, or assist - in the planning or development of activities that present a risk of death or - bodily harm to individuals, including use of Llama 3.1 related to the following:\\n - \ 1. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State\\n 2. - Guns and illegal weapons (including weapon development)\\n 3. Illegal drugs - and regulated/controlled substances\\n 4. Operation of critical infrastructure, - transportation technologies, or heavy machinery\\n 5. Self-harm or harm to - others, including suicide, cutting, and eating disorders\\n 6. Any content - intended to incite or promote violence, abuse, or any infliction of bodily harm - to an individual\\n\\n3. Intentionally deceive or mislead others, including - use of Llama 3.1 related to the following:\\n 1. Generating, promoting, or - furthering fraud or the creation or promotion of disinformation\\n 2. Generating, - promoting, or furthering defamatory content, including the creation of defamatory - statements, images, or other content\\n 3. Generating, promoting, or further - distributing spam\\n 4. Impersonating another individual without consent, - authorization, or legal right\\n 5. Representing that the use of Llama 3.1 - or outputs are human-generated\\n 6. Generating or facilitating false online - engagement, including fake reviews and other means of fake online engagement\\n\\n4. - Fail to appropriately disclose to end users any known dangers of your AI system\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation\\nof this Policy through one of the following - means:\\n\\n* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://github.com/meta-llama/llama-models/issues)\\n* - Reporting risky content generated by the model: developers.facebook.com/llama_output_feedback\\n* - Reporting bugs and security concerns: facebook.com/whitehat/info\\n* Reporting - violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\\n\",\"modelfile\":\"# - Modelfile generated by \\\"ollama show\\\"\\n# To build a new Modelfile based - on this, replace FROM with:\\n# FROM llama3.1:latest\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-87048bcd55216712ef14c11c2c303728463207b165bf18440b9b84b07ec00f87\\nTEMPLATE - \\\"\\\"\\\"{{ if .Messages }}\\n{{- if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- - if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nYou are - a helpful assistant with tool calling capabilities. When you receive a tool - call response, use the output to format an answer to the orginal use question.\\n{{- - end }}\\u003c|eot_id|\\u003e\\n{{- end }}\\n{{- range $i, $_ := .Messages }}\\n{{- - $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" - }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- if - and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ $.Tools - }}\\n{{- end }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n\\n{{- range .ToolCalls }}{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\n{{- else }}\\n{{- if .System }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\n{{ - .System }}\\u003c|eot_id|\\u003e{{ end }}{{ if .Prompt }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n\\n{{ - .Prompt }}\\u003c|eot_id|\\u003e{{ end }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}{{ .Response }}{{ if .Response }}\\u003c|eot_id|\\u003e{{ end }}\\\"\\\"\\\"\\nPARAMETER - stop \\u003c|start_header_id|\\u003e\\nPARAMETER stop \\u003c|end_header_id|\\u003e\\nPARAMETER - stop \\u003c|eot_id|\\u003e\\nLICENSE \\\"LLAMA 3.1 COMMUNITY LICENSE AGREEMENT\\nLlama - 3.1 Version Release Date: July 23, 2024\\n\\n\u201CAgreement\u201D means the - terms and conditions for use, reproduction, distribution and modification of - the\\nLlama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means - the specifications, manuals and documentation accompanying Llama 3.1\\ndistributed - by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D or - \u201Cyou\u201D means you, or your employer or any other person or entity (if - you are entering into\\nthis Agreement on such person or entity\u2019s behalf), - of the age required under applicable laws, rules or\\nregulations to provide - legal consent and that has legal authority to bind your employer or such other\\nperson - or entity if you are entering in this Agreement on their behalf.\\n\\n\u201CLlama - 3.1\u201D means the foundational large language models and software and algorithms, - including\\nmachine-learning model code, trained model weights, inference-enabling - code, training-enabling code,\\nfine-tuning enabling code and other elements - of the foregoing distributed by Meta at\\nhttps://llama.meta.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.1 and Documentation - (and any\\nportion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, if you are an entity, your\\nprincipal place of business is in the EEA or - Switzerland) and Meta Platforms, Inc. (if you are located\\noutside of the EEA - or Switzerland).\\n\\nBy clicking \u201CI Accept\u201D below or by using or - distributing any portion or element of the Llama Materials,\\nyou agree to be - bound by this Agreement.\\n\\n1. License Rights and Redistribution.\\n\\n a. - Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable - and royalty-free\\nlimited license under Meta\u2019s intellectual property or - other rights owned by Meta embodied in the Llama\\nMaterials to use, reproduce, - distribute, copy, create derivative works of, and make modifications to the\\nLlama - Materials.\\n\\n b. Redistribution and Use.\\n\\n i. If you distribute - or make available the Llama Materials (or any derivative works\\nthereof), or - a product or service (including another AI model) that contains any of them, - you shall (A)\\nprovide a copy of this Agreement with any such Llama Materials; - and (B) prominently display \u201CBuilt with\\nLlama\u201D on a related website, - user interface, blogpost, about page, or product documentation. If you use\\nthe - Llama Materials or any outputs or results of the Llama Materials to create, - train, fine tune, or\\notherwise improve an AI model, which is distributed or - made available, you shall also include \u201CLlama\u201D at\\nthe beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, or - any derivative works thereof, from a Licensee as part \\nof an integrated end - user product, then Section 2 of this Agreement will not apply to you.\\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the following\\nattribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \u201CLlama 3.1 is\\nlicensed under the Llama 3.1 - Community License, Copyright \xA9 Meta Platforms, Inc. All Rights\\nReserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws and - regulations\\n(including trade compliance laws and regulations) and adhere to - the Acceptable Use Policy for the Llama\\nMaterials (available at https://llama.meta.com/llama3_1/use-policy), - which is hereby incorporated by\\nreference into this Agreement.\\n\\n2. Additional - Commercial Terms. If, on the Llama 3.1 version release date, the monthly active - users\\nof the products or services made available by or for Licensee, or Licensee\u2019s - affiliates, is greater than 700\\nmillion monthly active users in the preceding - calendar month, you must request a license from Meta,\\nwhich Meta may grant - to you in its sole discretion, and you are not authorized to exercise any of - the\\nrights under this Agreement unless or until Meta otherwise expressly grants - you such rights.\\n\\n3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE - LAW, THE LLAMA MATERIALS AND ANY\\nOUTPUT AND RESULTS THEREFROM ARE PROVIDED - ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF\\nANY KIND, AND META DISCLAIMS - ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED,\\nINCLUDING, WITHOUT LIMITATION, - ANY WARRANTIES OF TITLE, NON-INFRINGEMENT,\\nMERCHANTABILITY, OR FITNESS FOR - A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR\\nDETERMINING THE APPROPRIATENESS - OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND\\nASSUME ANY RISKS ASSOCIATED - WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND\\nRESULTS.\\n\\n4. Limitation - of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY - OF\\nLIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR - OTHERWISE, ARISING\\nOUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, - SPECIAL, CONSEQUENTIAL,\\nINCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF - META OR ITS AFFILIATES HAVE BEEN ADVISED\\nOF THE POSSIBILITY OF ANY OF THE - FOREGOING.\\n\\n5. Intellectual Property.\\n\\n a. No trademark licenses are - granted under this Agreement, and in connection with the Llama\\nMaterials, - neither Meta nor Licensee may use any name or mark owned by or associated with - the other\\nor any of its affiliates, except as required for reasonable and - customary use in describing and\\nredistributing the Llama Materials or as set - forth in this Section 5(a). Meta hereby grants you a license to\\nuse \u201CLlama\u201D - (the \u201CMark\u201D) solely as required to comply with the last sentence of - Section 1.b.i. You will\\ncomply with Meta\u2019s brand guidelines (currently - accessible at\\nhttps://about.meta.com/brand/resources/meta/company-brand/ ). - All goodwill arising out of your use\\nof the Mark will inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and derivatives - made by or for Meta, with\\nrespect to any derivative works and modifications - of the Llama Materials that are made by you, as\\nbetween you and Meta, you - are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any entity - (including a\\ncross-claim or counterclaim in a lawsuit) alleging that the Llama - Materials or Llama 3.1 outputs or\\nresults, or any portion of any of the foregoing, - constitutes infringement of intellectual property or other\\nrights owned or - licensable by you, then any licenses granted to you under this Agreement shall\\nterminate - as of the date such litigation or claim is filed or instituted. You will indemnify - and hold\\nharmless Meta from and against any claim by any third party arising - out of or related to your use or\\ndistribution of the Llama Materials.\\n\\n6. - Term and Termination. The term of this Agreement will commence upon your acceptance - of this\\nAgreement or access to the Llama Materials and will continue in full - force and effect until terminated in\\naccordance with the terms and conditions - herein. Meta may terminate this Agreement if you are in\\nbreach of any term - or condition of this Agreement. Upon termination of this Agreement, you shall - delete\\nand cease use of the Llama Materials. Sections 3, 4 and 7 shall survive - the termination of this\\nAgreement.\\n\\n7. Governing Law and Jurisdiction. - This Agreement will be governed and construed under the laws of\\nthe State - of California without regard to choice of law principles, and the UN Convention - on Contracts\\nfor the International Sale of Goods does not apply to this Agreement. - The courts of California shall have\\nexclusive jurisdiction of any dispute - arising out of this Agreement.\\n\\n# Llama 3.1 Acceptable Use Policy\\n\\nMeta - is committed to promoting safe and fair use of its tools and features, including - Llama 3.1. If you\\naccess or use Llama 3.1, you agree to this Acceptable Use - Policy (\u201CPolicy\u201D). The most recent copy of\\nthis policy can be found - at [https://llama.meta.com/llama3_1/use-policy](https://llama.meta.com/llama3_1/use-policy)\\n\\n## - Prohibited Uses\\n\\nWe want everyone to use Llama 3.1 safely and responsibly. - You agree you will not use, or allow\\nothers to use, Llama 3.1 to:\\n\\n1. - Violate the law or others\u2019 rights, including to:\\n 1. Engage in, promote, - generate, contribute to, encourage, plan, incite, or further illegal or unlawful - activity or content, such as:\\n 1. Violence or terrorism\\n 2. - Exploitation or harm to children, including the solicitation, creation, acquisition, - or dissemination of child exploitative content or failure to report Child Sexual - Abuse Material\\n 3. Human trafficking, exploitation, and sexual violence\\n - \ 4. The illegal distribution of information or materials to minors, including - obscene materials, or failure to employ legally required age-gating in connection - with such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 3. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 4. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 5. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 6. Collect, process, disclose, generate, - or infer health, demographic, or other sensitive personal or private information - about individuals without rights and consents required by applicable laws\\n - \ 7. Engage in or facilitate any action or generate any content that infringes, - misappropriates, or otherwise violates any third-party rights, including the - outputs or results of any products or services using the Llama Materials\\n - \ 8. Create, generate, or facilitate the creation of malicious code, malware, - computer viruses or do anything else that could disable, overburden, interfere - with or impair the proper working, integrity, operation or appearance of a website - or computer system\\n\\n2. Engage in, promote, incite, facilitate, or assist - in the planning or development of activities that present a risk of death or - bodily harm to individuals, including use of Llama 3.1 related to the following:\\n - \ 1. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State\\n 2. - Guns and illegal weapons (including weapon development)\\n 3. Illegal drugs - and regulated/controlled substances\\n 4. Operation of critical infrastructure, - transportation technologies, or heavy machinery\\n 5. Self-harm or harm to - others, including suicide, cutting, and eating disorders\\n 6. Any content - intended to incite or promote violence, abuse, or any infliction of bodily harm - to an individual\\n\\n3. Intentionally deceive or mislead others, including - use of Llama 3.1 related to the following:\\n 1. Generating, promoting, or - furthering fraud or the creation or promotion of disinformation\\n 2. Generating, - promoting, or furthering defamatory content, including the creation of defamatory - statements, images, or other content\\n 3. Generating, promoting, or further - distributing spam\\n 4. Impersonating another individual without consent, - authorization, or legal right\\n 5. Representing that the use of Llama 3.1 - or outputs are human-generated\\n 6. Generating or facilitating false online - engagement, including fake reviews and other means of fake online engagement\\n\\n4. - Fail to appropriately disclose to end users any known dangers of your AI system\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation\\nof this Policy through one of the following - means:\\n\\n* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://github.com/meta-llama/llama-models/issues)\\n* - Reporting risky content generated by the model: developers.facebook.com/llama_output_feedback\\n* - Reporting bugs and security concerns: facebook.com/whitehat/info\\n* Reporting - violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\\n\\\"\\n\",\"parameters\":\"stop - \ \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop - \ \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"{{ - if .Messages }}\\n{{- if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- - if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nYou are - a helpful assistant with tool calling capabilities. When you receive a tool - call response, use the output to format an answer to the orginal use question.\\n{{- - end }}\\u003c|eot_id|\\u003e\\n{{- end }}\\n{{- range $i, $_ := .Messages }}\\n{{- - $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" - }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- if - and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ $.Tools - }}\\n{{- end }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n\\n{{- range .ToolCalls }}{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\n{{- else }}\\n{{- if .System }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\n{{ - .System }}\\u003c|eot_id|\\u003e{{ end }}{{ if .Prompt }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n\\n{{ - .Prompt }}\\u003c|eot_id|\\u003e{{ end }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}{{ .Response }}{{ if .Response }}\\u003c|eot_id|\\u003e{{ end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"8.0B\",\"quantization_level\":\"Q4_0\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Meta-Llama-3.1\",\"general.file_type\":2,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.license\":\"llama3.1\",\"general.parameter_count\":8030261248,\"general.quantization_version\":2,\"general.size_label\":\"8B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":32,\"llama.attention.head_count_kv\":8,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.block_count\":32,\"llama.context_length\":131072,\"llama.embedding_length\":4096,\"llama.feed_forward_length\":14336,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-08-01T11:38:16.96106256-04:00\"}" - headers: - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 15 Jan 2025 20:47:19 GMT - Transfer-Encoding: - - chunked - http_version: HTTP/1.1 - status_code: 200 -- request: - body: '{"name": "llama3.1"}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '20' - content-type: - - application/json - host: - - localhost:11434 - user-agent: - - litellm/1.57.4 - method: POST - uri: http://localhost:11434/api/show - response: - content: "{\"license\":\"LLAMA 3.1 COMMUNITY LICENSE AGREEMENT\\nLlama 3.1 Version - Release Date: July 23, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions - for use, reproduction, distribution and modification of the\\nLlama Materials - set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals - and documentation accompanying Llama 3.1\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D - or \u201Cyou\u201D means you, or your employer or any other person or entity - (if you are entering into\\nthis Agreement on such person or entity\u2019s behalf), - of the age required under applicable laws, rules or\\nregulations to provide - legal consent and that has legal authority to bind your employer or such other\\nperson - or entity if you are entering in this Agreement on their behalf.\\n\\n\u201CLlama - 3.1\u201D means the foundational large language models and software and algorithms, - including\\nmachine-learning model code, trained model weights, inference-enabling - code, training-enabling code,\\nfine-tuning enabling code and other elements - of the foregoing distributed by Meta at\\nhttps://llama.meta.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.1 and Documentation - (and any\\nportion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, if you are an entity, your\\nprincipal place of business is in the EEA or - Switzerland) and Meta Platforms, Inc. (if you are located\\noutside of the EEA - or Switzerland).\\n\\nBy clicking \u201CI Accept\u201D below or by using or - distributing any portion or element of the Llama Materials,\\nyou agree to be - bound by this Agreement.\\n\\n1. License Rights and Redistribution.\\n\\n a. - Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable - and royalty-free\\nlimited license under Meta\u2019s intellectual property or - other rights owned by Meta embodied in the Llama\\nMaterials to use, reproduce, - distribute, copy, create derivative works of, and make modifications to the\\nLlama - Materials.\\n\\n b. Redistribution and Use.\\n\\n i. If you distribute - or make available the Llama Materials (or any derivative works\\nthereof), or - a product or service (including another AI model) that contains any of them, - you shall (A)\\nprovide a copy of this Agreement with any such Llama Materials; - and (B) prominently display \u201CBuilt with\\nLlama\u201D on a related website, - user interface, blogpost, about page, or product documentation. If you use\\nthe - Llama Materials or any outputs or results of the Llama Materials to create, - train, fine tune, or\\notherwise improve an AI model, which is distributed or - made available, you shall also include \u201CLlama\u201D at\\nthe beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, or - any derivative works thereof, from a Licensee as part \\nof an integrated end - user product, then Section 2 of this Agreement will not apply to you.\\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the following\\nattribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \u201CLlama 3.1 is\\nlicensed under the Llama 3.1 - Community License, Copyright \xA9 Meta Platforms, Inc. All Rights\\nReserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws and - regulations\\n(including trade compliance laws and regulations) and adhere to - the Acceptable Use Policy for the Llama\\nMaterials (available at https://llama.meta.com/llama3_1/use-policy), - which is hereby incorporated by\\nreference into this Agreement.\\n\\n2. Additional - Commercial Terms. If, on the Llama 3.1 version release date, the monthly active - users\\nof the products or services made available by or for Licensee, or Licensee\u2019s - affiliates, is greater than 700\\nmillion monthly active users in the preceding - calendar month, you must request a license from Meta,\\nwhich Meta may grant - to you in its sole discretion, and you are not authorized to exercise any of - the\\nrights under this Agreement unless or until Meta otherwise expressly grants - you such rights.\\n\\n3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE - LAW, THE LLAMA MATERIALS AND ANY\\nOUTPUT AND RESULTS THEREFROM ARE PROVIDED - ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF\\nANY KIND, AND META DISCLAIMS - ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED,\\nINCLUDING, WITHOUT LIMITATION, - ANY WARRANTIES OF TITLE, NON-INFRINGEMENT,\\nMERCHANTABILITY, OR FITNESS FOR - A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR\\nDETERMINING THE APPROPRIATENESS - OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND\\nASSUME ANY RISKS ASSOCIATED - WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND\\nRESULTS.\\n\\n4. Limitation - of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY - OF\\nLIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR - OTHERWISE, ARISING\\nOUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, - SPECIAL, CONSEQUENTIAL,\\nINCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF - META OR ITS AFFILIATES HAVE BEEN ADVISED\\nOF THE POSSIBILITY OF ANY OF THE - FOREGOING.\\n\\n5. Intellectual Property.\\n\\n a. No trademark licenses are - granted under this Agreement, and in connection with the Llama\\nMaterials, - neither Meta nor Licensee may use any name or mark owned by or associated with - the other\\nor any of its affiliates, except as required for reasonable and - customary use in describing and\\nredistributing the Llama Materials or as set - forth in this Section 5(a). Meta hereby grants you a license to\\nuse \u201CLlama\u201D - (the \u201CMark\u201D) solely as required to comply with the last sentence of - Section 1.b.i. You will\\ncomply with Meta\u2019s brand guidelines (currently - accessible at\\nhttps://about.meta.com/brand/resources/meta/company-brand/ ). - All goodwill arising out of your use\\nof the Mark will inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and derivatives - made by or for Meta, with\\nrespect to any derivative works and modifications - of the Llama Materials that are made by you, as\\nbetween you and Meta, you - are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any entity - (including a\\ncross-claim or counterclaim in a lawsuit) alleging that the Llama - Materials or Llama 3.1 outputs or\\nresults, or any portion of any of the foregoing, - constitutes infringement of intellectual property or other\\nrights owned or - licensable by you, then any licenses granted to you under this Agreement shall\\nterminate - as of the date such litigation or claim is filed or instituted. You will indemnify - and hold\\nharmless Meta from and against any claim by any third party arising - out of or related to your use or\\ndistribution of the Llama Materials.\\n\\n6. - Term and Termination. The term of this Agreement will commence upon your acceptance - of this\\nAgreement or access to the Llama Materials and will continue in full - force and effect until terminated in\\naccordance with the terms and conditions - herein. Meta may terminate this Agreement if you are in\\nbreach of any term - or condition of this Agreement. Upon termination of this Agreement, you shall - delete\\nand cease use of the Llama Materials. Sections 3, 4 and 7 shall survive - the termination of this\\nAgreement.\\n\\n7. Governing Law and Jurisdiction. - This Agreement will be governed and construed under the laws of\\nthe State - of California without regard to choice of law principles, and the UN Convention - on Contracts\\nfor the International Sale of Goods does not apply to this Agreement. - The courts of California shall have\\nexclusive jurisdiction of any dispute - arising out of this Agreement.\\n\\n# Llama 3.1 Acceptable Use Policy\\n\\nMeta - is committed to promoting safe and fair use of its tools and features, including - Llama 3.1. If you\\naccess or use Llama 3.1, you agree to this Acceptable Use - Policy (\u201CPolicy\u201D). The most recent copy of\\nthis policy can be found - at [https://llama.meta.com/llama3_1/use-policy](https://llama.meta.com/llama3_1/use-policy)\\n\\n## - Prohibited Uses\\n\\nWe want everyone to use Llama 3.1 safely and responsibly. - You agree you will not use, or allow\\nothers to use, Llama 3.1 to:\\n\\n1. - Violate the law or others\u2019 rights, including to:\\n 1. Engage in, promote, - generate, contribute to, encourage, plan, incite, or further illegal or unlawful - activity or content, such as:\\n 1. Violence or terrorism\\n 2. - Exploitation or harm to children, including the solicitation, creation, acquisition, - or dissemination of child exploitative content or failure to report Child Sexual - Abuse Material\\n 3. Human trafficking, exploitation, and sexual violence\\n - \ 4. The illegal distribution of information or materials to minors, including - obscene materials, or failure to employ legally required age-gating in connection - with such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 3. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 4. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 5. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 6. Collect, process, disclose, generate, - or infer health, demographic, or other sensitive personal or private information - about individuals without rights and consents required by applicable laws\\n - \ 7. Engage in or facilitate any action or generate any content that infringes, - misappropriates, or otherwise violates any third-party rights, including the - outputs or results of any products or services using the Llama Materials\\n - \ 8. Create, generate, or facilitate the creation of malicious code, malware, - computer viruses or do anything else that could disable, overburden, interfere - with or impair the proper working, integrity, operation or appearance of a website - or computer system\\n\\n2. Engage in, promote, incite, facilitate, or assist - in the planning or development of activities that present a risk of death or - bodily harm to individuals, including use of Llama 3.1 related to the following:\\n - \ 1. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State\\n 2. - Guns and illegal weapons (including weapon development)\\n 3. Illegal drugs - and regulated/controlled substances\\n 4. Operation of critical infrastructure, - transportation technologies, or heavy machinery\\n 5. Self-harm or harm to - others, including suicide, cutting, and eating disorders\\n 6. Any content - intended to incite or promote violence, abuse, or any infliction of bodily harm - to an individual\\n\\n3. Intentionally deceive or mislead others, including - use of Llama 3.1 related to the following:\\n 1. Generating, promoting, or - furthering fraud or the creation or promotion of disinformation\\n 2. Generating, - promoting, or furthering defamatory content, including the creation of defamatory - statements, images, or other content\\n 3. Generating, promoting, or further - distributing spam\\n 4. Impersonating another individual without consent, - authorization, or legal right\\n 5. Representing that the use of Llama 3.1 - or outputs are human-generated\\n 6. Generating or facilitating false online - engagement, including fake reviews and other means of fake online engagement\\n\\n4. - Fail to appropriately disclose to end users any known dangers of your AI system\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation\\nof this Policy through one of the following - means:\\n\\n* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://github.com/meta-llama/llama-models/issues)\\n* - Reporting risky content generated by the model: developers.facebook.com/llama_output_feedback\\n* - Reporting bugs and security concerns: facebook.com/whitehat/info\\n* Reporting - violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\\n\",\"modelfile\":\"# - Modelfile generated by \\\"ollama show\\\"\\n# To build a new Modelfile based - on this, replace FROM with:\\n# FROM llama3.1:latest\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-87048bcd55216712ef14c11c2c303728463207b165bf18440b9b84b07ec00f87\\nTEMPLATE - \\\"\\\"\\\"{{ if .Messages }}\\n{{- if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- - if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nYou are - a helpful assistant with tool calling capabilities. When you receive a tool - call response, use the output to format an answer to the orginal use question.\\n{{- - end }}\\u003c|eot_id|\\u003e\\n{{- end }}\\n{{- range $i, $_ := .Messages }}\\n{{- - $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" - }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- if - and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ $.Tools - }}\\n{{- end }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n\\n{{- range .ToolCalls }}{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\n{{- else }}\\n{{- if .System }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\n{{ - .System }}\\u003c|eot_id|\\u003e{{ end }}{{ if .Prompt }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n\\n{{ - .Prompt }}\\u003c|eot_id|\\u003e{{ end }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}{{ .Response }}{{ if .Response }}\\u003c|eot_id|\\u003e{{ end }}\\\"\\\"\\\"\\nPARAMETER - stop \\u003c|start_header_id|\\u003e\\nPARAMETER stop \\u003c|end_header_id|\\u003e\\nPARAMETER - stop \\u003c|eot_id|\\u003e\\nLICENSE \\\"LLAMA 3.1 COMMUNITY LICENSE AGREEMENT\\nLlama - 3.1 Version Release Date: July 23, 2024\\n\\n\u201CAgreement\u201D means the - terms and conditions for use, reproduction, distribution and modification of - the\\nLlama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means - the specifications, manuals and documentation accompanying Llama 3.1\\ndistributed - by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D or - \u201Cyou\u201D means you, or your employer or any other person or entity (if - you are entering into\\nthis Agreement on such person or entity\u2019s behalf), - of the age required under applicable laws, rules or\\nregulations to provide - legal consent and that has legal authority to bind your employer or such other\\nperson - or entity if you are entering in this Agreement on their behalf.\\n\\n\u201CLlama - 3.1\u201D means the foundational large language models and software and algorithms, - including\\nmachine-learning model code, trained model weights, inference-enabling - code, training-enabling code,\\nfine-tuning enabling code and other elements - of the foregoing distributed by Meta at\\nhttps://llama.meta.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.1 and Documentation - (and any\\nportion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, if you are an entity, your\\nprincipal place of business is in the EEA or - Switzerland) and Meta Platforms, Inc. (if you are located\\noutside of the EEA - or Switzerland).\\n\\nBy clicking \u201CI Accept\u201D below or by using or - distributing any portion or element of the Llama Materials,\\nyou agree to be - bound by this Agreement.\\n\\n1. License Rights and Redistribution.\\n\\n a. - Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable - and royalty-free\\nlimited license under Meta\u2019s intellectual property or - other rights owned by Meta embodied in the Llama\\nMaterials to use, reproduce, - distribute, copy, create derivative works of, and make modifications to the\\nLlama - Materials.\\n\\n b. Redistribution and Use.\\n\\n i. If you distribute - or make available the Llama Materials (or any derivative works\\nthereof), or - a product or service (including another AI model) that contains any of them, - you shall (A)\\nprovide a copy of this Agreement with any such Llama Materials; - and (B) prominently display \u201CBuilt with\\nLlama\u201D on a related website, - user interface, blogpost, about page, or product documentation. If you use\\nthe - Llama Materials or any outputs or results of the Llama Materials to create, - train, fine tune, or\\notherwise improve an AI model, which is distributed or - made available, you shall also include \u201CLlama\u201D at\\nthe beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, or - any derivative works thereof, from a Licensee as part \\nof an integrated end - user product, then Section 2 of this Agreement will not apply to you.\\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the following\\nattribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \u201CLlama 3.1 is\\nlicensed under the Llama 3.1 - Community License, Copyright \xA9 Meta Platforms, Inc. All Rights\\nReserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws and - regulations\\n(including trade compliance laws and regulations) and adhere to - the Acceptable Use Policy for the Llama\\nMaterials (available at https://llama.meta.com/llama3_1/use-policy), - which is hereby incorporated by\\nreference into this Agreement.\\n\\n2. Additional - Commercial Terms. If, on the Llama 3.1 version release date, the monthly active - users\\nof the products or services made available by or for Licensee, or Licensee\u2019s - affiliates, is greater than 700\\nmillion monthly active users in the preceding - calendar month, you must request a license from Meta,\\nwhich Meta may grant - to you in its sole discretion, and you are not authorized to exercise any of - the\\nrights under this Agreement unless or until Meta otherwise expressly grants - you such rights.\\n\\n3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE - LAW, THE LLAMA MATERIALS AND ANY\\nOUTPUT AND RESULTS THEREFROM ARE PROVIDED - ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF\\nANY KIND, AND META DISCLAIMS - ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED,\\nINCLUDING, WITHOUT LIMITATION, - ANY WARRANTIES OF TITLE, NON-INFRINGEMENT,\\nMERCHANTABILITY, OR FITNESS FOR - A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR\\nDETERMINING THE APPROPRIATENESS - OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND\\nASSUME ANY RISKS ASSOCIATED - WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND\\nRESULTS.\\n\\n4. Limitation - of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY - OF\\nLIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR - OTHERWISE, ARISING\\nOUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, - SPECIAL, CONSEQUENTIAL,\\nINCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF - META OR ITS AFFILIATES HAVE BEEN ADVISED\\nOF THE POSSIBILITY OF ANY OF THE - FOREGOING.\\n\\n5. Intellectual Property.\\n\\n a. No trademark licenses are - granted under this Agreement, and in connection with the Llama\\nMaterials, - neither Meta nor Licensee may use any name or mark owned by or associated with - the other\\nor any of its affiliates, except as required for reasonable and - customary use in describing and\\nredistributing the Llama Materials or as set - forth in this Section 5(a). Meta hereby grants you a license to\\nuse \u201CLlama\u201D - (the \u201CMark\u201D) solely as required to comply with the last sentence of - Section 1.b.i. You will\\ncomply with Meta\u2019s brand guidelines (currently - accessible at\\nhttps://about.meta.com/brand/resources/meta/company-brand/ ). - All goodwill arising out of your use\\nof the Mark will inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and derivatives - made by or for Meta, with\\nrespect to any derivative works and modifications - of the Llama Materials that are made by you, as\\nbetween you and Meta, you - are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any entity - (including a\\ncross-claim or counterclaim in a lawsuit) alleging that the Llama - Materials or Llama 3.1 outputs or\\nresults, or any portion of any of the foregoing, - constitutes infringement of intellectual property or other\\nrights owned or - licensable by you, then any licenses granted to you under this Agreement shall\\nterminate - as of the date such litigation or claim is filed or instituted. You will indemnify - and hold\\nharmless Meta from and against any claim by any third party arising - out of or related to your use or\\ndistribution of the Llama Materials.\\n\\n6. - Term and Termination. The term of this Agreement will commence upon your acceptance - of this\\nAgreement or access to the Llama Materials and will continue in full - force and effect until terminated in\\naccordance with the terms and conditions - herein. Meta may terminate this Agreement if you are in\\nbreach of any term - or condition of this Agreement. Upon termination of this Agreement, you shall - delete\\nand cease use of the Llama Materials. Sections 3, 4 and 7 shall survive - the termination of this\\nAgreement.\\n\\n7. Governing Law and Jurisdiction. - This Agreement will be governed and construed under the laws of\\nthe State - of California without regard to choice of law principles, and the UN Convention - on Contracts\\nfor the International Sale of Goods does not apply to this Agreement. - The courts of California shall have\\nexclusive jurisdiction of any dispute - arising out of this Agreement.\\n\\n# Llama 3.1 Acceptable Use Policy\\n\\nMeta - is committed to promoting safe and fair use of its tools and features, including - Llama 3.1. If you\\naccess or use Llama 3.1, you agree to this Acceptable Use - Policy (\u201CPolicy\u201D). The most recent copy of\\nthis policy can be found - at [https://llama.meta.com/llama3_1/use-policy](https://llama.meta.com/llama3_1/use-policy)\\n\\n## - Prohibited Uses\\n\\nWe want everyone to use Llama 3.1 safely and responsibly. - You agree you will not use, or allow\\nothers to use, Llama 3.1 to:\\n\\n1. - Violate the law or others\u2019 rights, including to:\\n 1. Engage in, promote, - generate, contribute to, encourage, plan, incite, or further illegal or unlawful - activity or content, such as:\\n 1. Violence or terrorism\\n 2. - Exploitation or harm to children, including the solicitation, creation, acquisition, - or dissemination of child exploitative content or failure to report Child Sexual - Abuse Material\\n 3. Human trafficking, exploitation, and sexual violence\\n - \ 4. The illegal distribution of information or materials to minors, including - obscene materials, or failure to employ legally required age-gating in connection - with such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 3. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 4. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 5. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 6. Collect, process, disclose, generate, - or infer health, demographic, or other sensitive personal or private information - about individuals without rights and consents required by applicable laws\\n - \ 7. Engage in or facilitate any action or generate any content that infringes, - misappropriates, or otherwise violates any third-party rights, including the - outputs or results of any products or services using the Llama Materials\\n - \ 8. Create, generate, or facilitate the creation of malicious code, malware, - computer viruses or do anything else that could disable, overburden, interfere - with or impair the proper working, integrity, operation or appearance of a website - or computer system\\n\\n2. Engage in, promote, incite, facilitate, or assist - in the planning or development of activities that present a risk of death or - bodily harm to individuals, including use of Llama 3.1 related to the following:\\n - \ 1. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State\\n 2. - Guns and illegal weapons (including weapon development)\\n 3. Illegal drugs - and regulated/controlled substances\\n 4. Operation of critical infrastructure, - transportation technologies, or heavy machinery\\n 5. Self-harm or harm to - others, including suicide, cutting, and eating disorders\\n 6. Any content - intended to incite or promote violence, abuse, or any infliction of bodily harm - to an individual\\n\\n3. Intentionally deceive or mislead others, including - use of Llama 3.1 related to the following:\\n 1. Generating, promoting, or - furthering fraud or the creation or promotion of disinformation\\n 2. Generating, - promoting, or furthering defamatory content, including the creation of defamatory - statements, images, or other content\\n 3. Generating, promoting, or further - distributing spam\\n 4. Impersonating another individual without consent, - authorization, or legal right\\n 5. Representing that the use of Llama 3.1 - or outputs are human-generated\\n 6. Generating or facilitating false online - engagement, including fake reviews and other means of fake online engagement\\n\\n4. - Fail to appropriately disclose to end users any known dangers of your AI system\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation\\nof this Policy through one of the following - means:\\n\\n* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://github.com/meta-llama/llama-models/issues)\\n* - Reporting risky content generated by the model: developers.facebook.com/llama_output_feedback\\n* - Reporting bugs and security concerns: facebook.com/whitehat/info\\n* Reporting - violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com\\n\\\"\\n\",\"parameters\":\"stop - \ \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop - \ \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"{{ - if .Messages }}\\n{{- if or .System .Tools }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n{{- - if .System }}\\n\\n{{ .System }}\\n{{- end }}\\n{{- if .Tools }}\\n\\nYou are - a helpful assistant with tool calling capabilities. When you receive a tool - call response, use the output to format an answer to the orginal use question.\\n{{- - end }}\\u003c|eot_id|\\u003e\\n{{- end }}\\n{{- range $i, $_ := .Messages }}\\n{{- - $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- if eq .Role \\\"user\\\" - }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- if - and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ $.Tools - }}\\n{{- end }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n\\n{{- range .ToolCalls }}{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\n{{- else }}\\n{{- if .System }}\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\n{{ - .System }}\\u003c|eot_id|\\u003e{{ end }}{{ if .Prompt }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n\\n{{ - .Prompt }}\\u003c|eot_id|\\u003e{{ end }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}{{ .Response }}{{ if .Response }}\\u003c|eot_id|\\u003e{{ end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"8.0B\",\"quantization_level\":\"Q4_0\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Meta-Llama-3.1\",\"general.file_type\":2,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.license\":\"llama3.1\",\"general.parameter_count\":8030261248,\"general.quantization_version\":2,\"general.size_label\":\"8B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":32,\"llama.attention.head_count_kv\":8,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.block_count\":32,\"llama.context_length\":131072,\"llama.embedding_length\":4096,\"llama.feed_forward_length\":14336,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-08-01T11:38:16.96106256-04:00\"}" - headers: - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 15 Jan 2025 20:47:19 GMT + - Fri, 21 Feb 2025 02:58:15 GMT Transfer-Encoding: - chunked http_version: HTTP/1.1 diff --git a/tests/utilities/cassettes/test_converter_with_llama3_2_model.yaml b/tests/utilities/cassettes/test_converter_with_llama3_2_model.yaml index fdcb661a8..d538308ca 100644 --- a/tests/utilities/cassettes/test_converter_with_llama3_2_model.yaml +++ b/tests/utilities/cassettes/test_converter_with_llama3_2_model.yaml @@ -1,14 +1,9 @@ interactions: - request: - body: '{"model": "llama3.2:3b", "prompt": "### User:\nName: Alice Llama, Age: - 30\n\n### System:\nProduce JSON OUTPUT ONLY! Adhere to this format {\"name\": - \"function_name\", \"arguments\":{\"argument_name\": \"argument_value\"}} The - following functions are available to you:\n{''type'': ''function'', ''function'': - {''name'': ''SimpleModel'', ''description'': ''Correctly extracted `SimpleModel` - with all the required parameters with correct types'', ''parameters'': {''properties'': - {''name'': {''title'': ''Name'', ''type'': ''string''}, ''age'': {''title'': - ''Age'', ''type'': ''integer''}}, ''required'': [''age'', ''name''], ''type'': - ''object''}}}\n\n\n", "options": {}, "stream": false, "format": "json"}' + body: '{"model": "llama3.2:3b", "prompt": "### System:\nPlease convert the following + text into valid JSON.\n\nOutput ONLY the valid JSON and nothing else.\n\nThe + JSON must follow this format exactly:\n{\n \"name\": str,\n \"age\": int\n}\n\n### + User:\nName: Alice Llama, Age: 30\n\n", "options": {"stop": []}, "stream": false}' headers: accept: - '*/*' @@ -17,23 +12,23 @@ interactions: connection: - keep-alive content-length: - - '657' + - '321' host: - localhost:11434 user-agent: - - litellm/1.57.4 + - litellm/1.60.2 method: POST uri: http://localhost:11434/api/generate response: - content: '{"model":"llama3.2:3b","created_at":"2025-01-15T20:47:11.926411Z","response":"{\"name\": - \"SimpleModel\", \"arguments\":{\"name\": \"Alice Llama\", \"age\": 30}}","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,2724,512,678,25,30505,445,81101,11,13381,25,220,966,271,14711,744,512,1360,13677,4823,32090,27785,0,2467,6881,311,420,3645,5324,609,794,330,1723,1292,498,330,16774,23118,14819,1292,794,330,14819,3220,32075,578,2768,5865,527,2561,311,499,512,13922,1337,1232,364,1723,518,364,1723,1232,5473,609,1232,364,16778,1747,518,364,4789,1232,364,34192,398,28532,1595,16778,1747,63,449,682,279,2631,5137,449,4495,4595,518,364,14105,1232,5473,13495,1232,5473,609,1232,5473,2150,1232,364,678,518,364,1337,1232,364,928,25762,364,425,1232,5473,2150,1232,364,17166,518,364,1337,1232,364,11924,8439,2186,364,6413,1232,2570,425,518,364,609,4181,364,1337,1232,364,1735,23742,3818,128009,128006,78191,128007,271,5018,609,794,330,16778,1747,498,330,16774,23118,609,794,330,62786,445,81101,498,330,425,794,220,966,3500],"total_duration":3374470708,"load_duration":1075750500,"prompt_eval_count":167,"prompt_eval_duration":1871000000,"eval_count":24,"eval_duration":426000000}' + content: '{"model":"llama3.2:3b","created_at":"2025-02-21T02:57:55.059392Z","response":"{\"name\": + \"Alice Llama\", \"age\": 30}","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,744,512,5618,5625,279,2768,1495,1139,2764,4823,382,5207,27785,279,2764,4823,323,4400,775,382,791,4823,2011,1833,420,3645,7041,512,517,220,330,609,794,610,345,220,330,425,794,528,198,633,14711,2724,512,678,25,30505,445,81101,11,13381,25,220,966,271,128009,128006,78191,128007,271,5018,609,794,330,62786,445,81101,498,330,425,794,220,966,92],"total_duration":4675906000,"load_duration":836091458,"prompt_eval_count":82,"prompt_eval_duration":3561000000,"eval_count":15,"eval_duration":275000000}' headers: Content-Length: - - '1263' + - '761' Content-Type: - application/json; charset=utf-8 Date: - - Wed, 15 Jan 2025 20:47:12 GMT + - Fri, 21 Feb 2025 02:57:55 GMT http_version: HTTP/1.1 status_code: 200 - request: @@ -52,7 +47,7 @@ interactions: host: - localhost:11434 user-agent: - - litellm/1.57.4 + - litellm/1.60.2 method: POST uri: http://localhost:11434/api/show response: @@ -228,7 +223,7 @@ interactions: Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama 3.2: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama show\\\"\\n# To build a new Modelfile based on this, replace FROM with:\\n# - FROM llama3.2:3b\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE + FROM llama3.2:3b\\n\\nFROM /Users/joaomoura/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE \\\"\\\"\\\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- if .Tools }}When you receive a tool call response, use the output to format @@ -441,12 +436,12 @@ interactions: .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-12-31T11:53:14.529771974-05:00\"}" + end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2025-02-20T18:55:09.150577031-08:00\"}" headers: Content-Type: - application/json; charset=utf-8 Date: - - Wed, 15 Jan 2025 20:47:12 GMT + - Fri, 21 Feb 2025 02:57:55 GMT Transfer-Encoding: - chunked http_version: HTTP/1.1 @@ -467,7 +462,7 @@ interactions: host: - localhost:11434 user-agent: - - litellm/1.57.4 + - litellm/1.60.2 method: POST uri: http://localhost:11434/api/show response: @@ -643,7 +638,7 @@ interactions: Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama 3.2: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama show\\\"\\n# To build a new Modelfile based on this, replace FROM with:\\n# - FROM llama3.2:3b\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE + FROM llama3.2:3b\\n\\nFROM /Users/joaomoura/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE \\\"\\\"\\\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- if .Tools }}When you receive a tool call response, use the output to format @@ -856,12 +851,12 @@ interactions: .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-12-31T11:53:14.529771974-05:00\"}" + end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2025-02-20T18:55:09.150577031-08:00\"}" headers: Content-Type: - application/json; charset=utf-8 Date: - - Wed, 15 Jan 2025 20:47:12 GMT + - Fri, 21 Feb 2025 02:57:55 GMT Transfer-Encoding: - chunked http_version: HTTP/1.1 diff --git a/tests/utilities/test_converter.py b/tests/utilities/test_converter.py index f661af9cd..3f4a4d07b 100644 --- a/tests/utilities/test_converter.py +++ b/tests/utilities/test_converter.py @@ -1,4 +1,5 @@ import json +import os from typing import Dict, List, Optional from unittest.mock import MagicMock, Mock, patch @@ -220,10 +221,13 @@ def test_get_conversion_instructions_gpt(): supports_function_calling.return_value = True instructions = get_conversion_instructions(SimpleModel, llm) model_schema = PydanticSchemaParser(model=SimpleModel).get_schema() - assert ( - instructions - == f"Please convert the following text into valid JSON.\n\nThe JSON should follow this schema:\n```json\n{model_schema}\n```" + expected_instructions = ( + "Please convert the following text into valid JSON.\n\n" + "Output ONLY the valid JSON and nothing else.\n\n" + "The JSON must follow this schema exactly:\n```json\n" + f"{model_schema}\n```" ) + assert instructions == expected_instructions def test_get_conversion_instructions_non_gpt(): @@ -346,12 +350,17 @@ def test_convert_with_instructions(): assert output.age == 30 -@pytest.mark.vcr(filter_headers=["authorization"]) +# Skip tests that call external APIs when running in CI/CD +skip_external_api = pytest.mark.skipif( + os.getenv("CI") is not None, reason="Skipping tests that call external API in CI/CD" +) + + +@skip_external_api +@pytest.mark.vcr(filter_headers=["authorization"], record_mode="once") def test_converter_with_llama3_2_model(): llm = LLM(model="ollama/llama3.2:3b", base_url="http://localhost:11434") - sample_text = "Name: Alice Llama, Age: 30" - instructions = get_conversion_instructions(SimpleModel, llm) converter = Converter( llm=llm, @@ -359,19 +368,17 @@ def test_converter_with_llama3_2_model(): model=SimpleModel, instructions=instructions, ) - output = converter.to_pydantic() - assert isinstance(output, SimpleModel) assert output.name == "Alice Llama" assert output.age == 30 -@pytest.mark.vcr(filter_headers=["authorization"]) +@skip_external_api +@pytest.mark.vcr(filter_headers=["authorization"], record_mode="once") def test_converter_with_llama3_1_model(): llm = LLM(model="ollama/llama3.1", base_url="http://localhost:11434") sample_text = "Name: Alice Llama, Age: 30" - instructions = get_conversion_instructions(SimpleModel, llm) converter = Converter( llm=llm, @@ -379,14 +386,19 @@ def test_converter_with_llama3_1_model(): model=SimpleModel, instructions=instructions, ) - output = converter.to_pydantic() - assert isinstance(output, SimpleModel) assert output.name == "Alice Llama" assert output.age == 30 +# Skip tests that call external APIs when running in CI/CD +skip_external_api = pytest.mark.skipif( + os.getenv("CI") is not None, reason="Skipping tests that call external API in CI/CD" +) + + +@skip_external_api @pytest.mark.vcr(filter_headers=["authorization"]) def test_converter_with_nested_model(): llm = LLM(model="gpt-4o-mini") @@ -563,7 +575,7 @@ def test_converter_with_ambiguous_input(): with pytest.raises(ConverterError) as exc_info: output = converter.to_pydantic() - assert "validation error" in str(exc_info.value).lower() + assert "failed to convert text into a pydantic model" in str(exc_info.value).lower() # Tests for function calling support